Skip to main content
Glama

Compare two PDFs

pdf_compare
Read-onlyIdempotent

Compare two PDF versions page by page to see which pages changed, were added or removed, and which words were removed or added.

Instructions

Compare the text of two versions of a PDF page by page: which pages changed, were added or removed, and the words that changed, marked [-removed-] and {+added+}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesPath to the revised PDF inside an allowed folder.
beforeYesPath to the earlier PDF inside an allowed folder.
max_charsNoMost characters of marked text returned per page.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYes
summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description adds genuine value beyond that by disclosing the output convention — the [-removed-] and {+added+} markers — which is non-obvious and would otherwise have to be discovered from the output schema.

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?

A single sentence, front-loaded with the core action and followed by a tight colon-delimited list of what it reports. No wasted words.

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?

For a simple two-path comparison tool with an output schema present and full schema coverage, the description says everything the agent needs: the inputs' roles, the granularity, and the diff notation. Nothing material is missing.

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 coverage is 100%: before, after, and max_chars are all documented in the schema, including the per-page character cap. The description adds no meaning beyond the schema, so the baseline 3 applies.

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?

States a specific verb (compare) and resource (text of two PDF versions) plus the scope (page by page). The added detail of what the output reports — changed/added/removed pages and words — distinguishes it from read-oriented siblings like pdf_read_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?

The purpose implies when to use it (differencing two revisions of the same document), but no explicit when-to-use/when-not guidance or named alternatives are given. Adequate but no routing help among the large pdf_* sibling set.

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