Write file
write_fileCreates or overwrites a file with the full content. Prefer edit_file for changes to existing files. Pass base (the version read_file gave) when overwriting a file you read, or null for a file that must not exist yet: if the file changed meanwhile, the write is refused with file_changed, so read it again and redo the change.
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": {
"projectId": "<projectId>",
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | The file's version from read_file, or null for a new file that must not exist yet. Optional | |
| path | Yes | ||
| content | Yes | ||
| projectId | Yes | Project id from list_projects |