write
Create or replace a file in the workspace. Supply the last read revision, or 'missing' for a new file, to prevent overwriting concurrent changes.
Instructions
Create or replace a file using Pi. expected_revision must be the last read revision, or 'missing' to create a new file. Returns its new revision.
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": {
"workspace_id": "<workspace_id>",
"request_key": "<request_key>",
"path": "<path>",
"content": "<content>",
"expected_revision": "<expected_revision>"
},
"name": "write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path or path relative to the workspace. Home is a starting directory, not a sandbox. | |
| content | Yes | ||
| request_key | Yes | Unique operation key within this workspace. Reuse only for the exact same request; uncertain outcomes must not be blindly retried. | |
| workspace_id | Yes | ||
| expected_revision | Yes |