Skip to main content
Glama

pdf_repair

Attempts to repair corrupted or malformed PDF files by parsing with leniency, recovering pages, and re-saving to a clean document.

Instructions

Attempt to repair a damaged or malformed PDF by loading it with lenient parsing, copying all recoverable pages to a clean document, and re-saving. May fix issues like corrupted cross-reference tables or orphaned objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the damaged PDF
outputPathYesPath for the repaired PDF
Behavior4/5

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

With no annotations provided, the description carries full burden. It explains the repair process (lenient parsing, copying recoverable pages, re-saving) and gives examples of fixed issues (corrupted cross-reference tables, orphaned objects). This provides good insight into behavior.

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?

The description is a single sentence that front-loads the purpose. It is efficient with no wasted words, though it could be broken into two sentences for slightly better readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks information about what the tool returns (e.g., success indicator, new file path) and does not mention error cases. Since there is no output schema, the description should cover these gaps.

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?

The input schema already describes both parameters (filePath, outputPath) with clear text. The description adds little beyond restating those paths. Baseline 3 is appropriate given 100% schema coverage.

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 the tool's purpose: repairing damaged PDFs. The verb 'repair' and resource 'PDF' are specific, and it distinguishes from siblings (e.g., pdf_validate, pdf_create) by focusing on malformed 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 implies use when a PDF is damaged or malformed, but it does not explicitly state when to use this tool versus alternatives like pdf_validate or when it is not appropriate. No exclusions or alternative tool names are mentioned.

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/beepboop2025/pdf-suite-mcp'

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