Skip to main content
Glama

get_document_image

Retrieve a document image by passing an image_path from get_page_content(), returning it as a viewable image block to interpret scanned pages or embedded visuals.

Instructions

Retrieve an image from a document — pass an image_path from a get_page_content() response: either an embedded image (from a content block) or a full rendered page (from the page_images array, useful when a page is scanned or its meaning depends on visual layout). Returns the image as an MCP image content block (base64 data + MIME type). Do NOT repeat the raw base64 value in your text response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_idNo
image_pathYesAn image_path from a get_page_content() response, passed back exactly as returned — never constructed or modified. Two sources: an embedded image_path (or img_path) on a content block, or a full-page image_path from the page_images array (format "<doc_name>/_page_images/page-<N>.jpg").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.2

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses the return format (MCP image content block with base64 + MIME) and warns not to repeat the raw base64 in text, but it does not mention absence of side effects, error behavior, or the role of folder_id. These are notable gaps but not severe for a read-style tool.

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 compact and every sentence adds value: what the tool does, where the input comes from, what the output is, and an important agent-behavior instruction. No fluff or repetition.

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

Completeness4/5

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

For a simple retrieval tool, the description covers the source of the input, the two use cases, the return format, and a critical interaction caveat. The main omission is the folder_id parameter, whose purpose is left undocumented, but the required path is complete enough for an agent to call the tool correctly.

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 image_path parameter is very well described in the schema, and the tool description adds useful context about when each source type is applicable. However, folder_id has an empty schema description and is never mentioned in the description, leaving half of the parameters unexplained. The critical required parameter is covered, but the optional one is not.

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 starts with a specific verb and resource: 'Retrieve an image from a document.' It further clarifies that image_path comes from get_page_content() and distinguishes embedded images from rendered page images, making the tool's function and relationship to siblings clear.

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 when to use the tool: pass an image_path from a get_page_content() response, and even guides which image_path to choose for scanned or layout-dependent pages. It does not explicitly name alternative tools or when-not-to-use scenarios, but the usage context is unambiguous.

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