Skip to main content
Glama

compare_documents

Compare two Word documents and get a paragraph-level diff: additions, removals, and changes with indices.

Instructions

Compare two Word (.docx) documents and report paragraph-level differences: additions, removals, and changes with paragraph indices. Note: comparison and snapshots are ONLY supported for Word (.docx); Excel (.xlsx) and PowerPoint (.pptx) comparison is not yet available (you will receive an UNSUPPORTED_FORMAT error). Also manages document snapshots via options.action: "snapshot" records path_a state, "list_snapshots" lists recorded snapshots, and "restore" writes a snapshot back to path_b (snapshot store default: ~/.tianshang-scribe/snapshots/). The compare mode never modifies its inputs; snapshot/restore write to the snapshot store. To read a single document, use extract_document_data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
path_aYesPath to the first document.
path_bYesPath to the second document.
optionsNoTool options.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • addedInput schema / $defs / ToolOptions / properties / action
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "compare",
      +        "snapshot",
      +        "list_snapshots",
      +        "restore"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Sub-operation for compare_documents: \"compare\" (default) diffs two documents; \"snapshot\" records path_a state; \"list_snapshots\" lists recorded snapshots; \"restore\" writes a snapshot back to path_b.",
      +  "title": "Action"
      +}
    • addedInput schema / $defs / ToolOptions / properties / snapshot_dir
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Directory to store/read document snapshots (default: ~/.tianshang-scribe/snapshots/).",
      +  "title": "Snapshot Dir"
      +}
    • addedInput schema / $defs / ToolOptions / properties / snapshot_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Snapshot identifier used by the restore action.",
      +  "title": "Snapshot Id"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "compare_documentsDictOutput",
      +  "type": "object"
      +}
  2. First observedv0.3.0

TDQS

A5/5.0
Behavior5/5

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

The description explicitly states that compare mode never modifies inputs, while snapshot/restore write to the snapshot store, and restore overwrites path_b. It also mentions backup and dry_run options, providing full transparency about side effects despite annotations not indicating these behaviors.

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 well-structured, starting with the core purpose, then detailing snapshot actions, format limitations, and an alternative. Every sentence adds necessary information without redundancy, maintaining a balance between completeness and brevity.

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?

Given the tool's complexity (multiple actions, options, and side effects), the description covers all essential aspects: supported formats, error conditions, alternative tools, default behaviors, and side effects. The presence of an output schema further completes the picture, so nothing critical is missing.

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

Parameters5/5

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

The schema already provides descriptions for all parameters (100% coverage). The tool description adds valuable context, such as the default snapshot_dir and the meaning of each action, enriching the semantic understanding beyond the schema alone.

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's primary function: comparing two Word documents for paragraph-level differences. It explicitly names the resource (two .docx files) and the actions (additions, removals, changes). It also distinguishes itself from a sibling tool (extract_document_data) and specifies format limitations, ensuring unambiguous purpose.

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?

The description provides explicit guidance on when to use the tool (for comparing two documents) and when not to (unsupported formats like .xlsx/.pptx), and offers an alternative for single-document reading (extract_document_data). It also explains the snapshot actions and side effects, making usage conditions clear.

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

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/Tianshang301/TianshangScribe'

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