Skip to main content
Glama

generate_image

Generate an image from a text prompt. Choose from dedicated or native image-output models. The image is saved to disk and opened in your default viewer.

Instructions

Generate an image from a text prompt. The image is saved to disk (~/Pictures/ask-another by default), opened in the system default image viewer, and a preview is also returned in the tool result.

Where to view the generated image:

  • It pops open in your system image viewer automatically. Disable with OPEN_GENERATED_IMAGES=false if you don't want that.

  • The full-resolution file is at the path shown in the "Saved to:" message (open it directly for full quality).

  • In Claude Desktop, the inline preview lives inside the collapsed tool-use details — click to expand the tool call to see it. The chat does not render the preview as a top-level message.

Two model types are supported — the tool picks the right path automatically:

  • Dedicated image models (gpt-image-1, dall-e-3, imagen-4): best control over size and quality.

  • Native image-output models (gemini-*-image / "Nano Banana"): can interleave text and images, good for diagrams or annotated visuals.

Args: model: Model to use (e.g. 'openai/gpt-image-1', 'gemini/gemini-2.5-flash-image'). Use search_models with 'image' to find available image models. prompt: Text description of the image to generate. size: Image dimensions. Only used by dedicated image models — ignored by native image-output models. Common values: '1024x1024' (square), '1536x1024' (landscape), '1024x1536' (portrait). Valid options depend on the model. Omit to use the model's default. quality: Image quality. Only used by dedicated image models — ignored by native image-output models. For gpt-image-1: 'low', 'medium', 'high'. For dall-e-3: 'standard', 'hd'. Omit for the model's default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
modelYes
promptYes
qualityNo
Behavior4/5

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

With no annotations, the description carries the full burden. It covers key behaviors: file saving, auto-open, preview return, and model-specific behavior for size/quality. Minor gaps: no mention of error handling or file overwrite policy, but overall transparent.

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?

Well-structured with clear sections: purpose, where to view, model types, and parameter details. Every sentence adds value. Front-loaded with essential information.

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 complexity (multiple models, output behaviors) and no output schema, the description covers generation process, output locations, preview, and parameter constraints. Missing error handling or file naming details, but adequate for most use cases.

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

Parameters5/5

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

Schema description coverage is 0%, but the Args section thoroughly explains each parameter: model (with model search hint), prompt, size (with when used and examples), quality (with specific values per model). This adds significant meaning beyond the schema.

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 tool generates an image from a text prompt and lists specific actions: saves to disk, opens in viewer, returns preview. It distinguishes from sibling tools (e.g., search_models) which are unrelated to image generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives or when not to use it. While it explains model types and viewing options, it does not provide context for tool selection among siblings.

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/matthewgjohnson/ask-another'

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