Skip to main content
Glama
ESPChong

context-retrieval

by ESPChong

extract_document_images

Extract embedded images from a PDF as base64 PNG, including page, dimensions, and size. Optionally inventory images without payloads to reduce transfer, returning metadata only for oversized files.

Instructions

Extract embedded images from a PDF as base64 PNG (PyMuPDF). Each image carries page, width, height and byte size. Set include_data=false to inventory images without transferring payloads; oversized images return metadata only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
pdf_pathYes
max_imagesNo
include_dataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It reveals output format, per-image metadata, the effect of include_data=false, and the oversized-image fallback behavior. This is substantial transparency, though it does not mention error behavior or side effects.

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 two sentences with no filler. The core action and output format are front-loaded, and the conditional behavior of include_data is stated efficiently. Every sentence contributes useful information.

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 description covers the primary behavior and return metadata well, and an output schema exists to define the return shape. However, the semantics of pages and max_images are left completely undocumented, and there is no guidance for choosing among extraction siblings. This leaves meaningful gaps for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for all parameters. It only clarifies include_data semantics; pages and max_images remain unexplained in both schema and description. This leaves an agent to guess the expected format or behavior of those parameters.

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 states a specific verb and resource: extract embedded images from a PDF, and specifies the output format as base64 PNG. It is clearly distinguished from sibling tools like extract_document_text and extract_document_tables without ambiguity.

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 description implies usage for image extraction and gives parameter-level guidance for include_data=false, but it does not explicitly state when to choose this tool over siblings or provide exclusion criteria. The context is clear enough for an agent, but explicit routing guidance is missing.

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

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/ESPChong/context-retrieval-system-RAG-MCP'

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