replaceBlock
Replace exact text blocks in workspace files using content matching. Provides clear error messages when text not found or match is ambiguous.
Instructions
Replace exact text block in a workspace file by content match, no line numbers. Fails clearly if not found or ambiguous.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Workspace or absolute file path | |
| oldContent | Yes | The exact text to find and replace (must match precisely, including whitespace) | |
| newContent | Yes | The text to replace oldContent with | |
| save | No | Save after replacing (default: true) |