Text diff: compare two versions (unified diff)
util_diffCompare two texts and see exactly what changed. Line mode returns a standard unified diff (git-style @@ hunks) plus a list of added/removed lines with line numbers; word or char mode returns equal/insert/delete segments. Also: counts and a 0–1 similarity score, optional ignore case/whitespace. Myers algorithm, up to 20,000 characters and 5,000 lines per side. Use to detect page/contract/price changes or to review an edit. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.
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": {
"a": "<a>",
"b": "<b>"
},
"name": "util_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Old/original text | |
| b | Yes | New/changed text | |
| mode | No | lines (default), words or chars | |
| context | No | Unchanged lines around each change, 0–20 (default 3) | |
| ignore_case | No | true to ignore case | |
| ignore_whitespace | No | true to ignore whitespace differences |