Skip to main content
Glama

compare_documents

Read-only

Compare two DOCX or ODF documents to generate a tracked-changes output. Supports standalone file comparison or session edit comparison.

Instructions

Compare two documents and produce a tracked-changes output document. Provide original_file_path + revised_file_path for standalone comparison, or file_path to compare session edits against the original. DOCX and ODF (.odt) support both modes. DOCX stats count insertions/deletions as contiguous ranges, expose atom totals as insertedAtoms/deletedAtoms, and report formatChanges separately from modifiedParagraphs. ODF compares at inline granularity (a modified paragraph is marked up in place — only the changed spans are struck or inserted).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
original_file_pathNoPath to the original DOCX or .odt file.
revised_file_pathNoPath to the revised DOCX or .odt file.
file_pathNoPath to the DOCX or ODT file.
save_to_local_pathYesPath to save the tracked-changes output (DOCX or .odt).
authorNoAuthor name for track changes. Default: 'Comparison' (DOCX) or the configured AI author (ODF).
engineNoComparison engine (DOCX only). Default: 'auto'.
Behavior1/5

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

The description states the tool creates a tracked-changes output file, but annotations include readOnlyHint=true, which indicates the tool should not modify any state. Creating a file is a state modification, constituting a contradiction. The description does not clarify this inconsistency or disclose other behavioral traits like permissions or error handling.

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?

The description is concise but packed with detail; it front-loads the purpose then segments into mode explanations and format-specific notes. A minor improvement would be to move granular stats to parameter descriptions, but overall it is well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains input modes and output behavior, but lacks information on the tool's return value (e.g., success message/filename). With no output schema, this is a gap. It also does not clarify handling of conflicting parameters (e.g., providing both original/revised and file_path).

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% with parameter descriptions, but the description adds significant value: it explains the two comparison modes, file-type behaviors (e.g., DOCX atom statistics, ODF inline granularity), and default author/engine values. This enriches parameter 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 purpose: comparing two documents and producing a tracked-changes output. It explains two modes (standalone and session edit) and supported formats (DOCX, ODF), distinguishing it from siblings like 'extract_revisions' or 'accept_changes'.

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 when to use the tool (for comparing documents) but does not explicitly state when not to use it or mention alternatives among siblings. It contrasts modes but lacks exclusionary guidance, such as 'use extract_revisions for existing tracked changes'.

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/UseJunior/safe-docx'

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