diff_text
utilpeek: Diff two texts: unified line diff, word or character changes. For PDF or Word files use compare_documents. Returns the differences between two texts: similarity ratio, counts and hunks; in line mode a git-compatible unified diff, in word or char mode change records (equal, insert, delete, replace) with exact character offsets into a and b. At most 1,000 hunks and 5,000 change records, then truncated. Parsed in an isolated, resource-limited child process without network; input over its limits is a 422 (not charged). Typically under 0.5 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/text-diff-api.html
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": "diff_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | The old text (at most 100,000 characters). | |
| b | Yes | The new text (at most 100,000 characters). | |
| mode | No | line (default; a unified diff), word or char (at most 20,000 characters per side). | line |
| context | No | Unchanged lines around each hunk. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| error | No | Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object. | |
| hunks | No | ||
| stats | No | ||
| source | No | ||
| changes | No | ||
| context | No | ||
| unified | No | ||
| identical | No | ||
| truncated | No | ||
| similarity | No |