Skip to main content
Glama

util_json_diff

Read-only

Structural JSON diff + JSON Patch — Compare two JSON documents (a, b as URL-encoded strings, 20k chars each): every added, removed and changed value with its JSON Pointer path, type changes, counts, and an RFC 6902 JSON Patch that turns a into b. ignore_array_order=true compares arrays as multisets. Offline, no data stored. Price: $0.002 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "util_json_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes[1,2,3]
bYes[1,2,4,5]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations it discloses the per-document 20k-character cap, that processing is offline with no data stored, and that each call costs $0.002 USDC via x402 — a genuine payment/prerequisite detail an agent must know before invoking. The 'Offline, no data stored' claim sits slightly at odds with openWorldHint=true, but that hint reads as a generic default rather than a real conflict.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact and front-loaded: the diff/Patch capability comes first, then the input format and limits, then output contents, then the mode flag, then cost. Every fragment carries information; nothing is repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the necessary work of enumerating the return payload (added/removed/changed values with JSON Pointer paths, type changes, counts, JSON Patch) and flags the pricing gate. Only error behavior on malformed JSON is left unspecified, which is minor for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the schema's descriptions are bare examples ('[1,2,3]', '[1,2,4,5]'). The description compensates by clarifying that a and b are URL-encoded strings with a 20k-character limit each, plus the ignore_array_order semantics, which the schema does not convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource combination — structural JSON diff plus RFC 6902 JSON Patch generation — and the word 'Structural' implicitly separates it from the plain-text sibling text_diff and from the LLM-based ai_compare. An agent knows exactly what it produces without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the tool is for comparing two JSON documents, and 'ignore_array_order=true compares arrays as multisets' gives one mode condition. There is no explicit when-to-use versus text_diff or ai_compare, and no stated exclusion or prerequisite beyond the size limit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources