reject_file_changes
Discard incorrect modifications to a single file by reverting it byte-for-byte to its backup state before the edit. Use when changes need to be rolled back.
Instructions
Destructive: Reverts pending changes for a SINGLE file using .bridge.bak backup.
What it does: Rolls back byte-for-byte to the state before the recent surgical edit or replace_pattern.
When to use: When modifications to a specific file are incorrect and need to be discarded.
When NOT to use: File must be currently modified. Use reject_all_files for all files.
Side effects: Destructive rollback. Overwrites file with original backup and removes entry from journal.
Parameters:
- file_path: relative path to project root (e.g., 'QuickActionsWidget.kt' or 'ui/theme/AppStrings.kt').
Returns:
JSON string confirming rollback of the file.
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>"
},
"name": "reject_file_changes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |