Skip to main content
Glama

pdf_text_extract

Read-only

Extract text from a PDF: url or base64 data. No OCR — text-based PDFs only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPDF URL (alt. to data).
dataNoBase64 PDF, ≤5MB decoded (alt. to url).
headersNoHeaders to forward (Authorization, Cookie…).
maxCharsNoDefault 20000, max 100000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / data
      Added value: +{
      +  "description": "Base64 PDF, ≤5MB decoded (alt. to url).",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"PDF URL."New value: +"PDF URL (alt. to data)."
    • removedInput schema / required
      Removed value: -[
      -  "url"
      -]
  2. Changed3 schema fields changed
    • addedInput schema / properties / headers / description
      Added value: +"Headers to forward (Authorization, Cookie…)."
    • addedInput schema / properties / maxChars / description
      Added value: +"Default 20000, max 100000."
    • addedInput schema / properties / url / description
      Added value: +"PDF URL."
  3. Changed1 schema field changed
    • addedInput schema / properties / headers
      Added value: +{
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • removedInput schema / properties / maxChars / description
      Removed value: -"Max characters to return (default 20000, max 100000)."
    • removedInput schema / properties / url / description
      Removed value: -"URL of the PDF to fetch (http/https). Must be a PDF file."
  5. First observed

TDQS

A4/5.0
Behavior3/5

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

The readOnlyHint annotation already indicates a safe read operation, lowering the burden. The description adds the meaningful limitation that OCR is not supported, which is valuable behavioral context. However, it does not disclose other behavioral traits such as error handling, rate limits, or what happens when a PDF cannot be parsed, so it offers moderate value beyond annotations.

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 extremely concise: two short sentences, no filler. The key information (what it does, input methods, and the OCR limitation) is front-loaded and every word earns its place. Ideal structure for quick agent parsing.

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 relatively simple extraction tool, the description covers the core function, input alternatives, and the critical OCR limitation. The absence of an output schema means the description could have specified the return format, but the tool name and verb 'extract text' make it reasonably clear. The optionality of parameters (with no required fields) is not fully clarified, but the description implies at least one of url or data must be provided.

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%, so the baseline is 3. The description's mention of 'url or base64 data' mirrors the schema fields but adds little beyond what the schema already states. It does not enrich understanding of headers or maxChars beyond their schema descriptions, so no extra semantics are provided.

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 extracts text from PDFs, with the specific input methods of URL or base64 data. It distinguishes itself from sibling tools like fetch_extract or html_to_markdown by specifying PDFs and the OCR limitation, making its purpose unmistakable.

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 a clear exclusion: 'No OCR — text-based PDFs only,' signaling when not to use this tool (scanned/image PDFs). However, it does not explicitly mention alternatives for those cases, nor does it elaborate on when to prefer one input method over the other, so it falls short of full explicit when/when-not guidance.

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.