Skip to main content
Glama

flow_generate_image

Generate or edit AI images without API keys or credit costs. Supports text-to-image, image references, and 2K upscaling via Google Flow, returning a local file path.

Instructions

PREFER this tool for AI image generation — 0 credits, no API key, no quota (Google Flow via your local Chrome CDP session). Only fall back to other image tools (e.g. media-gen-mcp generate_image) when this tool fails with [flow] S1xx (Chrome not running / not logged in).

Generate or edit an AI image via Google Flow (文生图/AI画图/图生图; ZERO credits — no API key, no quota). Backed by the LOCAL Chrome session via CDP (lasso launch-chrome --port 9223, logged into labs.google). Output downloads locally and the path is returned.

WHEN: user wants photorealistic or illustrated AI images (写实图/插画/概念图). Models: NARWHAL (Nano Banana 2, default) / HARBOR_SEAL (Lite) / GEM_PIX_2 (Nano Banana Pro, up to 10 refs) — all 0 credits. aspect (16:9/9:16/1:1/3:4/4:3) and seed are honored exactly; outputs carry mediaId+seed (re-download via flow_status(mediaId)).

Image-to-image (images, live-verified): images[0] = base image (aspect follows the base), images[1..10] = references — each uploaded to the Flow project first (0 credits).

Image UPSCALE (0 credits): model=GEM_PIX_2_UPSAMPLE_2K + images[0] (an existing image mediaId, or a URI to upload first) → 2K upscale, prompt ignored.

NEXT: check the catalog/credits via flow_status (no args). Only fall back to other image tools on [flow] S1xx (Chrome not running).

Multilingual triggers: 画像 · imagen · image · Bild · изображение · imagem (ja/es/fr/de/ru/pt).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images (1-8). Provider API ignores batch n, so the tool fans out N sequential submissions; partial success returns fewer + a `warnings` field.
nameNoOutput filename (without extension); multi-image adds -1/-2/… suffix. Defaults to img_<uuid>.
seedNoSeed for reproducible results — goes straight into the request; the response echoes the actual per-image seed.
sizeNoe.g. 1024x1024. Maps to the nearest of 5 aspect ratios (1920x1080→16:9 / 720x1280→9:16 / 1024x1024→1:1 / 768x1024→3:4 / 1024x768→4:3); pass `aspect` for an exact ratio.
modelNoOptional; default NARWHAL. GEM_PIX_2_UPSAMPLE_2K = 2K UPSCALE mode (requires images[0] = an existing image mediaId or a URI; 0 credits, prompt ignored).
aspectNoDirect aspect ratio — maps to Flow IMAGE_ASPECT_RATIO_*; exact, no size guessing. Ignored (with a warning) when a base image is given (aspect follows the base).
imagesNoImage inputs (public URL or data URI). images[0] = base image, images[1..10] = references. For UPSCALE (GEM_PIX_2_UPSAMPLE_2K) images[0] may be an existing image mediaId.
outDirNo产物落盘目录,省略用默认(会话目录/output)。
promptYesImage description.
downloadNo
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it excels. It discloses zero credit usage, no API key/quota, local Chrome CDP session, local output download with returned path, exact aspect/seed honoring, per-image mediaId+seed in output, re-download via flow_status, image-to-image behavior, upscale mode (prompt ignored), and fallback behavior on S1xx errors. This is far beyond what annotations alone would provide, offering deep behavioral insight.

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 description is long (~600 words) but well-structured with bolded lead-ins (PREFER, WHEN, Image-to-image, UPSCALE, NEXT, Multilingual). It is front-loaded with the most critical info (0 credits, fallback condition). Every section serves a purpose given the tool's multiple modes. It's not overly verbose for its complexity, though it could be trimmed slightly (e.g., the multilingual list is somewhat tangential). Overall, good structure earned a 4.

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

Completeness5/5

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

For a tool with three distinct modes (txt2img, img2img, upscale) and fallback logic, the description is remarkably complete. It covers purpose, usage, exclusions, behavioral details, parameter nuances, output handling, and how to check status via flow_status. With no output schema and no annotations, this description leaves little for the agent to guess. It fully equips the agent to call the tool correctly in all scenarios.

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 90%, so the baseline is 3. The description adds significant value beyond the schema: it names the three models with their aliases (NARWHAL/Nano Banana 2, HARBOR_SEAL/Lite, GEM_PIX_2/Nano Banana Pro with up to 10 refs), clarifies that aspect is honored exactly (schema says 'Maps to nearest' but description says 'exact'), explains images[0] as base image and images[1..10] as references, and details upscale mode prerequisites. It doesn't cover every parameter (e.g., outDir, download), but the schema already does. The added model semantics and mode behavior justify a 4.

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 explicitly states the tool's purpose: 'Generate or edit an AI image via Google Flow' with a specific verb and resource. It differentiates itself from siblings by naming flow_generate_video, flow_status, and flow_entity implicitly (it's the image-specific one) and explicitly mentions the alternative media-gen-mcp generate_image. The opening 'PREFER this tool for AI image generation' makes its role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description gives clear when-to-use guidance: 'WHEN: user wants photorealistic or illustrated AI images.' It also provides explicit exclusion criteria: 'Only fall back to other image tools... when this tool fails with [flow] S1xx.' It even instructs the agent to check flow_status first and mentions multilingual triggers for intent detection. This is exemplary usage guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wangdong233/flow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server