Skip to main content
Glama

pdf_text_extract

Fetch a PDF from a URL and extract its text content. Returns clean plain text, handling compressed and encrypted PDFs.

Instructions

Fetch a PDF from a URL and extract its text content. Handles FlateDecode-compressed streams and RC4-encrypted PDFs that open with an empty password. Returns clean plain text. Returns an error if the URL is unreachable, the response is not a PDF, or the PDF is password-protected with a non-empty password. Has no side effects. Works on text-based PDFs (Word, LaTeX, web-generated); does NOT perform OCR on scanned/image-only PDFs. Use instead of loading raw PDF bytes into your context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the PDF to fetch (http/https). Must be a PDF file.
maxCharsNoMax characters to return (default 20000, max 100000).
Behavior5/5

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

Even without annotations, the description thoroughly discloses behavior: no side effects, handles FlateDecode and RC4 encryption with empty password, returns clean plain text, and errors on unreachable/non-PDF/password-protected PDFs. No contradictions.

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?

Three sentences, all valuable. First sentence states primary action, second adds specifics on handling, third contrasts with alternatives. No redundancy.

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?

Given two parameters (well-documented), no output schema, and no annotations, the description covers purpose, usage, error handling, limitations (no OCR), and side effects. Fully sufficient for an agent to decide when to invoke.

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 baseline is 3. The description does not add new meaning beyond schema descriptions for parameters, but the schema itself is clear. The description supplements context on default maxChars and error handling, but parameter semantics are adequately covered by schema.

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?

Clearly states the tool fetches a PDF from a URL and extracts text, distinguishes from siblings by advising to use instead of loading raw PDF bytes. Handles specific compression and encryption, and explicitly states it does not perform OCR on scanned PDFs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Provides explicit when-to-use (text-based PDFs), when-not-to-use (scanned/image-only PDFs), error conditions (unreachable URL, non-PDF, password-protected with non-empty password), and a sibling alternative suggestion: 'Use instead of loading raw PDF bytes into your context'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server