Skip to main content
Glama

compare_documents

Diff two DOCX files and create a new document with tracked changes showing insertions and deletions.

Instructions

Diff two DOCX files and produce a tracked-change document.

Paragraph-level LCS diff:

  • Unchanged paragraphs copied verbatim.

  • Deleted paragraphs (in base, absent in revised) wrapped in w:del.

  • Inserted paragraphs (in revised, absent in base) wrapped in w:ins.

  • Modified paragraphs (1:1 replacement) get word-level del+ins inline.

The output is a valid DOCX readable in Word/LibreOffice showing the changes as tracked revisions.

Args: base_path: Path to the original DOCX. revised_path: Path to the revised DOCX. output_path: Destination path. Auto-generated if empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_pathYes
revised_pathYes
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Describes the paragraph-level LCS diff algorithm in detail, including handling of unchanged, deleted, inserted, and modified paragraphs. No annotations provided, so description carries full burden; it covers key behavioral aspects but lacks info on error handling or file size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, but algorithm details are lengthy and may be trimmed. Bullet points help readability, but some redundancy exists.

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 diff tool with no annotations and an output schema, the description is fairly complete: explains behavior for each change type and notes output validity. No major gaps identified.

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

Parameters3/5

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

Input schema coverage is 0%, but description adds minimal value: repeats parameter names and notes output_path is auto-generated if empty. Could better explain parameter constraints or formats.

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?

Clearly states the tool diffs two DOCX files and produces a tracked-change document. Specific verb and resource, and distinguishes from sibling tools like compare_contracts and diff_to_text.

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?

Implies usage for comparing DOCX files but provides no explicit when-to-use or when-not-to-use guidelines, nor alternatives.

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/SecurityRonin/docx-mcp'

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