reject_change
Revert a single unwanted hunk in a file while keeping other changes intact; use it to remove one specific change without discarding the rest of the file's edits.
Instructions
Reverts a single granular change (hunk) in a file while keeping other changes intact.
What it does: Reverts only the specified hunk back to its original baseline on disk.
When to use: When one specific change in a file is unwanted, but other changes in the file should be kept.
Parameters:
- file_path: relative path to project root
- change_id: hunk ID (e.g. "h1", "h2") or line number
Returns:
JSON string with operation result and remaining changes.
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_path": "<file_path>",
"change_id": "<change_id>"
},
"name": "reject_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| change_id | Yes | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |