diff_text
Compare two texts line by line with an exact LCS algorithm, returning equal, delete, and insert operations with line numbers and counts. Rejects oversized input instead of hanging.
Instructions
Compute an exact line-by-line diff between two texts using a longest-common-subsequence algorithm. Returns per-line operations (equal/del/ins) with line numbers plus added/removed/unchanged counts. Exact and reproducible; refuses oversized input rather than hanging.
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 original text | |
| b | Yes | The revised text | |
| maxLines | No | Cap on returned diff lines (default 2000) |