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
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | 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. | |
| count | No | ||
| model | No | nano2 | |
| tools | No | Prompt tools applied before generation. Each item is {"name": <slug>, "options": {...}}, e.g. [{"name": "creative-director"}]. gflow_list_tools lists the valid names. | |
| aspect | No | 1:1 | |
| prompt | Yes | ||
| profile | No | default | |
| project | No | ||
| ui_mode | No | ||
| out_file | No | Optional file to write, inside the configured output dir: a relative path is taken relative to it; an escape or a directory is refused. | |
| instructions | No | ||
| project_name | No | ||
| reference_images | No | ||
| reference_entities | No | 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. | |
| reference_entity_names | No | Display name of each reference_entities id, same order. Required on flow.google.com, where an id without its name fails before submit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||