write
Create or replace a file on a remote machine with atomic saves and preserved permissions; use edit tools for existing file changes and request guarded-fleet confirmation first.
Instructions
Create or replace a file on the remote machine (content up to 1 MiB; atomic, mode kept). Prefer edit or multi_edit for changes to an existing file. 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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Permission bits for a new file (decimal, e.g. 420 for 0644). | |
| path | Yes | File path on the remote machine: absolute, or relative to the workspace directory. | |
| fleet | No | Fleet name. Omit to use the default. | |
| confirm | No | Guarded fleets only: the fleet name, set only after the user explicitly agreed. Never set it on your own. | |
| content | Yes | The complete new file content (at most 1 MiB; use upload for more). Replaces the file. | |
| context | No | Context name. Omit to use the default. | |
| workspace | No | Workspace id. Omit to use this session's workspace on the fleet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| mime | No | ||
| note | No | ||
| path | No | ||
| size | No | ||
| count | No | ||
| lines | No | ||
| where | Yes | ||
| sha256 | No | ||
| content | No | ||
| entries | No | ||
| new_file | No | ||
| warnings | No | ||
| truncated | No | ||
| workspace | Yes | ||
| next_offset | No | ||
| total_lines | No | ||
| omitted_bytes | No | ||
| written_bytes | No |