diff_lines

Pack: diff · Endpoint: https://gateway.pipeworx.io/diff/mcp

Compute a line-level diff between two texts (keyless, offline). Returns the change list (equal/add/remove), an added/removed/unchanged summary, and a unified-diff-style string with +/- prefixes.

Parameters

NameTypeRequiredDescription
astringyesThe original (“before”) text.
bstringyesThe new (“after”) text.
contextbooleannoIf true, include unchanged lines in the unified output (default true).

Example call

Arguments

{
  "a": "line 1\nline 2\nline 3",
  "b": "line 1\nline 2 modified\nline 3"
}

curl

curl -X POST https://gateway.pipeworx.io/diff/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"diff_lines","arguments":{"a":"line 1\nline 2\nline 3","b":"line 1\nline 2 modified\nline 3"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('diff_lines', {
  "a": "line 1\nline 2\nline 3",
  "b": "line 1\nline 2 modified\nline 3"
});

More examples

{
  "a": "function foo() {\n  return 42;\n}",
  "b": "function foo() {\n  console.log('called');\n  return 42;\n}",
  "context": true
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "diff": {
      "url": "https://gateway.pipeworx.io/diff/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 15, 2026