Skip to main content
Glama

compare_documents

Compare two DOCX files and generate a document showing tracked changes. Highlights differences at paragraph and word level.

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
output_pathNo
revised_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries full burden and fully discloses behavior: paragraph-level LCS diff, handling of unchanged/deleted/inserted/modified paragraphs, and output format (valid DOCX with tracked changes).

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 concise and well-structured, front-loading the purpose and using clear formatting (line breaks, indentation) to present parameters. Every sentence adds value without redundancy.

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 description is complete for a diff tool with an output schema. It explains the algorithm, parameter details, and output format. All aspects of usage are covered, leaving no significant gaps.

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?

Schema description coverage is 0%, so the description must compensate. It provides detailed explanations for base_path, revised_path, and output_path, including auto-generation behavior for output_path, adding significant value beyond the schema.

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 'Diff two DOCX files and produce a tracked-change document,' using a specific verb and resource. It distinguishes from the sibling 'compare_contracts' by specifying DOCX files.

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 explains what the tool does but does not explicitly state when to use it versus alternatives like compare_contracts or other diff tools. No guidance on when not to use it.

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

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