diff_text
Compare two text strings and return a unified diff showing additions, deletions, and context lines.
Instructions
Compare two text strings and return a unified diff showing additions (+), deletions (-), and context lines. Useful for review agents, changelog generation, and patch creation. Returns '(no differences)' when inputs are identical. Free — no payment required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | The "before" text (original). | |
| b | Yes | The "after" text (modified). | |
| context | No | Number of unchanged context lines around each change (default 3, max 10). | |
| label_a | No | Label for the "before" file header (default "a"). | |
| label_b | No | Label for the "after" file header (default "b"). |