Skip to main content
Glama

Read PDF Images

read_images
Read-onlyIdempotent

Extract embedded images from a PDF file as base64-encoded data with metadata including dimensions and color space. Supports page range selection.

Instructions

Extract images from a PDF document as base64-encoded data.

Extracts embedded images from specified or all pages. Returns image metadata (dimensions, color space) along with raw pixel data in base64.

Args:

  • file_path (string): Absolute path to a local PDF file

  • pages (string, optional): Page range. Format: "1-5", "3", or "1,3,5-7". Omit for all pages.

Returns: Array of extracted images with: page number, index, width, height, color space (RGB/RGBA/Grayscale), bits per component, and base64-encoded data.

Note: Large images may produce very large responses. Use the pages parameter to limit scope.

Examples:

  • Extract all images: { file_path: "/path/to/doc.pdf" }

  • Extract from page 1: { file_path: "/path/to/doc.pdf", pages: "1" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to a local PDF file (e.g., "/path/to/document.pdf")
pagesNoPage range to process. Format: "1-5", "3", or "1,3,5-7". Omit for all pages.
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds behavioral details like returning metadata and base64 data, and warns about large responses, which goes beyond the annotations.

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 well-structured with a brief intro, Args, Returns, Note, and Examples sections. It is front-loaded with the main purpose and every sentence adds necessary information without 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?

Even without an output schema, the description explains the return structure in detail (page number, index, dimensions, color space, bits per component, base64 data). Combined with thorough annotations, the description is complete for a read-only extraction tool.

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 100%, so the schema already documents both parameters. The description adds value by specifying the format for the pages parameter and providing examples, which justifies a score above the baseline of 3.

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 'Extract images from a PDF document as base64-encoded data,' which is a specific verb+resource combination. It distinguishes from sibling tools like read_text or extract_tables by focusing on images.

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 provides examples and notes on using the pages parameter to limit scope, and mentions that large images may produce large responses. It does not explicitly state when not to use this tool, but the context is clear.

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/shuji-bonji/pdf-reader-mcp'

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