Skip to main content
Glama

generate_and_download_image

Generate an image from a text prompt and immediately download it, receiving the image as base64 or saving to a file. Combines generation and download in one operation.

Instructions

Generate an image and automatically download it. This combines generate_image and download_image into a single operation. Returns the image as base64 or saves to a file. Best for when you want the image data immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoImage size (e.g., "1280x1280", "1568x1056")1280x1280
modelNoModel to use for generationglm-image
outputNoOutput format: "base64" returns the image data directly, "file_output" saves to diskbase64
promptYesText description of the image to generate
qualityNoQuality level: "hd" (more detailed, ~20s) or "standard" (faster, ~5-10s)
user_idNoUnique end user ID for abuse prevention (6-128 characters)
max_waitNoMaximum seconds to wait for image generation (default: 120)
file_outputNoAbsolute path to save the image file (required if output is "file_output"). Example: /path/to/image.png
poll_intervalNoSeconds to wait between polling for async results (default: 3)
Behavior3/5

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

With no annotations, the description carries full burden. It mentions the combined operation and output formats but does not explain polling behavior, potential waiting, or side effects. Parameters like max_wait and poll_interval hint at async behavior, but the description lacks explicit disclosure.

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 sentences with no redundancy. It front-loads the core action, then clarifies the combination, and ends with output format. Every sentence is necessary and earns its place.

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

Completeness2/5

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

Given the tool has 9 parameters and no output schema, the description is too minimal. It omits details about the async/polling behavior, how to use the output format, and the requirement for file_output path when output is 'file_output'. The presence of sibling tools like generate_image_async and get_async_result further highlights the need for clearer behavioral context.

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 baseline is 3. The description adds no additional meaning beyond the schema's parameter descriptions. Each parameter is adequately described in the schema, so no further elaboration is needed.

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 that this tool generates and downloads an image in a single operation, combining generate_image and download_image. It distinguishes itself from sibling tools by explicitly naming the combination and indicating it's best for immediate image data needs.

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 a clear usage context ('Best for when you want the image data immediately'). It does not specify when to avoid using it or when to prefer the separate sibling tools, but the combined nature implies a convenience trade-off.

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/GeorgH93/z_ai_image_gen_mcp'

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