Skip to main content
Glama

gflow_generate_image

Generate an image using Google Flow's image models. Produces 1-4 images from a text prompt. out_file, if given, must resolve inside the configured output directory.

Instructions

Generate an image using Google Flow's image models. Produces 1-4 images from a text prompt. out_file, if given, must resolve inside the configured output directory. Models: nano2 (Nano Banana 2.1, fast; 'nano2.1' also accepted), nano2-lite (Nano Banana 2 Lite), nano-pro (Nano Banana Pro), image4 (Imagen 4, no longer in Flow's menu). Aspects: 1:1, 9:16, 16:9, 4:3, 3:4. The prompt supports @AssetName mentions to tag saved project characters/assets by name (resolves to referenceEntities/referenceImages). Reference a SAVED named asset via @Name; reference an arbitrary one-off image via reference_images. See docs/REFERENCE_STRATEGIES.md. On accounts served from flow.google.com, use an existing project and local reference files. A character attaches there by name (@Name, or reference_entities paired with reference_entity_names); a UUID media reference the local catalog records in that same project is referenced in place (#995), but any other UUID, an entity id without a name, and image4 are not ported to that composer yet and fail before submit; retrying will not clear it. On an agent-only composer (#799) only text-to-image runs, so reference_images and character references fail there too. Returns local file paths to the generated images.

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

Input Schema

NameRequiredDescriptionDefault
waitNotrue (default): run the generation inside this call and return the finished result. The call stays open for the whole generation, minutes for a video, which can outlast an MCP client's tool timeout; raise that timeout, or use false. false: return {status: 'pending', task_id} at once and run the job in the background of this server process. With the SEP-2663 Tasks extension, poll tasks/get by task_id: while it runs the status is working; once done it is completed and its result field holds the same reply wait=true would (files, project id, seed). A failed generation is also completed, with result.isError true, so check isError. tasks/cancel aborts the job locally; tasks/get then reads cancelled. A job not yet submitted to Flow stops before submitting and nothing is charged; once a gflow worker has submitted it, Flow cannot cancel it, so it may still be charged (statusMessage says which). gflow cancel <id> is the CLI twin. The job runs only while this server runs: if the client closes the server, it is cancelled.
countNo
modelNonano2
toolsNoPrompt tools applied before generation. Each item is {"name": <slug>, "options": {...}}, e.g. [{"name": "creative-director"}]. gflow_list_tools lists the valid names.
aspectNo1:1
promptYes
profileNodefault
projectNo
ui_modeNo
out_fileNoOptional file to write, inside the configured output dir: a relative path is taken relative to it; an escape or a directory is refused.
instructionsNo
project_nameNo
reference_imagesNo
reference_entitiesNoSaved character entity ids to attach. On flow.google.com each id needs its display name at the same position in reference_entity_names, or the call fails before submit; gflow_character_list returns both.
reference_entity_namesNoDisplay name of each reference_entities id, same order. Required on flow.google.com, where an id without its name fails before submit.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.101.0
    • addedInput schema / properties / out_file
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional file to write, inside the configured output dir: a relative path is taken relative to it; an escape or a directory is refused.",
      +  "title": "Out File"
      +}
    • removedInput schema / properties / output
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Output"
      -}
    • changedInput schema / properties / reference_entities / description
      Previous value: -"Saved character entity ids to attach. On flow.google.com each id needs its display name at the same position in reference_entity_names, or the call fails before submit; gflow_character_list returns both (if it fails with a wire-format error, #875, ask the user or read the name in Flow's UI)."New value: +"Saved character entity ids to attach. On flow.google.com each id needs its display name at the same position in reference_entity_names, or the call fails before submit; gflow_character_list returns both."
    • changedInput schema / properties / wait / description
      Previous value: -"true (default): run the generation inside this call and return the finished result. The call stays open for the whole generation, minutes for a video, which can outlast an MCP client's tool timeout; raise that timeout, or use false. false: return {status: 'pending', task_id} at once and run the job in the background of this server process. With the SEP-2663 Tasks extension, poll tasks/get by task_id: while it runs the status is working; once done it is completed and its result field holds the same reply wait=true would (files, project id, seed). A failed generation is also completed, with result.isError true, so check isError. tasks/cancel stops the job; tasks/get then reads cancelled (a job cancelled after submit is recorded as indeterminate: a credit may be spent). The job runs only while this server runs: if the client closes the server, it is cancelled."New value: +"true (default): run the generation inside this call and return the finished result. The call stays open for the whole generation, minutes for a video, which can outlast an MCP client's tool timeout; raise that timeout, or use false. false: return {status: 'pending', task_id} at once and run the job in the background of this server process. With the SEP-2663 Tasks extension, poll tasks/get by task_id: while it runs the status is working; once done it is completed and its result field holds the same reply wait=true would (files, project id, seed). A failed generation is also completed, with result.isError true, so check isError. tasks/cancel aborts the job locally; tasks/get then reads cancelled. A job not yet submitted to Flow stops before submitting and nothing is charged; once a gflow worker has submitted it, Flow cannot cancel it, so it may still be charged (statusMessage says which). gflow cancel <id> is the CLI twin. The job runs only while this server runs: if the client closes the server, it is cancelled."
  2. Changed1 schema field changedv0.92.1
    • changedInput schema / properties / reference_entities / description
      Previous value: -"Saved character entity ids to attach. On flow.google.com each id needs its display name at the same position in reference_entity_names, or the call fails before submit; gflow_character_list returns both (if it exits 7, #875, ask the user or read the name in Flow's UI)."New value: +"Saved character entity ids to attach. On flow.google.com each id needs its display name at the same position in reference_entity_names, or the call fails before submit; gflow_character_list returns both (if it fails with a wire-format error, #875, ask the user or read the name in Flow's UI)."
  3. Changed3 schema fields changedv0.92.0
    • addedInput schema / properties / reference_entities / description
      Added value: +"Saved character entity ids to attach. On flow.google.com each id needs its display name at the same position in reference_entity_names, or the call fails before submit; gflow_character_list returns both (if it exits 7, #875, ask the user or read the name in Flow's UI)."
    • addedInput schema / properties / reference_entity_names / description
      Added value: +"Display name of each reference_entities id, same order. Required on flow.google.com, where an id without its name fails before submit."
    • addedInput schema / properties / tools / description
      Added value: +"Prompt tools applied before generation. Each item is {\"name\": <slug>, \"options\": {...}}, e.g. [{\"name\": \"creative-director\"}]. gflow_list_tools lists the valid names."
  4. Changed1 schema field changedv0.91.0
    • changedInput schema / properties / wait / description
      Previous value: -"true (default): run the generation inside this call and return the finished result. The call stays open for the whole generation, minutes for a video, which can outlast an MCP client's tool timeout; raise that timeout for generation calls. false: only enqueue the job and return {status: 'pending', task_id} at once; the SEP-2663 Tasks extension's tasks/get reads its state by task_id. No gflow command runs the queue worker today, so a wait=false job is never generated: tasks/get reports it as 'working' indefinitely, and tasks/cancel clears it. Use the default."New value: +"true (default): run the generation inside this call and return the finished result. The call stays open for the whole generation, minutes for a video, which can outlast an MCP client's tool timeout; raise that timeout, or use false. false: return {status: 'pending', task_id} at once and run the job in the background of this server process. With the SEP-2663 Tasks extension, poll tasks/get by task_id: while it runs the status is working; once done it is completed and its result field holds the same reply wait=true would (files, project id, seed). A failed generation is also completed, with result.isError true, so check isError. tasks/cancel stops the job; tasks/get then reads cancelled (a job cancelled after submit is recorded as indeterminate: a credit may be spent). The job runs only while this server runs: if the client closes the server, it is cancelled."
  5. Changed1 schema field changedv0.90.0
    • addedInput schema / properties / wait / description
      Added value: +"true (default): run the generation inside this call and return the finished result. The call stays open for the whole generation, minutes for a video, which can outlast an MCP client's tool timeout; raise that timeout for generation calls. false: only enqueue the job and return {status: 'pending', task_id} at once; the SEP-2663 Tasks extension's tasks/get reads its state by task_id. No gflow command runs the queue worker today, so a wait=false job is never generated: tasks/get reports it as 'working' indefinitely, and tasks/cancel clears it. Use the default."
  6. Changed1 schema field changedv0.86.0
    • removedInput schema / properties / seed
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Seed"
      -}
  7. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations at all, the description carries the full disclosure burden and does it well: it explains the out_file containment rule, states that image4, unnamed entity ids, and foreign UUIDs "fail before submit" and that "retrying will not clear it," and notes the agent-only composer is text-to-image only. It omits cost/credit implications and auth/profile requirements, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is correctly front-loaded, but the body becomes a dense run-on stacking parentheticals, issue numbers (#995, #799), and a doc pointer. The information is largely useful but not structured or pruned; a bulleted or short-paragraph layout would carry the same facts with less parsing effort.

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?

For a 15-parameter tool with an output schema, the description covers the pieces an agent cannot infer: model lineup, aspect list, reference strategies, and the platform-specific failure surface. Return values are already covered by the output schema, so the one-line note about local file paths is sufficient; only credit/profile behavior is left unaddressed.

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?

At 33% schema coverage with 15 parameters, the description compensates meaningfully by spelling out the model values (nano2, nano2.1 alias, nano2-lite, nano-pro, image4 with its caveat), the five aspect ratios since the schema has no enums, out_file path rules, and the @Name vs reference_images vs reference_entities/names split. Undocumented remainders (count, tools, profile, ui_mode, instructions, project_name) are left to the schema.

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 gives a specific verb and resource ("Generate an image using Google Flow's image models") plus output scope ("Produces 1-4 images from a text prompt"), which cleanly separates it from gflow_generate_video and gflow_upscale_image. An agent can identify the operation without consulting 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 gives concrete routing guidance for reference inputs: "Reference a SAVED named asset via @Name; reference an arbitrary one-off image via reference_images," and points to docs/REFERENCE_STRATEGIES.md. It also states platform-conditional constraints for flow.google.com and the agent-only composer, but it never explicitly names a sibling tool as the alternative for those cases, so it falls short of full when/when-not coverage.

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