Write host file
write_fileWrite text content to a file within the designated writable directory, optionally overwriting existing files.
Instructions
Write a text file inside an allowed writable host root.
Existing files are not replaced unless overwrite=true. Default writable root is the user's home directory. Configure HOST_MCP_WRITE_ROOTS to change it.
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||