Diff files
diff_filesCompare two workspace files to produce a unified diff with added and removed line counts, useful for checking a backup against the current version.
Instructions
Unified diff between two workspace files. Use when: you compare two versions of a file, such as a backup and the current one. Avoid when: binary files, or git history (run git with shell_run). Output: lines_added, lines_removed, unified_diff, truncated.
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": {
"relative_path_a": "<relative_path_a>",
"relative_path_b": "<relative_path_b>"
},
"name": "diff_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_lines | No | Max diff lines returned (default 500, max 10000). | |
| context_lines | No | Unchanged context lines around each hunk (default 3, max 50). | |
| relative_path_a | Yes | Workspace-relative ('.' = root); absolute/.. outside it rejected. | |
| relative_path_b | Yes | Workspace-relative ('.' = root); absolute/.. outside it rejected. |