writeFile
Writes or overwrites file content at a given path, enabling AI to create or modify files and code.
Instructions
向指定路径写入或覆盖文件内容,常用于生成/修改代码,允许 AI 修改文件代码或文本。
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": "writeFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | 要写入文件的内容 | |
| filePath | Yes | 目标文件路径,相对或绝对路径,例如 'package.json' 或 'src/index.js' |