Skip to main content
Glama

extract_pdf

Extract a PDF to clean Markdown/LaTeX text via MinerU (great for papers behind no open-access full text — give the user's PDF and get readable text back). Provide pdf_url (downloaded server-side, SSRF-guarded) OR pdf_base64. formula/table toggle math/table reconstruction. Returns {task_id, status, cached, content, chars}: a recently-seen (cached) or small PDF comes back with content in one call; a fresh PDF (MinerU is GPU-heavy, minutes) returns status='running' + a task_id — then call extract_pdf_result(task_id) to fetch the text.

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": "extract_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableNo
formulaNo
pdf_urlNo
pdf_base64No

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses server-side download with SSRF guarding, caching behavior, that MinerU is GPU-heavy and takes minutes, and the two possible return shapes (inline content vs. running task). It also names the exact response fields, so the agent knows what to expect before invoking.

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?

Front-loaded with the verb and purpose, then the input options, then the async return contract — a sensible order. The sentences are dense with nested parentheses and run long, but nearly every clause (caching, GPU cost, task_id hand-off) carries information the agent needs.

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

Completeness5/5

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

For a four-parameter, no-annotation, no-output-schema tool, the description covers everything the caller needs: input alternatives, feature toggles, the cached-vs-fresh decision, latency expectations, and the full return shape. The absence of an output schema is fully compensated by the inline field listing.

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 description coverage is 0%, so the description must compensate, and it largely does: pdf_url is explained as a server-side, SSRF-guarded download and pdf_base64 as the alternative input path, while formula and table are tied to math/table reconstruction. It never states that formula and table default to true, so the "toggle" wording leaves the default direction implicit.

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 ("Extract a PDF to clean Markdown/LaTeX text via MinerU") and immediately scopes it to a use case (papers with no open-access full text). It also distinguishes itself from the sibling extract_pdf_result by assigning that tool the follow-up fetch role, so an agent can route without opening either 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?

Gives a clear trigger (user has a PDF whose full text isn't openly available) and a precise hand-off rule: if status='running' with a task_id, call extract_pdf_result(task_id). It does not discuss when to prefer a lighter sibling such as read_paper for already-parsed sources, which keeps it short of a full when/when-not statement.

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.