Skip to main content
Glama

compare_documents

Compare two Word documents to detect text changes in paragraphs and table cells, then get a tracked-change plan with diagnostics to preview and apply to the original.

Instructions

Read two Word documents and return paragraph differences, exact input SHA-256 hashes, coverage diagnostics, and a tracked-change plan bound to the original snapshot. Covered: text added, removed or changed in free body paragraphs, and text changed inside a table cell when the table's geometry is unchanged. The same words split differently across equally formatted runs are not a difference, because Word re-segments runs constantly. Refused, with a per-area diagnostic and no plan: changed table geometry, a cell whose formatting changed along with its words, paragraph formatting or style changes, and changes in headers, footers, notes, images, numbering or other parts. Differences found in the areas that are covered are still reported when another area blocks the plan, so a refusal tells you what it saw. Unsupported changes make isComplete false and plan null. This tool writes nothing; preview and apply the returned plan against the original document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
revisionAuthorYesOfficeAgent Compare
revisedDocumentIdYes
originalDocumentIdYes
revisedConnectionIdYes
originalConnectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses read-only behavior ('This tool writes nothing'), refusal behavior with per-area diagnostics, the 'isComplete false and plan null' state for unsupported changes, and the subtle run-segmentation rule. It also explains that covered differences are still reported even when another area blocks the plan.

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 long but dense, with every sentence earning its place: purpose, coverage boundaries, refusal behavior, plan state, and side-effect note. Key facts are front-loaded before the exhaustive lists, so the structure supports quick agent parsing.

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?

For a complex tool with no output schema and no annotations, the description is remarkably complete: it names all outputs, specifies which changes are supported and refused, and explains the output state on refusal. It leaves only minor execution details unstated, such as behavior on invalid document IDs or the exact shape of coverage diagnostics.

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

Parameters2/5

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

Schema description coverage is 0%, so the description needed to compensate, but it never explains the connection IDs, revisionAuthor, or the revised document parameter roles. It anchors the 'original' document as the plan's base, but 'revised' and the meaning of ConnectionId are left entirely to parameter-name convention.

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 opens with a specific verb and resource ('Read two Word documents') and enumerates concrete outputs: paragraph differences, SHA-256 hashes, coverage diagnostics, and a tracked-change plan. It also explicitly separates covered from refused change categories, making the tool's scope unmistakable.

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?

The description gives clear use context by stating that the tool writes nothing and instructs the caller to preview and apply the returned plan against the original document, guiding downstream workflow. It does not explicitly name alternative tools or state when not to use compare_documents, so it lacks full exclusion guidance.

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