Skip to main content
Glama

pdf_compare

Read-onlyIdempotent

Compare two PDFs page by page to detect text differences. Reports identical pages and trimmed diffs for same-layout documents.

Instructions

Compare two PDFs page by page (by absolute page index) and report text differences. Returns identical:true when text matches. Diffs content-stream-order text (not visual reading order), so it is best for same-layout documents; reflowed or multi-column PDFs produce noisy diffs. Inserting/deleting a page shifts all later pages and reports them as changed. Large diffs are trimmed (truncated:true) to fit the response limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathAYesAbsolute path to the first (baseline) PDF file
filePathBYesAbsolute path to the second (comparison) PDF file
pagesNoPage range to compare, e.g. '1-5' or '1,3,5'. Defaults to all pages.
Behavior5/5

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

Beyond annotations (readOnlyHint, destructiveHint, etc.), the description discloses that diffs are based on content-stream order, returns identical and truncated flags, and that large diffs are trimmed. No contradictions with annotations.

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?

Four sentences front-load the purpose and output, then cover limitations and edge cases. Every sentence adds necessary information without redundancy or fluff.

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 comparison tool with no output schema, the description covers purpose, output flags (identical, truncated), and key limitations. It could be more specific about the output format, but given the complexity, it is sufficiently complete.

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 descriptions for all parameters. The description adds context about 'absolute page index' and 'page by page', enhancing understanding of the pages parameter, but the schema already covers the basics.

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 specifies the verb 'compare', the resource 'two PDFs', and the method 'page by page by absolute page index', which distinguishes it from other PDF tools that do not perform comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states that the tool is best for same-layout documents, warns about noisy diffs with reflowed or multi-column PDFs, and explains the effect of inserting/deleting pages. This provides clear when-to-use and when-not-to-use guidance.

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/AryanBV/pdf-toolkit-mcp'

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