Skip to main content
Glama

diff_docs

Read-onlyIdempotent

Compare two documents opened with load_doc to get change counts and the first 25 changes; use keySpec to align arrays by identity so reordered items aren't reported as wholesale changes.

Instructions

Compare two documents opened with load_doc and return change counts plus the first 25 changes. There is no filePath shortcut: load both first. docIdA is the older side: additions and removals read A → B. Give keySpec to align arrays by identity (e.g. "id,orderId") so reordered elements are not reported as wholesale changes.

Input Schema

NameRequiredDescriptionDefault
docIdAYesThe baseline (older) document.
docIdBYesThe current (newer) document.
keySpecNoComma-separated candidate identity keys for array alignment, e.g. "id,taskId".

Output Schema

NameRequiredDescriptionDefault
okYes
hintNo
toolYes
errorNo
evictedNo
structuredTruncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/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), and the description adds genuine behavioral context: the result is truncated to the first 25 changes, direction of comparison is A → B, and array alignment depends on keySpec. Truncation disclosure is exactly the kind of trait annotations cannot express.

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?

Four tight sentences, front-loaded with the action and return shape, followed by the prerequisite and the one non-obvious parameter tip. No sentence repeats structured data or wastes space.

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?

The tool is simple (3 params, no nesting), an output schema exists for return shape, and the description still covers the non-obvious parts: prerequisite tool, comparison direction, result truncation, and keySpec rationale. Nothing needed to invoke it correctly is missing.

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 semantics the schema does not: docIdA is the baseline and additions/removals are read A → B, and keySpec's purpose is identity-based array alignment to avoid false wholesale changes. Only the exact keySpec format is left to the schema, which already covers it.

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 documents') plus what it returns ('change counts plus the first 25 changes'), and ties itself to the sibling that must precede it (load_doc). An agent can distinguish it from load_doc, inspect, or get_schema 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 Guidelines5/5

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

Explicitly states the prerequisite ('opened with load_doc') and rules out a shortcut ('There is no filePath shortcut: load both first'), then gives the condition for using keySpec ('so reordered elements are not reported as wholesale changes'). This is when-to-use, when-not, and alternative in three sentences.

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