apply_edits
Apply multi-file, multi-hunk code edits with optional inline verification, returning the edit result and test verdict in one call.
Instructions
Multi-hunk editor (up to 50 files) with optional inline verify: the edit and its verdict come back in one call. Shape: edits=[{path, hunks:[{target, replacement}]}]; a top-level path fills edits that omit one (single-file shorthand). target/replacement take a string or an array of lines; in a single string escape every newline as \n and every double quote as " so the arguments stay valid JSON.
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": {
"edits": "<edits>"
},
"name": "apply_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Repo root for relative edit paths; absolute paths inside a known root are rebased automatically | |
| path | No | Single-file shorthand: fills the path of every edit that omits one | |
| root | No | Alias of cwd | |
| edits | Yes | ||
| verify | No | Command run after the edit; 'auto' = the project's declared test command | |
| dry_run | No | ||
| best_effort | No |