Skip to main content
Glama

doc_tools_pdf_text

Extract the text of a PDF in reading order, page by page, with its metadata (title, author, dates) and page sizes. Says which pages are scans with no text layer. Price: $0.02 USDC via x402, charged only on success. Part of Document tools: Work with PDFs and scans: read the text out of a PDF with page numbers and metadata, recognize the text in a scan, photo or screenshot, merge PDFs, take or reorder pages, split into parts, and turn images into a PDF..

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

Input Schema

NameRequiredDescriptionDefault
pdfNoPDF file as base64.
pagesNoPages to read, like "1-5". All when omitted.
pdfUrlNoLink to the PDF.
maxCharsNoCut the inline text at this length; the file always has all of it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose real behavior: reading order, page-by-page output, metadata and page-size reporting, scan detection, and an explicit cost model ($0.02 USDC via x402, charged only on success). However, it omits error/failure behavior, input size limits, and the shape of the returned text, which matter for a paid read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first two sentences are front-loaded and efficient. The trailing 'Part of Document tools' catalog sentence is long boilerplate that largely restates this tool's own function and pads the definition without adding selection value.

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 read-only extraction tool with no annotations and no output schema, the definition covers purpose, ordering semantics, metadata fields, scan detection, and pricing, which is enough to invoke it correctly. It stops short of describing the returned structure or failure modes, which is the remaining gap given no output schema exists.

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 pdf, pages, pdfUrl, and maxChars are already well documented, including the note that truncation only affects inline text and the file retains everything. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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?

The description gives a specific verb and resource ('extract the text of a PDF in reading order, page by page') plus scope details (metadata, page sizes, flags scan-only pages). Its scan-flagging clause implicitly separates it from doc_tools_ocr, but no sibling is named explicitly, so differentiation requires a small inference.

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 only implied: mentioning that it reports pages with no text layer hints that scanned documents need doc_tools_ocr instead, but the description never states when to choose this tool or when to switch. The 'Part of Document tools' sentence lists capabilities without telling the agent when to pick which.

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