Source Modify
source_modifyReplace an exact string in a workspace file while rejecting ambiguous non-unique edits unless replaceAll is set; writes atomically and reports before/after hashes.
Instructions
Perform an exact string replacement inside a workspace file, refusing ambiguous (non-unique) edits unless replaceAll is set. Writes atomically and reports before/after hashes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"relativePath": "<relativePath>",
"oldString": "<oldString>",
"newString": "<newString>"
},
"name": "source_modify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newString | Yes | Replacement text. | |
| oldString | Yes | Exact text to replace. | |
| replaceAll | No | Replace every occurrence (default: require uniqueness). | |
| relativePath | Yes | File to edit, relative to the workspace root. |