cursor_agent_edit_file
Edit files using natural language instructions to modify code or content without manual editing, reducing token usage in AI workflows.
Instructions
Edit a file with an instruction. Prompt-based wrapper; no CLI subcommand required.
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": {
"file": "<file>",
"instruction": "<instruction>"
},
"name": "cursor_agent_edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| instruction | Yes | ||
| apply | No | ||
| dry_run | No | ||
| prompt | No | ||
| output_format | No | text | |
| extra_args | No | ||
| cwd | No | ||
| executable | No | ||
| model | No | ||
| force | No | ||
| echo_prompt | No |