Skip to main content
Glama

pdf_repair

Scan damaged PDF binary objects and reconstruct broken/truncated XRef tables and trailers via pdf-lib.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pdf_repair"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputPathNo
base64DataNo
outputPathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It hints at reconstruction but never says whether the source file is modified in place, whether outputPath is required for any repair to be persisted, or whether truncation means unrecoverable data loss — all decision-critical for a write-capable repair tool.

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 front-loaded sentence with no wasted words; the technical detail is dense but relevant. It is compact rather than padded, though compactness comes at the cost of the missing details noted elsewhere.

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?

For a mutation tool with zero annotation coverage, three undescribed parameters, and no output schema, the description is far too thin — an agent knows what the tool attempts but not how to feed it or where results land. The mutual exclusivity of inputPath/base64Data and the role of outputPath are unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across three parameters, and the description adds nothing about inputPath, base64Data, or outputPath — most importantly it never explains that the two input sources are alternatives or which takes precedence. The description cannot compensate for an entirely undocumented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb pair ('Scan... reconstruct') and a specific resource ('damaged PDF binary objects', 'XRef tables and trailers'), which clearly separates it from a sibling like pdf_compliance_audit. It stops short of explicitly naming the alternative repair path, but the resource is specific enough to route on.

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?

Usage is implied by the adjective 'damaged' — an agent can infer this is the tool for corrupted/truncated PDFs — but there is no explicit statement of when to prefer it over sibling pdf tools or what preconditions must hold (e.g. file must be a PDF at all).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources