studio_edit_file
Change a file of the open page, in one of two ways. With old_text and new_text: replace one exact piece of text, which must appear exactly once in the file (copy it from studio_get, what file, without the line numbers, with enough surrounding lines to make it unique). With content: write the whole file, or add content at its end with append=true; replacing an existing large file is refused: change it with old_text and new_text. manifest.json must stay one valid JSON object (studio_get, what doc, topic manifest). Nothing is saved before studio_save.
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": {
"session_id": "<session_id>",
"path": "<path>"
},
"name": "studio_edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | One of the page's four files. | |
| append | No | With content: add it at the end of the file. | |
| content | No | Instead of old_text and new_text: the whole file, or what append adds at its end. | |
| new_text | No | With old_text: the text that replaces it. | |
| old_text | No | With new_text: the exact text to replace, which must appear exactly once in the file. Copy it from studio_get (what file), without the line numbers. | |
| session_id | Yes | The session_id studio_open_page returned. |