save_text_file
Write text content to a file at a specified path, creating directories as needed. Prevents overwriting existing files unless explicitly allowed.
Instructions
Write text content to a file at a given path. Default: refuses to overwrite existing files (returns a 409-shaped error with the existing file size). Pass overwrite=true to replace. Creates parent directories as needed. Returns {ok, path, bytesWritten}.
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>",
"content": "<content>"
},
"name": "save_text_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or working-dir-relative target path. | |
| content | Yes | String content, or an object (will be JSON-stringified). | |
| overwrite | No | If true, replace existing file. Default false. |