Skip to main content
Glama

extract_pdf_images

Read-onlyIdempotent

Extract figures, charts, logos, and scanned page bitmaps from a PDF, with page numbers, dimensions, format, and size. Optionally include base64 image data for saving or further processing.

Instructions

List and optionally export the images embedded in a PDF — figures, charts, logos and scanned page bitmaps — with page number, pixel dimensions, format and size. Set include_base64=true to get the actual image data (each up to 2 MB) for saving or further processing. Duplicate images are reported once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the document to fetch and convert. Leave empty when passing file_base64 instead.
pagesNo1-based page selection like '1,3-5'. Empty means all pages.
filenameNoOriginal filename with extension (e.g. 'report.docx'). Used as a format hint when content type cannot be detected automatically.
passwordNoPassword for encrypted PDFs. Empty for normal files.
max_imagesNoMaximum images to return (default 20, max 50).
file_base64NoBase64-encoded file content (for documents not reachable by URL). Decoded size limit: 30 MB. Leave empty when passing url instead.
include_base64NoInclude base64 content for each image up to 2 MB (default false: metadata only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark this as read-only and idempotent, so the description's added details about returned metadata fields, duplicate image deduplication, and the 2 MB per-image base64 limit are genuinely useful. It sets clear expectations beyond what the annotations or schema already convey.

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 concise sentences with the core capability front-loaded, followed by optional behavior and a useful deduplication note. There is no filler or redundant repetition of schema content.

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 a 7-parameter read-only tool with 100% schema coverage and no output schema, the description is complete: it specifies what the returned metadata includes, how to get image data, the size cap, and duplicate handling. Other details like page selection and max_images are already covered by the schema.

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 description coverage is 100%, so the baseline is 3. The description adds a purpose clause for include_base64 ('for saving or further processing') and clarifies the list-vs-export distinction, but it does not materially enrich the meaning of the parameters beyond what the schema already documents.

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 opens with a specific verb+resource: 'List and optionally export the images embedded in a PDF,' and adds concrete content examples like figures, charts, logos, and scanned page bitmaps. This makes the tool clearly distinct from siblings such as extract_pdf_tables and read_pdf_pages.

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?

It clearly states the tool's context: listing/exporting embedded images, and explicitly explains the include_base64=true path 'for saving or further processing.' It does not name alternatives or list exclusion criteria, but the use case is unambiguous enough that an agent can select it correctly.

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