write_file
Write a file's COMPLETE content, replacing whatever is there. Use this only to create a new file or to rewrite one from scratch. To change part of an existing file use edit_file, and to add to the end use append_to_file — rewriting a whole file to change a few lines makes every line show as modified in the diff, is charged for the unchanged content, and risks mistyping the parts you meant to keep. On session branches, successful writes create a pending review change that must be applied or discarded by the user.
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": {
"project_id": "<project_id>",
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| project_id | Yes | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |