write_file
Create or overwrite a text file in the workspace, automatically creating parent directories. Set overwrite to false to prevent accidental replacement of existing files.
Instructions
Create or overwrite a text file inside the workspace.
Args: path: Destination path, relative to the workspace root. Parent directories are created automatically. content: Text content to write (UTF-8). overwrite: If False and the file already exists, fails instead of overwriting it.
Returns: The path and number of bytes written.
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 |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| overwrite | No |