Skip to main content
Glama

x402 Toolbox

Structural diff of two JSON documents as JSON-Patch-style operations

json_diff
Read-onlyIdempotent

Structural diff of two JSON documents as JSON-Patch-style operations. Compares two JSON values key by key and index by index and returns add / remove / replace operations with JSON Pointer paths and old and new values (up to 2,000 operations). Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
aYesOriginal (a JSON value, or a string containing JSON)
bYesChanged (a JSON value, or a string containing JSON)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety bar is met; the description adds genuinely new context: the returned operation set (add/remove/replace) with JSON Pointer paths and old/new values, a 2,000-operation cap that signals possible truncation, and the per-call price via x402 on eip155:8453. It stops short of describing error behavior for malformed JSON input.

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?

Three sentences, front-loaded with the core purpose followed by return shape and then cost. Every sentence carries distinct information with no repetition of the title or annotations.

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 carries the burden of describing return values and does so well (operation types, JSON Pointer paths, truncation cap). Pricing is also disclosed. Minor gap: nothing about error handling or how type changes versus value changes are represented.

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

Parameters3/5

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

Schema coverage is 100% and both parameters are already documented, including the 'JSON value or string containing JSON' acceptance. The description adds nothing about the parameters beyond the schema, so the baseline of 3 applies.

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?

Names a specific verb (structural diff) and resource (two JSON documents) and pins down the output shape as JSON-Patch-style operations. The emphasis on 'key by key and index by index' distinguishes it from sibling text_diff and from json_query/json_format without needing to name them.

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?

The single-purpose nature makes the use case inferable, but the description never says when to reach for this over text_diff or json_query, nor any exclusions. No explicit routing guidance is given.

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.