Skip to main content
Glama

mint utilities

PDF text extractor

pdf_text
Read-onlyIdempotent

Extract the text of a PDF page by page, with page selection and an optional layout-preserving mode. 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}], chars}; meta.note when the PDF has no text layer.

Input Schema

TableJSON 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).
layoutNoPreserve the visual layout (columns, spacing) instead of reading order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, non-destructive); the description adds genuinely new behavior: the credit formula ceil(pages/20) with a minimum of 1, the accepted input encodings, the return shape, and the fallback signal (meta.note) for PDFs with no text layer. That is cost, encoding, and edge-case disclosure well beyond structured fields.

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 purpose, then cost, input, and output in compact fragments; every piece carries information. The telegraphic 'File input (file): ... Output: JSON. {...}' style is dense but not padded, costing only a little readability.

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 return structure ({page_count, pages, chars}) and the no-text-layer note, plus pricing and accepted input forms. Nothing needed to call this three-parameter tool correctly is missing.

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 the schema already documents 'file', 'pages', and 'layout'. The description restates the same input formats and page-range idea without adding syntax or constraints the schema lacks (e.g., 10 MB cap lives only 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') and immediately names its two distinguishing capabilities (page selection, layout-preserving mode). An agent can separate it from pdf_info, pdf_merge, and pdf_split without opening any 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 credit-cost formula, which nudges toward narrow page ranges, but there is no explicit when-to-use statement and no named alternative (e.g., pdf_info for metadata only). A reader must infer the selection criteria.

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