Get diff
get_diffRetrieve the unified diff between two commits, split per file. Defaults to pull-request semantics; output is capped, so fetch omitted files separately.
Instructions
Get the unified diff between two commits, split per file. Defaults to pull-request semantics (changes on head since it branched from base). Output is capped: files that don't fit have patchOmitted: "size_limit"; fetch them separately with paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Base ref, e.g. `main` or a SHA. | |
| head | No | Head ref. Defaults to HEAD. | HEAD |
| mode | No | `merge-base` diffs from where head branched off base (what a pull request shows, like `base...head`). `direct` diffs the two commits as they are (`base..head`). | merge-base |
| paths | No | Only include these files or directories (literal paths, not globs). | |
| maxBytes | No | Total patch budget in bytes. Can't exceed the server's limit. | |
| contextLines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| head | Yes | ||
| files | Yes | ||
| mergeBase | Yes | ||
| truncated | Yes | True if any patch was omitted for size. |