Text diff: unified diff, hunks and similarity of two texts ($0.002/call)
text_diff$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Compares two texts you send and returns whether they are identical, a similarity score, counts of added, removed and unchanged lines (or words or characters), plus a unified diff and hunks in line mode or a change list in word and char mode. Input: before, after, optional mode, context, ignore_whitespace, ignore_case (POST for long text). Limits: 200,000 characters per side (word 100,000, char 20,000). Offline.
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": {
"before": "<before>",
"after": "<after>"
},
"name": "text_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Compare by line (default, unified diff), word or character | line |
| after | Yes | The new text, up to 200,000 characters (POST for long text) | |
| trial | No | Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms. | |
| before | Yes | The original text, up to 200,000 characters (POST JSON {"before": "...", "after": "..."} for long text) | |
| context | No | Unchanged lines around each change in line mode, 0-20 (default 3) | 3 |
| ignore_case | No | Ignore upper/lower case | no |
| ignore_whitespace | No | Line mode: ignore leading/trailing whitespace | no |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| tool | No | ||
| unit | No | ||
| cache | No | ||
| hunks | No | ||
| stats | No | ||
| _trial | No | Present when the call was a free trial call. | |
| changes | No | ||
| unified | No | ||
| provider | No | ||
| identical | No | ||
| price_usd | No | ||
| similarity | No |