Skip to main content
Glama
pdf4me
by pdf4me

repair_pdf

Repair damaged or corrupted PDF files by providing the local file path. Optionally specify an output directory and file name for the restored document.

Instructions

Repair a damaged or problematic PDF using the PDF4me RepairPdf API. Provide the local file path to the PDF. Optionally specify an output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the PDF file to repair.
output_dirNo
output_file_nameNo
Behavior3/5

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

With no annotations, the description must carry the behavioral transparency burden. It discloses that the tool uses an external API and that output can be customized via directory/file name, but it does not disclose whether the original file is modified, whether authentication is required, or what the tool returns. This is a minimal level of disclosure.

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 two sentences, front-loads the purpose, and includes only essential information. No filler or redundancy.

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

Completeness3/5

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

The tool is simple, but with no annotations and no output schema, the description should at least indicate the outcome (e.g., whether a repaired file is saved and where). It mentions output options but not the return behavior or side effects, leaving a gap in contextual completeness.

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?

The schema covers only file_path (33% coverage), but the description adds meaning to all three parameters: explicitly identifies the file path, and clarifies that output_dir and output_file_name are optional with clear roles. This compensates for the low 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 function: 'Repair a damaged or problematic PDF' using a specific API. This is a specific verb+resource pairing that distinguishes it from sibling tools like compress_pdf or linearize_pdf.

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

Usage Guidelines4/5

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

The description provides clear context by specifying when to use it (for damaged or problematic PDFs) and how to invoke it (provide local file path, optionally specify output). However, it does not explicitly mention alternatives or exclusionary cases, so it stops short of full when-not 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/pdf4me/pdf4me-mcp'

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