write_file
Writes or updates a file inside a workspace, replacing it by default or writing at a byte offset for in-place edits; guarded fleets require explicit user confirmation.
Instructions
Write a file inside your workspace (content up to 8 MiB). offset 0 (the default) replaces the file; a larger offset writes in place. Paths are inside the workspace: this tool never uploads local files. On a guarded fleet you must first ask the user and get their explicit agreement; only then set confirm to the fleet name.
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 | Permission bits for a new file (decimal, e.g. 420 for 0644). | |
| path | Yes | File path inside the workspace. | |
| fleet | No | Fleet name. Omit to use the default. | |
| offset | No | Byte offset to write at. 0 (default) replaces the file. | |
| confirm | No | Guarded fleets only: the fleet name, set only after the user explicitly agreed. Never set it on your own. | |
| content | Yes | File content (at most 8 MiB once decoded). | |
| context | No | Context name. Omit to use the default. | |
| encoding | No | How content is encoded: text (default) or base64. | |
| workspace | No | Workspace id. Omit to use this session's workspace on the fleet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| where | Yes | ||
| sha256 | Yes | ||
| bytes_written | Yes |