Skip to main content
Glama

diff_json

Compare two JSON documents from local files or inline strings. Produces a line-oriented diff with canonical key sorting; no external network calls.

Instructions

Diff two JSON documents (canonical key-sorted stringify, line-oriented). Local files/strings only. Does not fetch URLs or contact external services.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsoncNo
leftTextNo
maxDiffsNo
rightTextNo
leftFilePathNo
rightFilePathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/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. It discloses that it works only on local files/strings and does not contact external services, which is useful. It also mentions the canonical key-sorted stringify and line-oriented output, giving insight into the return format. However, it does not state whether the operation is read-only or if there are side effects, nor does it describe the exact structure of the diff output. Some behavior is disclosed, but not comprehensively.

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 description is very short—two sentences—and front-loads the core purpose. There is no redundant phrasing or fluff. However, the brevity comes at the cost of missing critical parameter details. For conciseness alone, it is appropriately sized, but the lack of essential information prevents a perfect score.

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

Completeness1/5

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

Given six parameters with zero schema descriptions, no output schema, and no annotations, the description is grossly incomplete. It does not explain how to provide input (text vs. file paths), what the jsonc flag does, how maxDiffs limits output, or what the returned diff looks like. An agent would have to guess or inspect the schema, which provides no clues. This is a minimal description for a tool that requires substantial context.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must explain the parameters. It does not mention any of the six parameters (jsonc, leftText, maxDiffs, rightText, leftFilePath, rightFilePath) or their semantics. The description only says 'two JSON documents' without clarifying how they are specified (e.g., via text or file paths) or what maxDiffs and jsonc control. This is a severe gap.

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?

The description clearly states the tool's purpose: it diffs two JSON documents. It specifies the output format (canonical key-sorted stringify, line-oriented) and explicitly differentiates itself from sibling tools like validate_json, pretty_json, and json_get, which serve different functions. The verb 'Diff' is specific and unambiguous.

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 description provides a key constraint: 'Local files/strings only. Does not fetch URLs or contact external services.' This implicitly tells the agent when not to use this tool (for remote resources), but it does not explicitly state when to prefer it over alternatives or mention any exclusions. No sibling comparisons are made beyond the implicit scope, so usage guidance is partial.

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