create_file
Create a new file at a project-relative path. Fails if the file already exists to prevent accidental overwrites.
Instructions
Create a new file at a project-relative path. Errors if the file already exists; use file_write to overwrite.
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": "create_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Project-relative path of the new file | |
| content | Yes | File content (UTF-8 text) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| _hints | Yes | ||
| requiresHarnessSession | Yes |