Diff Checker compares two text inputs and outputs a unified, side-by-side, or JSON diff. Structural modes for JSON (by key path), YAML (normalized), and code (by AST declaration) ignore formatting noise so only semantic changes surface. Returns addition, deletion, and unchanged line counts plus a detailed structural change report ready for pipeline processing.
Diff Checker
Structural diff for text, JSON, YAML, and code
How to use
- Paste original text — Enter the original (before) text into the Text A field.
- Paste modified text — Enter the modified (after) text into the Text B field.
- Choose output format — Select unified (patch format), side-by-side (columnar), or json (machine-readable).
- Select structural mode — For JSON/YAML/code inputs, select the matching structural mode to diff semantically rather than textually.
- Run and review — Click Compare or press Ctrl+Enter. Review the diff output and structural changes report.
MCP / API
Call diff_checker directly from any MCP-compatible agent:
// MCP TypeScript SDK
const result = await client.callTool({
name: "diff_checker",
arguments: {
"textA": "...",
"textB": "...",
"format": "unified",
"ignoreWhitespace": false
}
});
// curl
curl -X POST https://obfus.link/mcp \
-H "Authorization: Bearer <SPT>" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"diff_checker","arguments":{"textA":"...","textB":"...","format":"unified","ignoreWhitespace":false}}}'Related tools
FAQ
What does "structural diff" mean for JSON?
In JSON mode, the diff compares by key path rather than by line position. Two JSON objects with the same keys and values but in different orders are considered identical. Only keys that are added, removed, or have changed values appear in structuralChanges.
What does "code-ast" structural mode do?
Code-AST mode extracts top-level function, class, and variable declarations from the source code and diffs at the declaration level. If you run Prettier or Black on the code and nothing changes semantically, the diff will show zero structural changes even if every line was reformatted.
What is the maximum input size?
Each text input supports up to 2,000 lines. Inputs exceeding this limit return a PAYLOAD_LIMIT error. For larger files, split them into sections before comparing.
What do the addition/deletion/unchanged counts represent?
These count lines: additions are lines present in B but not A, deletions are lines present in A but not B, and unchanged are lines present in both. The counts reflect line-level changes regardless of the structural mode selected.
Can I use this tool via the MCP API?
Yes. The tool is registered on the obfus.link MCP server at https://obfus.link/mcp. Call it from any MCP-compatible agent with a Shared Payment Token. The MCP tool name matches the snake_case slug shown in the integration snippet.