Editar arquivo (substituição)
edit_fileReplace the first exact occurrence of text in an existing file with new content, with optional regex and replace-all support. Changes require approval before being applied.
Instructions
Substitui a primeira ocorrência exata de old_text por new_text num arquivo existente. Sujeito a aprovação.
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": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| is_regex | No | Tratar old_text como expressão regular | |
| new_text | Yes | Novo trecho | |
| old_text | Yes | Trecho exato (ou regex, se is_regex) a substituir | |
| replace_all | No | Substituir todas as ocorrências | |
| confirm_token | No |