Skip to main content
Glama

Recover Markdown from a PDF

recover_markdown

Extract the exact Markdown source from a reversible PDF exported with embedded source, verified against its digest. Returns the text or writes it to a new .md file without changing the PDF.

Instructions

Gets back the exact Markdown source of a reversible PDF (one exported with the source embedded), checked against its digest. Returns the text, or writes it to a new .md file; the PDF is not changed.

Input Schema

NameRequiredDescriptionDefault
pdfYesA PDF exported with the source embedded (rayomd --embed-source)
outputNoA new .md file to write the source to (never replaces a file); left out, the Markdown is returned as text

Output Schema

NameRequiredDescriptionDefault
bytesYesBytes of Markdown recovered
inputYesThe PDF read
outputNoThe Markdown file written, when output was given
markdownNoThe recovered Markdown, when no output was given

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds real context beyond the annotations: the result is digest-checked, the write target is always a new .md file and never overwrites, and the source PDF is left untouched — which reconciles the apparently write-capable readOnlyHint=false with non-destructive intent. It doesn't say what happens when the digest check fails (error vs. partial output), which is the remaining behavioral unknown.

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?

One tight sentence front-loads the action, then the required input condition, then the output-mode distinction and the non-destructive guarantee. Every clause carries information, with no filler.

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 two-parameter tool with a full output schema, the description covers the input precondition, output destination semantics, and side-effect profile. The only omission is failure behavior on a digest mismatch or a non-embedded PDF, which an agent would want to know before relying on it.

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% and both parameter descriptions already state the embedded-source requirement and the 'never replaces a file' / 'returned as text if omitted' behavior, so the description largely restates the schema. Baseline 3 applies; no extra syntax or format guidance is added.

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 and resource (recover the Markdown source) plus the scoping precondition — only reversible PDFs exported with the source embedded. That precondition implicitly distinguishes it from the inverse sibling markdown_to_pdf, so an agent can select it without reading the schema.

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 'reversible PDF (one exported with the source embedded)' qualifier tells the agent exactly which inputs qualify, and the second clause contrasts returning text vs. writing a file. It stops short of naming what to do when the PDF lacks embedded source (e.g., use an extract/convert tool instead), so the exclusion is implied rather than routed.

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