Skip to main content
Glama
pdf4me
by pdf4me

extract_resources

Extract text and embedded images from a PDF, saving them as separate text and image files for reuse.

Instructions

Extract text and/or embedded images from a PDF via PDF4me ExtractResources (/api/v2/ExtractResources). pdf_file_path, extract_text, extract_images; optional output_dir (defaults next to PDF). Writes extracted_resources.json, extracted_text.txt when text is extracted, and image files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirNo
extract_textNo
pdf_file_pathYes
extract_imagesNo
request_doc_nameNo
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose side effects: writes extracted_resources.json, extracted_text.txt, and image files, plus output_dir defaults. However, it does not mention permissions, overwrite behavior, network requirements, or failure cases, leaving gaps.

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 three tight sentences: main purpose, key parameters, and outputs. No filler or redundant information. The API endpoint is included but does not bloat the description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 5 parameters, 0% schema coverage, no annotations, and no output schema. The description covers the main behavior and outputs but omits request_doc_name and does not explain return values or error scenarios, making it only partially complete.

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?

The description adds meaning for pdf_file_path, extract_text, extract_images, and output_dir (defaults next to PDF), and describes output file behavior. However, request_doc_name is completely unmentioned, and schema coverage is 0%, so not all parameters are compensated for.

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 the tool extracts text and/or embedded images from a PDF, specifying the exact action (extract), resource (PDF), and content types. This distinguishes it from sibling tools like extract_pages_from_pdf or extract_table_from_pdf.

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?

The usage is implied by the function description — if you need to extract text and images from a PDF, this is the tool. However, there is no explicit when-to-use vs alternative guidance, no prerequisites, and no mention of when not to use it.

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/pdf4me/pdf4me-mcp'

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