Skip to main content
Glama
moonie0201
by moonie0201

extract_pdf

Extract text, markdown, and tables from PDF URLs with optional OCR. Choose page, document, or RAG chunk output, and control page ranges to stay within budget.

Instructions

Extract text, markdown and ruled tables from PDFs at a URL, with optional Tesseract OCR for scanned pages. output_mode 'page' gives one row per page, 'document' one row per PDF with a pages array, 'chunk' gives RAG chunks of chunk_size characters with page and character offsets. page_range ('1-5', '8', '12-') and max_pages_per_pdf keep unwanted pages from ever being charged. Billed to your own Apify account at $0.0003 per delivered page and $0.003 per OCR page; max_pages is the hard spend cap for the whole run (1000 pages = $0.30, or $3.00 if ocr is on — OCR pages spend the same max_pages budget at 10x the price). That ceiling is also sent to Apify as the run's maximum total charge. Document summary rows, error rows and pages outside the range are free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocrNo
urlsYes
max_pagesYes
chunk_sizeNo
page_rangeNo
output_modeNopage
chunk_overlapNo
extract_tablesNo
include_markdownNo
max_pages_per_pdfNo
max_ocr_pages_per_pdfNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and meets it: it reveals the two-tier billing model ($0.0003/page, $0.003/OCR page), the hard spend-cap semantics of max_pages with a concrete example (1000 pages = $0.30 or $3.00 with OCR), that the ceiling is forwarded to Apify as the run's maximum charge, and that summary/error/out-of-range rows are free. This is exactly the behavioral context an agent needs before spending money.

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?

Purpose is front-loaded in the first sentence, then modes, cost-protection, and billing follow in logical order. The description is long, but every sentence carries non-obvious information — the pricing paragraph is essential for a paid tool and would be risky to trim. There is zero filler.

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?

For an 11-parameter paid tool with no annotations, the description covers the high-risk dimensions thoroughly: output shape per mode, page-range formats, the hard spend cap, and what is free vs billed. An output schema exists so return values need not be detailed, and the unmentioned parameters are low-risk booleans or bounded integers with obvious names.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates. It adds real meaning to the semantically complex parameters: output_mode (return shape per mode), page_range (explicit format examples '1-5', '8', '12-'), max_pages (spend cap), and max_pages_per_pdf (charge avoidance). A few parameters (chunk_overlap, extract_tables, include_markdown, max_ocr_pages_per_pdf) are left to their names and defaults, which are largely self-explanatory.

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 first sentence states a specific verb and resource: 'Extract text, markdown and ruled tables from PDFs at a URL', plus an optional capability (Tesseract OCR for scanned pages). The scope is unambiguous and naturally differentiates it from the unrelated siblings (youtube_thumbnails, sports_scores, tennis_scores, list_supported_utilities).

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?

Provides strong contextual guidance: when to enable OCR (scanned pages), how output_mode shapes the result ('page' one row per page, 'chunk' RAG chunks), and when page_range/max_pages_per_pdf apply (avoiding charges for unwanted pages). It stops short of explicit when-not-to-use statements, but no sibling tool competes with PDF extraction, so exclusions are not needed.

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/moonie0201/apify-utils-mcp'

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