SkillsHooksPromptsAgentsPersonasModelsPoliciesToolsTemplatesBundlesCategoriesStart here
← Tools
To toolcommandcodingfs-writestable

file-edit

Targeted string replacement in a file. Requires a prior read of the same file.

id tool/file-editv1.0.0function file_edit

Signature

ParameterTypeRequiredDescription
pathstringyesFile path
old_stringstringyesExact existing string
new_stringstringyesReplacement
replace_allbooleannoReplace every occurrence
returnsobject{path, replacements}.

Tool definition for the model

{
  "name": "file_edit",
  "description": "Replace exact string with new string in a file.",
  "input_schema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "File path"
      },
      "old_string": {
        "type": "string",
        "description": "Exact existing string"
      },
      "new_string": {
        "type": "string",
        "description": "Replacement"
      },
      "replace_all": {
        "type": "boolean",
        "description": "Replace every occurrence"
      }
    },
    "required": [
      "path",
      "old_string",
      "new_string"
    ]
  }
}
Author convergent-systems-key. Source convergent-systems-co/agent-atoms (original ↗). License Apache-2.0. Re-typed from tool-definition by scripts/migrate-policy-tool.py.