Skip to main content
Glama

get_next_image

Retrieve the next generated image from an ongoing batch session. Returns immediately if available or waits with timeout for pending images.

Instructions

Get the next available image from a batch generation session.

This tool retrieves the next image from an ongoing batch generation. If an image is already available, it returns immediately. Otherwise, it blocks until an image becomes available or timeout.

Args: session_id: Session ID from start_image_batch. timeout: Maximum time to wait for an image (seconds, 1-300).

Returns: Dictionary with file_path, has_more flag, and pending_count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden and does so well by disclosing key behavioral traits: it can return immediately if an image is available, blocks otherwise, includes a timeout mechanism, and describes the return structure. However, it does not mention potential errors, rate limits, or authentication needs, leaving some gaps.

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 front-loaded with the core purpose, followed by behavioral details and parameter explanations in a structured format. Every sentence adds value without redundancy, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (blocking behavior, timeout), no annotations, and an output schema that covers return values, the description is largely complete. It explains the tool's purpose, behavior, and parameters well, but could improve by mentioning error cases or dependencies on sibling tools more explicitly.

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 0%, so the description must compensate, and it does by explaining both parameters: 'session_id' is linked to 'start_image_batch', and 'timeout' specifies the range and default behavior. This adds meaningful context beyond the bare schema, though it could detail format constraints for 'session_id'.

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 the specific action ('retrieves the next image'), resource ('from an ongoing batch generation session'), and distinguishes it from siblings like 'get_batch_status' (which likely provides status without retrieving images) and 'start_image_batch' (which initiates rather than retrieves). The verb 'get' combined with 'next available image' precisely defines its function.

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 clear context for when to use it ('from an ongoing batch generation session') and references a prerequisite ('session_id from start_image_batch'), but does not explicitly state when not to use it or name alternatives like 'get_batch_status' for checking status without retrieval. This gives good guidance but lacks explicit exclusions.

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/adamryczkowski/Imagen-MCP'

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