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
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | File path |
old_string | string | yes | Exact existing string |
new_string | string | yes | Replacement |
replace_all | boolean | no | Replace every occurrence |
| returns | object | {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.