Skip to main content
Glama

extract_images

Read-onlyIdempotent

Extract embedded PDF images as PNG content to view figures, charts, or photos, scaled to 1600 px and limited per call.

Instructions

Extract the embedded images of a PDF as PNG image content, scaled to at most 1600 px on the longer side, 10 per call by default and 8 MB in total. Soft masks are not returned as images. Use this when you need to see figures, charts, or photos embedded in a PDF document. Read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filename": "<filename>"
    },
    "name": "extract_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoOptional page number to extract images from. If omitted, extracts from all pages.
filenameYesThe document filename to extract images from
max_imagesNoMaximum images to return (default 10, at most 50). The description counts every image found.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.1
    • addedInput schema / properties / max_images
      Added value: +{
      +  "default": 10,
      +  "description": "Maximum images to return (default 10, at most 50). The description counts every image found.",
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint, so the safety profile is covered; the description adds real behavioral detail beyond them — downscaling to 1600 px, a 10-image default, an 8 MB total cap, and the exclusion of soft masks. It stops short of saying what happens when the caps truncate results.

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?

Three tight sentences, front-loaded with the action and output constraints, then the usage cue, then the read-only note. No filler or repetition.

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?

With no output schema, the description carries the burden of describing returns and does so: PNG image content, scaling rule, per-call and total size limits, and the soft-mask exclusion. An agent has enough to call it and interpret the result.

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 page, filename, and max_images are already documented. The description restates the default of 10 and adds the 8 MB aggregate limit, but contributes no new per-parameter meaning, so the baseline of 3 applies.

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?

States a specific verb and resource ('Extract the embedded images of a PDF') and immediately qualifies the output form (PNG, max 1600 px, 10 per call, 8 MB total), which separates it from siblings like extract_tables and read_image.

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?

Gives an explicit when-to-use condition: 'Use this when you need to see figures, charts, or photos embedded in a PDF document.' It does not name alternatives such as read_image or extract_tables, so the routing guidance is clear but not exhaustive.

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