Skip to main content
Glama
Nanobanana MCP Server
by Porkbutts

Generate Image

nanobanana_generate_image

Creates images from descriptive text prompts using Google's Gemini models and saves the result to a specified file path.

Instructions

Generate an image from a text prompt using Google's Gemini image generation models.

This tool creates images from descriptive text prompts using Gemini's multimodal capabilities. For best results, be specific about:

  • Subject matter and composition

  • Art style (photorealistic, illustration, oil painting, etc.)

  • Lighting and atmosphere

  • Colors and mood

Args:

  • prompt (string): Text description of the image to generate

  • model (string): Gemini model to use (default: gemini-2.0-flash-exp-image-generation)

  • output_path (string): File path to save the generated image

Returns: JSON with success, saved_to, mime_type, model, text

Examples:

  • "A serene mountain lake at sunset with purple and orange sky reflections"

  • "Cute cartoon robot holding a coffee cup, digital art style"

  • "Professional product photo of a sleek smartphone on white background"

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>",
      "output_path": "<output_path>"
    },
    "name": "nanobanana_generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoGemini model to use. 'gemini-2.0-flash-exp-image-generation' is optimized for image generation.gemini-2.0-flash-exp-image-generation
promptYesText description of the image to generate. Be specific about subject, style, lighting, composition, and mood for best results.
output_pathYesFile path to save the generated image.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare the write/open-world profile, and the description adds meaningful context beyond them: it states that the image is persisted to a caller-supplied file path and documents the return payload (success, saved_to, mime_type, model, text) despite no output schema existing. It omits whether output_path is overwritten, whether an API key or quota applies, and expected latency.

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-loaded with the core action and organized into tips, args, returns, and examples, which is easy to scan. However, the first two sentences say the same thing twice, and the Args block largely duplicates the input schema it was given.

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

Completeness3/5

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

For a generative tool with no output schema, explaining the return fields is genuinely helpful and the model choice is covered by the enum. But key operational facts are missing: whether output_path overwrites an existing file, file format constraints, credential requirements, and any cost or rate limits that matter for an open-world, non-idempotent call.

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 the schema already carries parameter meaning and the baseline is 3. The description restates the args verbatim and adds only the prompt-quality heuristic and some sample prompts, which is modest incremental value.

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 from a text prompt') and names the underlying provider (Google Gemini). It does not differentiate itself from the sibling nanobanana_edit_image, so an agent must infer that this tool creates new images rather than modifying existing ones.

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 by 'creates images from descriptive text prompts', which contrasts weakly with editing, but no sibling is named and no when-not-to-use condition is given. The prompt-writing tips are guidance on how to call it well, not on when to choose it over alternatives.

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