Skip to main content
Glama

document_compare

Read-onlyIdempotent

Compare two PDF, DOCX, MD, or TXT documents to identify missing, added, changed, or incomparable text, numbers, identifiers, structure, and page-count differences. Read-only.

Instructions

Compare two documents (any of PDF, DOCX, MD, TXT) through their canonical forms: missing, added and changed text, numbers and identifiers, structure and page-count differences, and what could not be compared. Read-only. [docbridge schema 0.2.4]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailNosummary: report_summary + report_id (get_report has the rest). full: the whole report inline.summary
left_pathYesAbsolute file path.
right_pathYesAbsolute file path.
left_encodingNoText encoding of a .md/.txt input. Omit for UTF-8; docbridge never guesses.
right_encodingNoText encoding of a .md/.txt input. Omit for UTF-8; docbridge never guesses.
max_differencesNoDifferences kept in the full report; the rest are counted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
errorNo
reportNoThe full report. Over MCP only with detail='full'.
outputsNo
report_idNoPass to get_report for the full report (held for this server session).
disclaimerNodocbridge never alters, summarizes or silently truncates source evidence. docbridge reports what it compared. PASS on an axis covers only that axis's stated scope; NOT_CHECKED and UNSUPPORTED are never passes. PDF text is the text layer as PyMuPDF decodes it, not the rendered glyphs. Nothing here interprets meaning: numbers are compared as characters, not as values.
report_pathNo
report_summaryNo
schema_versionYes
conversion_notesNo
operation_completedYesThe operation ran and wrote its outputs. Says NOTHING about fidelity: read the report status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.4

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description still adds real context by disclosing that comparison happens on canonical forms and that uncomparable content is reported, plus a schema-version tag; it does not repeat destructive details, but that is unnecessary here.

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?

A single dense sentence front-loads the action and the artifact list, followed by a short read-only note and version tag. No wasted prose, though the long enumeration of comparison outputs is slightly heavy for one sentence.

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?

With six parameters, 100% schema coverage, an output schema, and full annotations, the definition covers what an agent needs to call it correctly. The only shortfall is the absence of routing guidance between this tool and near-neighbors such as document_read or get_report.

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?

Schema description coverage is 100%, including the `detail` enum and encoding behavior, so the schema carries the parameter burden. The description adds no syntax or format guidance for left_path/right_path/encodings/max_differences beyond what the schema already states, matching the baseline of 3.

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?

Names a specific verb (Compare) and resource (two documents of PDF/DOCX/MD/TXT) and spells out the comparison dimensions produced: missing/added/changed text, numbers and identifiers, structure, page-count, and uncomparable content. This is clearly distinct from siblings like document_search, document_read, or document_outline.

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 establishes that this is a read-only comparison but never states when to prefer it over siblings such as document_search or document_read, nor any preconditions or exclusions. The `detail` parameter's link to get_report is only explained in the schema, not the description.

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