Skip to main content
Glama

Generate Image

generate_image

Create or edit images from a text prompt using Google Gemini, with optional reference images to guide the output. Save results to a directory or return them inline.

Instructions

Generate or edit images using Google Gemini. Provide a text prompt describing what you want. Optionally include one or more reference images to inform the output (e.g. edit a photo, restyle an icon, combine 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
imagesNoOptional reference images — file paths, data URLs, or raw base64 strings. The model uses these to inform the output.
promptYesText prompt describing the image to generate or how to edit the reference image(s)
output_dirNoDirectory to save generated images. If omitted, images are returned inline.
output_nameNoFilename prefix for saved images (without extension)generated
google_api_keyNoGoogle AI Studio API key. Falls back to GOOGLE_API_KEY env var.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior2/5

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

No annotations exist, so the description carries the entire behavioral burden, and it omits the traits that matter most for this kind of tool: that it makes an external paid API call requiring a key, expected latency, output count/format, and failure or content-policy behavior. Naming the provider model is modestly useful but does not substitute for that disclosure.

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?

Three short sentences, front-loaded with the core action, followed by the required input and then the optional-reference explanation. There is no filler or repetition of the title.

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?

With five parameters, no annotations, and no output schema, the definition should say more about what a caller gets back and what can go wrong. Return behavior is only indirectly implied through the output_dir field, and nothing addresses the API key requirement's failure mode or the response shape for inline images.

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 100%, so the baseline is 3; the description earns an extra point by explaining what the optional 'images' parameter is actually for — informing edits, restyles, and multi-reference combinations — which is interpretive guidance the schema field text only partly conveys.

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 description names a specific verb pair (generate/edit), the exact resource (images), and the underlying model (Google Gemini). It also distinguishes the two operating modes — text-to-image generation versus reference-driven editing — so an agent knows both capabilities exist before touching 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 Guidelines4/5

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

It states the required input (a text prompt) and gives concrete scenarios for supplying references: 'edit a photo, restyle an icon, combine references'. What is missing is any exclusion or constraint guidance, such as when not to pass references, size/count limits, or cost considerations.

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