file_diff
Compare any two files and get a unified diff with configurable context and whitespace handling. Works outside git for arbitrary files.
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 |