Skip to main content
Glama

vøiddo utilities

PDF text extractor

pdf_text
Read-onlyIdempotent

Extract the text of a PDF page by page as plain text or Markdown, with page selection, an optional layout-preserving mode and the document metadata. Cost in credits: ceil(pages extracted / 20), minimum 1. File input (file): base64 string, data: URI or {"url": "https://..."}. Output: JSON. {page_count, pages: [{n, text}] (Markdown: [{n, markdown}]), chars, metadata: {title, author, subject, keywords, creator, producer, created, modified}}; meta.note when the PDF has no text layer.

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF: base64 string (or data: URI) or {"url": "https://..."}. Up to 10 MB.
pagesNoPages to extract, e.g. '1-3,7' or '5-' (default: all pages).
formatNotext: the plain text of each page. markdown: headings, bold and italic, lists and paragraphs as Markdown, page headers and footers that repeat on most pages left out (layout does not apply).text
layoutNoPreserve the visual layout (columns, spacing) instead of reading order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered structurally. The description adds genuinely useful behavior beyond that: the credit cost formula (ceil(pages/20), minimum 1), the 10 MB input cap scope, and the meta.note edge case for scanned PDFs. Missing only retry/pagination or error semantics, which keeps it below a 5.

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 core action, then cost, input, and output in a compact sequence with no filler sentences. It is dense and somewhat run-on, packing four distinct concerns into one paragraph, but every clause carries information an agent needs given the absence of an output schema.

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?

With no output schema, the description compensates by spelling out the full JSON return shape (page_count, pages array, chars, metadata fields) and the markdown variant key. It also covers cost, input size limit and the no-text-layer case, so an agent has everything needed to call and interpret this tool.

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 description coverage is 100%, so each of the four parameters is already documented in the schema, and the description largely restates them (file formats, page selection, layout mode). It adds a little value by clarifying that markdown stripping of repeated headers/footers does not apply when layout is on, but that nuance also appears in the schema. Baseline 3 is appropriate.

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 the text of a PDF page by page') plus the two output modes, page selection and layout option. It is clearly distinguishable from pdf_info (metadata-oriented) and pdf_split/pdf_merge by emphasizing text extraction. No sibling does the same thing, so an agent can route to it without opening 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 Guidelines3/5

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

Usage is implied through the feature list and the note that a PDF without a text layer produces meta.note, which signals an OCR-gap case. However, it never says when to prefer this over pdf_info or what to do when no text layer exists (no OCR alternative named). Guidance is present but inferred rather than explicit.

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