Skip to main content
Glama

generate_image

Create or edit images from text prompts or up to 14 reference images, with options for aspect ratio, output format, and saving to a file.

Instructions

Generate an image using Google Nano Banana (Gemini) AI model. Can generate from text only, or use one or more reference images (up to 14) to guide generation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel to use: gemini-2.5-flash-image (fast) or gemini-3-pro-image-preview (high quality, default)gemini-3-pro-image-preview
promptYesText description of the image to generate or instructions for editing/combining reference images
imagePathsNoOptional array of file paths to reference images (up to 14). Supports png, jpg, jpeg, webp, gif.
outputPathNoFile path to save the generated image. If not provided, image data is returned inline.
aspectRatioNoAspect ratio of the generated image1:1
outputFormatNoOutput image formatpng

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does add real context beyond the schema by stating the reference-image limit of 14 and the two distinct generation modes, but it says nothing about generation latency, cost, failure modes, or whether an existing file at outputPath is overwritten.

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?

Two sentences, both front-loaded with the essential information: what it does and how it can be invoked. No filler, no repetition of the tool name, and the capability distinction is stated before any detail.

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?

For a six-parameter generation tool with no annotations and no output schema, the definition covers the core operational facts: the backing model, the two input modes, and the reference-image cap. Gaps remain around output-side behavior when outputPath is omitted and around overwrite semantics, but the schema addresses the inline-return case.

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 description coverage is 100%, so every parameter is already documented in the schema, including the model tradeoff, the path formats, and the inline-vs-file return behavior. The description adds only the conceptual framing of text-only versus reference-guided prompting, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource (generate an image) and the backing model, and it distinguishes the two generation modes: pure text-to-image versus reference-image-guided generation with up to 14 images. It does not contrast itself with the sibling generate_favicons, but the resource is unambiguous enough that an agent can select it without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied through the two described modes (text-only or with reference images), which tells the agent how to shape its call. There is no explicit when-to-use/when-not-to-use guidance, no advice on choosing between the two models beyond what the schema enum already says, and no routing advice relative to generate_favicons.

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

Deploy Server

Other Tools