Home / Servers / Text Toolkit / diff_text

Diff text

An MCP tool from the Text Toolkit server, hosted on mcp.hjlabs.in.

Compare two texts line by line and return a unified diff (like `diff -u`), plus counts of added and removed lines. Empty output means the texts are identical. Up to 5,000 lines each.

Name on the gateway: text__diff_text · read-only.

Parameters

NameTypeDescription
before requiredstringThe original text.
after requiredstringThe changed text.
contextintegerUnchanged lines to show around each change. Default 3.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "text__diff_text",
  "arguments": {
    "before": "…",
    "after": "…"
  }
}

Or connect the Text Toolkit server directly, which lists 43 tools including this one:

Run in your terminal
claude mcp add --transport http hj-text https://mcp.hjlabs.in/mcp/text \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the diff text tool with before set to ….

More from Text Toolkit