write_file
Write content to a file on a Linux system, with optional append mode and custom encoding. Specify file path and content to create or update files.
Instructions
写入文件内容
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": {
"filePath": "<filePath>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | 是否追加模式(默认 false) | |
| content | Yes | 要写入的内容 | |
| encoding | No | 文件编码(默认 utf-8) | utf-8 |
| filePath | Yes | 要写入的文件路径 |