Skip to main content
Glama

aistudio_generate_image

Generate or edit high-resolution images in Google AI Studio from prompts, using reference images, aspect ratios, and browser or API modes.

Instructions

Generate or edit a high-resolution image in Google AI Studio (Nano Banana / Imagen).

Args: prompt: Detailed visual art-direction prompt. aspect_ratio: '1:1', '16:9', '9:16', '4:3', '3:4', or '4:5'. Default '1:1'. reference_images: Optional local image paths for editing or style/subject reference. model: Optional model name (API mode default: 'gemini-nano-banana-2.1'). output_path: Optional local file path to save the image. use_browser: True (default) uses your AI Studio Chrome session; False uses Gemini API.

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": "aistudio_generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
promptYes
output_pathNo
use_browserNo
aspect_ratioNo1:1
reference_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the dual execution path (Chrome session vs Gemini API) and that reference_images enables editing/style transfer, but it is silent on latency, whether generation is synchronous or job-based (aistudio_check_job exists as a sibling, hinting at async), auth requirements, and whether the image is returned inline or only written to disk.

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?

The one-line purpose is front-loaded, and the Args block earns its space because the schema supplies no per-parameter documentation. Nothing is padded, though the Args list could be marginally tighter and it repeats the default values that the schema already declares.

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 six-parameter mutation-style tool with no annotations and no output schema, the parameter coverage is good but the definition says nothing about the return value (path? inline image? job id?) or about failure modes such as an expired browser session. That leaves an agent unable to predict the result of a call.

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 description coverage is 0%, so the description must compensate, and it largely does: it enumerates the allowed aspect_ratio values and default, explains reference_images as either editing input or style/subject reference, gives the API-mode model default, and clarifies the consequence of use_browser. Minor gaps remain on output_path behavior (file naming, directory creation, overwrite) and on what model strings are valid.

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 opening sentence names a specific verb pair and resource ('Generate or edit a high-resolution image') plus the concrete backends (Nano Banana / Imagen), which cleanly separates it from the music, video, transcription and UI siblings. An agent can tell this is the image-creation path 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 by the purpose statement, and the description does explain the browser-vs-API mode choice, but it never states when to prefer this over a sibling or what prerequisites apply (e.g. needing a logged-in AI Studio Chrome session before use_browser=True works). No explicit when-not guidance is given.

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