Skip to main content
Glama

Compare two JSON values or two texts without AI

structuredDiff
Read-onlyIdempotent

Compare two JSON values or two texts without AI. Use this to see exactly what changed between two supplied versions. format json (default): returns added, removed, and changed paths as JSON Pointers; objects compare by key (order ignored), arrays by index (no move detection), and a different type counts as a change. format text: returns line hunks with one-based line numbers, comparing exactly including whitespace and case. Returns canonical SHA-256 hashes (json) or text hashes. Up to 500 changes are returned; counts cover all. Limits: 64 KiB body, 2000 lines per text, 64 nesting levels. Nothing is fetched or retained. A difference is not a judgment of meaning. Same as POST https://bozos.si/api/v1/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": {
      "before": "<before>",
      "after": "<after>"
    },
    "name": "structuredDiff"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterYesThe later version, of the same kind.
beforeYesThe earlier version: any JSON value, or a string when format is text.
formatNojson compares structure; text compares lines.json

Output Schema

NameRequiredDescriptionDefault
hunksNoformat text only.
formatYes
hashesYes
safetyYes
changesNoformat json only.
summaryYesjson: changes, added, removed, changed. text: hunks, lines_removed, lines_added, before_lines, after_lines.
identicalYes
interpretationYes
schema_versionYes
hunks_truncatedNo
changes_truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description still adds substantive behavior: 500-change cap with full counts, 64 KiB body / 2000 line / 64 nesting limits, no move detection, type mismatch treated as change, whitespace- and case-exact text comparison, and 'nothing is fetched or retained'. That is exactly the kind of context annotations cannot carry.

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?

Purpose is front-loaded in the first sentence and every clause carries factual content (limits, semantics, endpoint). The middle section is a dense semicolon chain that is harder to scan than it needs to be, and 'A difference is not a judgment of meaning' is a soft caveat, but there is no padding.

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?

An output schema exists, so return values need not be documented, yet the description still gives the shape of both outputs (JSON Pointers, line hunks with one-based numbers, SHA-256 hashes, truncation behavior). Combined with limits and statelessness, an agent has everything needed to invoke this correctly on the first try.

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%, so the baseline is 3, but the description adds real meaning: 'format text' implies the before/after must be strings, and the json mode's per-key/per-index comparison semantics tell the agent how inputs will be interpreted. It does not add syntax or normalization guidance for the inputs themselves, so not a 5.

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 pair of resources ('Compare two JSON values or two texts') plus a distinctive qualifier ('without AI') that separates it from any LLM-assisted sibling. The two modes are then spelled out precisely enough that an agent can tell which one it needs before opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this to see exactly what changed between two supplied versions' gives a clear triggering condition and the 'without AI' framing implies determinism versus model-based comparison. It does not name an alternative sibling (e.g. validateJsonSchema, canonicalizeJson) or state what it is not for, which keeps it below a 5.

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