Text word diff

text-word-diff · version 1.0.0 · Text · free, no key needed

Diff two texts as whitespace versus non-whitespace word tokens.

Use when you need to: text word diff · word token text diff · diff texts by words.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": "ab cd",
  "right": "ab xy"
}

Response:

{
  "result": {
    "ops": [
      {
        "op": "keep",
        "value": "ab",
        "left_index": 0,
        "right_index": 0
      },
      {
        "op": "keep",
        "value": " ",
        "left_index": 1,
        "right_index": 1
      },
      {
        "op": "delete",
        "value": "cd",
        "left_index": 2
      },
      {
        "op": "insert",
        "value": "xy",
        "right_index": 2
      }
    ],
    "keeps": 2,
    "deletions": 1,
    "insertions": 1
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "text-word-diff",
  "version": "1.0.0",
  "input": {
    "left": "ab cd",
    "right": "ab xy"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/text-word-diff/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":"ab cd","right":"ab xy"}'

The machine-readable contract is at /v1/tools/text-word-diff/versions/1.0.0.

CLI

node cli.mjs run text-word-diff 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.