replace_literal
Replace literal text only when the exact number of occurrences matches the expected count, ensuring precise modifications.
Instructions
Replace literal text only when the exact expected occurrence count matches.
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": "replace_literal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | preserve | |
| path | Yes | ||
| newline | No | preserve | |
| encoding | No | preserve | |
| new_text | Yes | ||
| old_text | Yes | ||
| base_hash | No | ||
| final_newline | No | preserve | |
| expected_occurrences | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |