Skip to main content
Glama

Structural JSON Diff Engine

diff_structural_json

Compare two JSON payloads or a tracked JSON file against a Git ref to detect semantic key-level and keyed-array changes, including breaking changes.

Instructions

Compute a semantic key-level and keyed-array diff with automatic breaking-change detection for two JSON payloads or a tracked JSON file against HEAD.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diff_structural_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseRefNoGit ref for the baseline blob (default: HEAD).
newJsonNoUpdated JSON text.
oldJsonNoBaseline JSON text.
filePathNoLabel or repository-relative JSON path (e.g. package.json, tsconfig.json, locales/tr.json).
maxNodesNoMaximum semantic diff nodes to return (default: 200).
repoPathNoRepository path when diffing a tracked JSON file against baseRef.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuinely behavioral trait: arrays are diffed by key rather than index, and changes are auto-classified as breaking. It omits the safety/auth profile, what 'breaking-change detection' actually classifies and how, and — critically — that zero parameters are required, leaving unresolved which parameter combination constitutes a valid call.

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?

A single front-loaded sentence with no filler; the core operation and its scope appear before the qualifiers. Nothing in it is redundant or padded.

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

Completeness3/5

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

For a 6-parameter tool with no annotations and no output schema, the description covers the what but not the how: it never explains that oldJson/newJson and repoPath/baseRef/filePath are alternative input modes, what the diff nodes returned look like, or how maxNodes truncation manifests. An agent could read it and still issue an argument-less call.

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 description coverage is 100%, so the schema already documents baseRef, oldJson, newJson, filePath, maxNodes, and repoPath individually. The description adds only the high-level pairing of those parameters into two modes and no format, precedence, or mutual-exclusion detail 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?

States a specific verb (compute) plus resource (JSON diff) and scopes it precisely: semantic key-level and keyed-array diffing with breaking-change detection. It also names the two supported input modes (two payloads, or a tracked file vs HEAD), which lets an agent distinguish this tool from the unrelated Git-workflow siblings (blast radius, cockpit, commit planning, precommit scan).

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 clause 'for two JSON payloads or a tracked JSON file against HEAD' implicitly tells the agent which operating mode to pick and therefore which parameters belong together, which is useful. However, there is no explicit when-to-use framing, no statement of when not to use it, and no mention of alternatives such as comparing non-JSON files or non-HEAD refs.

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