Skip to main content
Glama

ScorpTech x402 Tools

Json Diff

json_diff
Read-onlyIdempotent

Structural diff of two JSON documents: list of added / removed / changed values with JSON Pointer paths and old/new values, an RFC 6902 JSON Patch that turns a into b, and counts. Arrays are aligned by longest common subsequence (inserted items show as inserts, not a cascade of changes) or matched by an id field. POST JSON body {a, b}. Returns JSON with: equal, summary, changes, patch, truncated. Price: $0.003 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/json-diff

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": "json_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesOriginal JSON value (any type)
bYesNew JSON value (any type)
arrayKeyNoMatch array elements that are objects by this field (e.g. "id") instead of by position
maxChangesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly=true, idempotent=true, destructive=false, so safety is covered and the description correctly adds value beyond them. It discloses non-obvious behavior an agent could not infer: LCS alignment so inserted items appear as inserts rather than cascading changes, optional id-based matching, result truncation via the 'truncated' field, and paid invocation at $0.003 USDC per successful call. Remaining gaps are minor (no detail on how truncation interacts with maxChanges, no error/failure billing behavior).

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

Conciseness4/5

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

The definition is front-loaded with what the tool produces and how arrays are handled, then tapers into transport and pricing details — a sensible ordering with no filler sentences. It is dense and packs many clauses into single sentences, but every clause carries information an agent would otherwise have to guess at.

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

Completeness5/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 full burden of describing returns and does so explicitly: equal, summary, changes, patch, truncated. It also covers invocation format (POST JSON body {a, b}), the paid x402 mechanism, the price, accepted chains, and a mirror HTTPS endpoint — everything needed to call and interpret the tool correctly.

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 75%, close to the point where the schema does the heavy lifting, and the schema already describes a, b, arrayKey and maxChanges well. The description reinforces arrayKey semantics ('Arrays are ... matched by an id field') without naming the parameter, and never explains maxChanges beyond the appearance of a 'truncated' return field, so added meaning over the schema is modest.

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

Purpose4/5

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

The description opens with a specific verb+resource ('Structural diff of two JSON documents') and immediately enumerates the concrete outputs (added/removed/changed values, JSON Pointer paths, RFC 6902 patch, counts). The word 'Structural' plus the LCS/arrayKey explanation implicitly separates it from a textual diff like text_diff, but no sibling is named explicitly, so differentiation is inferred rather than stated.

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 context is implied by the algorithmic detail (LCS alignment, id-field matching) and the output list, which tells an agent what this tool is good for. However, there is no explicit when-to-use/when-not guidance and no routing to alternatives such as text_diff for plain strings or json_patch for applying a patch — the relationship is only hinted at by 'a patch that turns a into b'.

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