write_file
Create or overwrite a workspace file with complete content after policy checks. Parent directories are created; recognized secrets and empty workflow writes are blocked.
Instructions
Create or overwrite one workspace file after policy checks. Creates parent directories as needed. Recognized secret values and empty workflow writes are blocked. Returns a write summary or a refusal prefixed with ⛔. This is a whole-file replacement; read and preserve needed content first.
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 | Destination file path relative to the configured workspace, for example 'src/config.json'. Paths outside the workspace are refused. | |
| content | Yes | Complete replacement text for the file, not a patch. Existing content is overwritten. Do not include secrets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |