Plain text · sha256 2eaaa8e08e0b
The description, rendered
This renders the markdown inside the description, so it isn’t quite the description itself.The raw view and the plain text are the bytes as they were sent.
Performs exact string replacement in a file.
- You must Read the file in this conversation before editing, or the call will fail.
old_stringmust match the file exactly, including indentation, and be unique — the edit fails otherwise. Strip the Read line prefix (line number + tab) before matching.replace_all: truereplaces every occurrence instead.
What it accepts
4 parameters The JSON parameter schema sent beside this description, 654 characters of it. Name, type, then whether the client marked it required.file_path
string
required
The absolute path to the file to modify
new_string
string
required
The text to replace it with (must be different from old_string)
old_string
string
required
The text to replace
replace_all
boolean
optional
Replace all occurrences of old_string (default false)
sha256 9748c75edc64 · the schema as the client sent it:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"file_path": {
"description": "The absolute path to the file to modify",
"type": "string"
},
"new_string": {
"description": "The text to replace it with (must be different from old_string)",
"type": "string"
},
"old_string": {
"description": "The text to replace",
"type": "string"
},
"replace_all": {
"default": false,
"description": "Replace all occurrences of old_string (default false)",
"type": "boolean"
}
},
"required": [
"file_path",
"old_string",
"new_string"
],
"type": "object"
}