Skip to main content
Glama

Generate an image

generate_image

Generates an AI image. COSTS CREDITS (call get_pricing: generate_* for Nano Banana 2.1, generate_pro_* for Nano Banana Pro, generate_gpt_* for GPT Image 2.5). Returns the image inline plus id and credits_remaining. Attach references with reference_asset_ids (up to 14). @slug in the prompt or entity_ids attach a saved entity's sheet (list_entities). Pick model for the job: Nano Banana 2.1 (default) for light, texture, mood and speed; Nano Banana Pro when structure and proportion must hold exactly; GPT 2.5 Flare for text you can actually read (labels, packaging, signs); GPT 2.5 Sunburst for the same with more care over references, slower. GPT tops out at 2K.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNogemini-nano-banana-2.1 = Nano Banana 2.1 (default), gemini-3-pro-image = Nano Banana Pro, gpt-image-2.5-flare = GPT 2.5 Flare, gpt-image-2.5-sunburst = GPT 2.5 Sunburst.
promptYesMax 16000 chars.
entity_idsNo
project_idYesRequired (no default on a hosted server).
resolutionNoGPT Image 2.5 renders 1K and 2K only.
aspect_ratioNo
reference_asset_idsNoUp to 14.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"gemini-3.1-flash-image = Nano Banana 2 (default), gemini-3-pro-image = Nano Banana Pro, gpt-image-2.5-flare = GPT 2.5 Flare, gpt-image-2.5-sunburst = GPT 2.5 Sunburst."New value: +"gemini-nano-banana-2.1 = Nano Banana 2.1 (default), gemini-3-pro-image = Nano Banana Pro, gpt-image-2.5-flare = GPT 2.5 Flare, gpt-image-2.5-sunburst = GPT 2.5 Sunburst."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "gemini-3.1-flash-image",
      -  "gemini-3-pro-image",
      -  "gpt-image-2.5-flare",
      -  "gpt-image-2.5-sunburst"
      -]New value: +[
      +  "gemini-nano-banana-2.1",
      +  "gemini-3-pro-image",
      +  "gpt-image-2.5-flare",
      +  "gpt-image-2.5-sunburst"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / entity_ids
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (non-read-only, non-destructive), yet the description adds substantial behavioral context: the call costs credits, returns the image inline plus id and credits_remaining, reference limit of 14, entity attachment semantics, and a model-specific resolution ceiling. That is exactly the value-add expected beyond structured fields.

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?

Front-loads purpose and the credit cost, then packs model guidance efficiently into one paragraph. A couple of clauses (model alias list, "up to 14") restate the schema rather than adding information, which is minor waste but keeps it from a 5.

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

Completeness5/5

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

For a 7-parameter mutation tool with no output schema, the description covers cost, return shape, reference mechanics, entity attachment, and model/resolution constraints. An agent has everything needed to invoke it correctly without opening other tools.

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?

With 71% schema coverage, the description still earns credit for explaining entity_ids (which has no schema description) via @slug and saved-entity sheets, and for clarifying the model ecosystem by family. It duplicates the schema's alias mapping and the "up to 14" limit, and leaves aspect_ratio unexplained, so it falls short of full compensation.

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?

States a specific verb+resource ("Generates an AI image") and immediately differentiates itself from siblings like expand_image, restyle, and generate_video by describing image generation from a prompt with references. The model-selection sentence further sharpens what kind of generation this is.

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?

Gives explicit guidance on how to pick a model for the job (light/texture vs strict proportion vs readable text) and points to get_pricing for credits. It does not, however, tell the agent when to prefer this tool over sibling image mutators such as expand_image or restyle, so tool-level routing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources