File Write
file_writeWrites text to a local file — create, overwrite, or append. For .txt/.md/.csv/.json/.log and any plain-text or code file. (For Word use word_create, Excel excel_create, PowerPoint ppt_create.) Writes anywhere on this Mac, with two exceptions: files your machine runs by itself (shell startup files, LaunchAgents, git hooks, AI-client configs) and credential locations are never written. Overwriting an existing file keeps its previous version first, in LMCP's own folder, and the answer says where (previous_version); append=true adds to the end. Missing parent folders are created.
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": "file_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file to write | |
| append | No | Append to the end instead of overwriting (default false) | |
| confirm | No | Ignored; kept for older clients. | |
| content | Yes | Text content to write |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||