file_diff
Generate a unified diff between any two files, independent of git, with options for context lines and ignoring whitespace.
Instructions
Returns a unified diff between two arbitrary files. Works outside git — for tracked files use the git tool's diff subcommand instead, which understands refs and the index. Use context_lines to control surrounding context and ignore_whitespace to skip formatting-only changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_a | Yes | Path to the first file (the 'before' side). Absolute path, file:// URI, or workspace-relative path. | |
| file_b | Yes | Path to the second file (the 'after' side). Absolute path, file:// URI, or workspace-relative path. | |
| context_lines | No | Lines of context shown around each change (default 3) | |
| ignore_whitespace | No | Ignore whitespace-only differences |