Skip to main content
Glama

generate_image

Generate images with automatic provider selection for text-heavy graphics or photorealistic output. Supports custom sizes, reference images, and real-time data grounding.

Instructions

Generate an image using the best available provider.

Automatic Provider Selection: The server analyzes your prompt and automatically selects the best provider:

  • OpenAI GPT-Image-1 is auto-selected for:

    • Text-heavy images (menus, posters, infographics)

    • Comics with dialogue or speech bubbles

    • Technical diagrams with labels

    • Marketing materials requiring precise text

  • Gemini Nano Banana Pro is auto-selected for:

    • Photorealistic portraits and headshots

    • Product photography

    • High resolution (4K) output

    • Images using reference images for consistency

    • Real-time data visualization (weather, stocks)

Examples:

  • "Create a menu card for an Italian restaurant" → OpenAI (text rendering)

  • "Professional headshot with studio lighting" → Gemini (photorealism)

  • "Infographic explaining photosynthesis" → OpenAI (diagram + text)

  • "Product shot of perfume floating on water" → Gemini (product photography)

Override Selection: Set provider to 'openai' or 'gemini' to override auto-selection.

Args: params: Image generation parameters including prompt and optional settings.

Returns: Formatted response with image path and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations exist but are minimal (readOnlyHint=false, etc.). Description adds value by explaining auto-selection behavior and provider strengths. However, it does not disclose important behaviors like file saving (implied by output_path), potential latency, or cost implications. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with headings, lists, and examples. It is front-loaded with the main purpose. However, it is somewhat lengthy with provider comparisons that could be condensed. Overall, sentences earn their place.

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 complexity (multiple providers, many parameters, auto-selection), the description explains the selection logic and provides examples. It mentions override and return format. An output schema exists to handle return details. It is fairly complete for an agent to understand the tool's behavior.

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 coverage for the top-level param 'params' is 0% (no description), and the description only repeats 'Image generation parameters including prompt and optional settings' – adding no new meaning. While nested properties have descriptions in the schema, the description fails to compensate for the top-level lack of detail.

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 using the best available provider, with specific verb 'Generate' and resource 'image'. It distinguishes from siblings by focusing on single image generation with auto-selection, while siblings like 'edit_image' and 'conversational_image' imply different operations.

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?

The description provides detailed guidance on when to use each provider within the tool, but offers no guidance on when to choose this tool over sibling tools like 'edit_image' or 'generate_image_batch'. An agent would need to infer from the tool name and purpose.

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/michaeljabbour/imagen-mcp'

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