Skip to main content
Glama
wayknow

wayknow/clearjson

by wayknow

diff_json

Deep compare two JSON strings and produce a structured diff report. Detects added, removed, changed keys and type changes with JSONPath locations.

Instructions

Deep compare two JSON strings and produce a structured diff report. Detects added keys, removed keys, changed values, and type changes. Returns a list of differences with their JSONPath locations and old/new values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
json_aYesThe first (base/original) JSON string.
json_bYesThe second (new/modified) JSON string.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses detection of added/removed/changed keys, type changes, and output format (list with JSONPath, old/new values). However, it does not mention handling of nested objects, nulls, or performance limits, leaving some gaps.

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?

The description is two sentences, no wasted words. Purpose is front-loaded, and every sentence adds value. Ideal conciseness for a simple tool.

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?

Given the tool's complexity (two string params, no output schema), the description covers the diff behavior and return type adequately. Could mention edge cases like deeply nested objects or large inputs, but overall complete.

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 100%, but the description adds meaning by labeling json_a as 'base/original' and json_b as 'new/modified', which goes beyond the schema's simple 'first/second' phrasing. This clarifies parameter roles for the agent.

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 performs a deep comparison of two JSON strings and produces a structured diff report, specifying the types of changes detected (added, removed, changed, type changes). This distinguishes it from sibling tools like validate_json (validation) or query_json (querying).

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 implies usage when needing to compare two JSONs, but lacks explicit guidance on when not to use it or alternatives. For example, it does not mention that query_json or search_json are better for extracting values. Context is clear but no exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wayknow/clearjson'

If you have feedback or need assistance with the MCP directory API, please join our Discord server