Skip to main content
Glama

generate_image

Create an image from a text prompt and save it locally, returning file path, cost, and remaining credits. Use reference images and aspect ratios to generate tailored visuals.

Instructions

Generate an image and save it locally. Returns the file path, cost and remaining credits (plus a preview).

prompt: what to draw. model: image model id (see list_models(kind="image")), default nano-banana-2. aspect: aspect ratio, e.g. "1:1", "16:9", "9:16". option: resolution/quality option such as "1K", "2K", "4K"; defaults to the model's first (cheapest) option. reference_images: optional list of local PNG/JPEG/WEBP paths used as references.

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
modelNonano-banana-2
aspectNo1:1
optionNo
promptYes
reference_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.1/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 the important traits: it writes a file to local disk, it consumes credits (cost + remaining credits returned), and it returns a path plus preview. It does not say whether the call is blocking or asynchronous, nor what happens on failure or policy rejection, which is a meaningful remaining gap for a paid generation call.

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?

One front-loaded sentence covering action, side effect and return values, followed by a compact per-parameter list with no filler. Every line adds information an agent needs before calling.

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?

No output schema exists, but the description compensates by naming the return payload (path, cost, remaining credits, preview), and all five parameters are explained. The missing piece is operational context: sync vs async behavior and how this interacts with job_status, which an agent must know before a long-running generation.

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%, so the description must do all the work, and it does: prompt, model (with default and where to find valid ids), aspect (with concrete examples), option (with format examples and the default-to-cheapest-option rule), and reference_images (with accepted file formats and the local-path constraint). This is meaning an agent could not recover from the bare schema.

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?

States a specific verb and resource ('Generate an image') plus a side effect ('save it locally'), which separates it cleanly from generate_video, generate_audio and upscale_image by resource noun alone. It stops short of explicitly naming a sibling it replaces, so it lands at 4 rather than 5.

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?

There is no explicit when-to-use/when-not guidance, but the definition does route the agent to list_models(kind="image") for model ids and states the default, which is an actionable dependency hint. Beyond that, the choice between this tool and upscale_image or generate_video is left implicit.

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