Diff two texts
diff_textCompare two texts by line, word, or character, or compare JSON so object key order does not matter. Returns an inline diff, side-by-side rows for line and JSON modes, and a unified patch.
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": {
"left": "<left>",
"right": "<right>"
},
"name": "diff_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| left | Yes | The original text. | |
| mode | No | line | |
| right | Yes | The changed text. | |
| ignoreWhitespace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| rows | Yes | ||
| unit | Yes | ||
| added | Yes | ||
| error | Yes | ||
| patch | Yes | ||
| pieces | Yes | ||
| removed | Yes | ||
| unchanged | Yes |