Skip to main content
Glama

pdf_text_extract

Extract text from any text-based PDF by providing its URL. Handles common compressions and empty-password RC4 encryption, returning clean plain text.

Instructions

Fetch a PDF from a URL and extract its text content. Handles FlateDecode-compressed streams (the most common compression in modern PDFs) and RC4-encrypted PDFs that open with an empty password. Works on text-based PDFs (those generated from Word, LaTeX, web, etc.); does not perform OCR on scanned/image-only PDFs. Returns clean plain text — 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).
Behavior3/5

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

With no annotations, the description carries full burden. It discloses handling of common compression and encryption, and the OCR limitation, but does not mention error scenarios, rate limits, authentication, or behavior when PDF exceeds maxChars. Adequate but missing some behavioral context.

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 concise (four sentences), front-loaded with the primary action, and well-structured: purpose, technical details, limitation, and recommendation. No wasted words.

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 two-parameter tool without output schema, the description covers key aspects: action, supported PDF types, limitations, and usage guidance. Missing error handling details but sufficient for typical use.

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 mentions maxChars limit and return type, but does not add significant meaning beyond the schema. The technical details about compression/encryption are useful but not parameter-specific.

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 it fetches a PDF from a URL and extracts text content, specifying the verb and resource. It distinguishes itself from siblings like fetch_extract or html_to_markdown by focusing on PDF text extraction, and adds technical context about handling FlateDecode and RC4 encryption.

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 explicitly states when to use (text-based PDFs) and when not to use (scanned/image-only PDFs), and recommends it over loading raw PDF bytes. However, it does not explicitly mention alternatives among siblings for similar tasks.

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