Skip to main content
Glama

generate_image

Create or edit images from text prompts and reference images, including combining subjects or styles, then save the result as a JPEG.

Instructions

Generate an image with Nano Banana, or edit/combine reference images. Saves a JPEG.

prompt: detailed description (English works best); put any in-image text in quotes. aspect_ratio: 4:5 (default), 1:1, 9:16, 16:9, 3:4, 4:3, 2:3, 3:2, 5:4, 21:9, 1:4, 4:1, 1:8, 8:1. image_size: 512, 1K, 2K (default) or 4K. model: gemini-nano-banana-2.1 (default), gemini-3-pro-image (best text), gemini-3.1-flash-lite-image. reference_images: up to 14 local images to edit or take style/subjects from. previous_interaction_id: edit the image from an earlier call ("same scene, warmer light") - the most reliable way to keep a character/product consistent. google_search: ground the image in current facts. force_new: regenerate even if the identical request ran recently (billed again).

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
modelNo
promptYes
filenameNo
force_newNo
image_sizeNo2K
aspect_ratioNo4:5
google_searchNo
reference_imagesNo
previous_interaction_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv6.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real cost/side-effect behavior: force_new is "billed again," output lands as a saved JPEG, and google_search grounds the result in live facts. It omits where the file is written, how filename interacts with saving, and any auth/quota behavior, keeping it below 5.

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 framing sentences front-load purpose and output format, then a tight one-line-per-parameter list with enforced defaults inline. Every line adds decision-relevant information; nothing is repeated from the schema titles.

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 9-parameter generator with no output schema, the definition covers modes, defaults, cost, and parameter values well. The one unresolved dependency is provenance of previous_interaction_id, which presumably comes from a prior call's response but is never stated explicitly.

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?

Schema coverage is 0% across 9 parameters, so the description must compensate, and it documents 8 of them with concrete values (aspect ratios, image sizes, model tradeoff "best text", up to 14 reference images, what previous_interaction_id does). Only filename receives no explanation, which is the single remaining gap.

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 first sentence gives a specific verb and resource ("Generate an image") and extends scope to editing/combining reference images, plus declares the output artifact ("Saves a JPEG"). The word "image" alone separates it from generate_music and generate_video, so no sibling ambiguity remains.

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?

It clearly routes between the three modes: fresh generation, reference-images editing, and previous_interaction_id for consistency ("the most reliable way to keep a character/product consistent"), plus when to reach for google_search and force_new. It stops short of explicit exclusions (e.g., when to prefer generate_video or another editing path), so 4 rather than 5.

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