Skip to main content
Glama
GautamVhavle

Universal JSON Agent MCP

by GautamVhavle

compare

Identify differences between two JSON values or paths, including added, removed, type, and value changes across one or two documents.

Instructions

Compare two JSON values and report their differences.

Can compare two paths within the same document or across two documents. Reports added keys, removed keys, type changes, and value changes. Walks as deep as Python allows unless max_depth is set.

Args: alias_a: The alias of the first document. path_a: Path to the first value (default root). alias_b: The alias of the second document (defaults to alias_a). path_b: Path to the second value (default root). max_depth: Stop after this many nested levels. Omit to walk the full safe depth.

Returns: A structured diff report listing all differences found.

Input Schema

NameRequiredDescriptionDefault
path_aNo
path_bNo
alias_aYes
alias_bNo
max_depthNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / max_depth
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Depth"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden alone: it discloses the reported diff categories and the traversal behavior ('walks as deep as Python allows unless max_depth is set'), which is genuinely useful for anticipating depth truncation. It omits read-only confirmation, error behavior for unknown aliases or invalid paths, and what happens if paths resolve to different types.

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?

Front-loaded summary followed by a clean Args block and a one-line Returns; every sentence is relevant. Minor waste: the Returns line largely restates the opening sentence, and the Args block partially duplicates schema defaults.

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?

Output schema exists so return shape needn't be explained, and the description compensates for the complex 5-parameter, 0%-coverage schema with per-argument semantics plus depth/traversal behavior. The only real omission, path syntax, is a minor addition for a tool an agent can still call correctly.

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 0%, so the Args block does real work: it explains alias_b defaults to alias_a, that paths default to root, and that omitting max_depth walks the full safe depth. The gap is path syntax — the description never says whether paths are dot notation, JSONPath, or slash-separated, which an agent must guess.

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 and resource ('Compare two JSON values and report their differences') and immediately enumerates the diff kinds produced (added/removed keys, type changes, value changes), which no sibling tool (get_value, jsonpath_query, distinct_paths) does. An agent can distinguish this as the diff operation without opening any 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?

It gives the two usage modes explicitly ('within the same document or across two documents'), which implies context for invocation, but never states when to prefer this over siblings like get_value or jsonpath_query for inspecting two values, nor any when-not-to-use or prerequisite conditions (e.g., documents must be loaded).

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