Write File
write_fileCreate or replace files atomically, with overwrite, append, or create-only modes and automatic parent folder creation, so incomplete or conflicting writes are avoided.
Instructions
Create or replace a file atomically (never leaves a half-written file).
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": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | overwrite (default), append to end, or create_only (fail if it exists). | overwrite |
| path | Yes | File to write. Parent folders are created automatically. | |
| content | Yes | Full file content (or base64 if is_base64=true). | |
| is_base64 | No | content is base64 bytes (for binary files). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||