Text diff stats

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

Summarize a line-record diff as keep, insert, delete, and hunk counts.

Use when you need to: text diff stats · count line diff insertions and deletions · summarize text line differences.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": "a\nb\n",
  "right": "a\nc\n"
}

Response:

{
  "result": {
    "lines_left": 2,
    "lines_right": 2,
    "keeps": 1,
    "insertions": 1,
    "deletions": 1,
    "hunks": 1,
    "identical": false
  }
}

How to call it

MCP

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

{
  "id": "text-diff-stats",
  "version": "1.0.0",
  "input": {
    "left": "a\nb\n",
    "right": "a\nc\n"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/text-diff-stats/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":"a\nb\n","right":"a\nc\n"}'

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

CLI

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

Get the client at /clients/cli/.