fast_edit_block
Replace exact text blocks in files safely using block-level editing with word boundary and case sensitivity options. Includes backup and preview to prevent errors.
Instructions
Precise block editing: safely replace exact matches (desktop-commander style)
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": {
"path": "<path>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "fast_edit_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the file to edit | |
| old_text | Yes | Exact existing text to match (include minimal context) | |
| new_text | Yes | Replacement text | |
| expected_replacements | No | Expected number of replacements (safety guard) | |
| backup | No | Create a backup | |
| word_boundary | No | Enforce word boundaries (prevents partial matches) | |
| preview_only | No | Preview only (don’t modify the file) | |
| case_sensitive | No | Match case sensitively |