gflow-cli
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GFLOW_CLI_FLOW_HOST | No | Flow frontend host to use (e.g., labs.google or flow.google.com). | |
| GFLOW_CLI_OUTPUT_DIR | No | Directory where generated outputs are saved. | |
| GFLOW_CLI_STORAGE_URI | No | URI for external storage (S3, MinIO, or Google Cloud Storage) to route outputs. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gflow_generate_imageA | 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. |
| gflow_generate_videoA | Generate a video using Google Flow's Veo model. Modes: t2v (text-to-video), i2v (image-to-video), r2v (reference-to-video). Aspects: 9:16, 16:9. Optional model (veo_lite/veo_fast/veo_quality/omni_flash/omni_1_2_flash), duration (seconds; omni_1_2_flash takes 3-15, at most 10 with an end_frame), and count select the Veo model, clip length, and batch size (CLI parity). The prompt supports @CharacterName mentions to tag saved project characters by name (resolves to referenceEntities; on flow.google.com a video @Name is not supported yet, exit 29 before submit, so pass reference_entities plus reference_entity_names to r2v). Reference a SAVED character via @Name; pass one-off ingredient images via reference_images. See docs/REFERENCE_STRATEGIES.md. max_credits uses Flow's quote as a hard cap and refuses missing or over-limit quotes. Optional ui_mode ('classic'/'auto') verifies the classic editor pre-submit and aborts before spending credits if unreachable; 'agentic' is not supported for video. out_file, if given, must resolve inside the configured output directory. Returns the local file path; a model Flow is retiring adds model_retiring to warnings. |
| gflow_list_toolsA | List available gflow prompt tools (name, title, description, category). |
| gflow_list_modelsA | List the image and video models the generate tools accept: name, Flow's menu label (image), aliases, reference cap, max duration and retires_on (video; ISO date or null), aspects and tiers. Static, the same as |
| gflow_get_creditsA | Read the current Google Flow credit balance for one saved profile or all profiles - the number Flow's account menu shows. Read directly from flow.google.com with the profile's saved session (no browser) when Flow accepts it; otherwise read in that profile's browser (one browser launch per profile, sequential for all_profiles). The direct read is off on macOS by default, behind a proxy, or with GFLOW_CLI_WIRE_READS=0. HTTP 429/503 returns a retryable error with no browser fallback: wait, do not loop. Spends no credits. Set all_profiles=true when choosing an account for generation; partial profile failures remain visible in the result. Set refresh=true to renew a signed-out session (rewrites that profile's saved cookies) in a headless browser and read again (slower - one more Chrome launch per signed-out profile; a revoked session still needs |
| gflow_character_listA | List the saved Flow CHARACTER entities in a project. Read-only, spends no credits. On flow.google.com, returns each character's entity_id, display_name, voice, personality, workflow_ids and thumbnail_media_id. Pass entity_id in reference_entities paired with display_name in reference_entity_names (image and video r2v). On flow.google.com, an image @Name still attaches the first word after @ by name via the @ picker without reading the character catalog, while video @Name is not supported yet (exit 29, mention index unavailable); video r2v takes reference_entities plus reference_entity_names. Drives a browser. |
| gflow_character_voicesA | List the preset voices available for a Flow Character's TTS. Static lookup — no network, no browser, no cost. Call it before creating a character to choose a valid voice name. |
| gflow_character_showA | Show one saved Flow CHARACTER entity by id or by exact display name. Read-only, spends no credits. On flow.google.com, returns the character's entity_id, display_name, voice, personality, workflow_ids and thumbnail_media_id. Exactly one of entity_id or name is required; ambiguous names fail. Drives a browser. |
| gflow_download_mediaA | Fetch an already-generated VIDEO from Flow by its media ID and write it to disk. For a generation that finished and was billed but whose download failed — the clip is in the Flow project and the local catalog shows no file for it. Spends no credits: the generation was already paid for. The bytes are verified against the size Flow reports before the file is written. out_dir, if given, must resolve inside the configured output directory. Video only: an image media ID is refused immediately (exit 11) because the signed URL this needs comes from a record only a clip's route emits. See issue #877. The transfer already retries a dropped connection internally, so a failure marked retryable means wait a moment and call again — never immediately, and never in a tight loop: each call opens a browser under a per-profile lease, and a second concurrent call fails on that lease instead (exit 11). |
| gflow_upscale_imageA | Upscale a platform-generated Flow image to 2K or 4K and save it locally. media_id is the UUID of the image to upscale. scale is '2k' or '4k' (4k requires Ultra subscription; Pro/Plus accounts support 2k). project is optional (resolved from the local catalog when omitted). out_dir is the output directory (defaults to configured images directory; must resolve inside the configured output directory). profile selects the auth profile (defaults to the active profile). A scale the image's download menu does not list returns UpscaleUnavailableError (exit 22) naming the listed scales. Spends no credits: image upscale is free. |
| gflow_upscale_videoA | Upscale or export a platform-generated Flow video to 1080p Full HD (or 270p GIF). media_id is the UUID of the video to upscale. scale is '1080p' (Full HD), '720p' (original, or Flow's upscale of a smaller original), or '270p' (animated GIF). project is optional (resolved from the local catalog when omitted). out_dir is the output directory (defaults to configured videos directory; must resolve inside the configured output directory). profile selects the auth profile (defaults to the active profile). flow.google.com only (GFLOW_CLI_FLOW_HOST=labs.google refuses it). Flow decides which scales each clip offers (a Veo 3.1 Lite clip lists no 1080p); a scale the clip's menu does not list returns UpscaleUnavailableError (exit 22) naming the scales it does list. Measured free (1 observation, 2026-10-07): the 1080p export spent no credits. |
| gflow_list_projectsA | List all projects in the local gflow catalog. Returns project IDs, names, and creation dates from the SQLite database. |
| gflow_usage_statsA | Summarize local gflow-cli usage statistics over the last N weeks. Returns command invocation counts from local telemetry (when enabled) and generation counts from the local catalog. Like every gflow tool call, it may start the weekly background upload of usage totals when one is due (only on machines where a person has seen the usage notice; see the telemetry block's upload state). |
| gflow_auth_statusA | Non-interactive, credit-free Flow session probe (#497). Call this BEFORE a generation tool to fail fast on expired auth, before a long blocking generation call. Never starts an interactive login flow. May boot a short-lived headless browser, which on flow.google.com is the usual path, and may take up to ~2 min on a slow network. Every session result also carries |
| gflow_instructions_listB | List a Flow project's persistent Agent-Mode instruction cards (reads the live server brief). Credits-free. |
| gflow_instructions_addA | Add a persistent instruction card to a Flow project's Agent-Mode brief (credits-free). Each ref is classified automatically: local image path → uploaded as an image reference; asset UUID → image reference; anything else → character id/name. |
| gflow_instructions_set_enabledB | Enable or disable one instruction card on a Flow project's brief, selected by title or card id (exactly one). Credits-free. |
| gflow_instructions_rmB | Remove one instruction card from a Flow project's brief, selected by title or card id (exactly one). Credits-free. |
| gflow_instructions_toggle_modeA | Turn a Flow project's brief master switch on or off. When off, NO cards apply even if individually enabled. Cards are left untouched. Credits-free. |
| gflow_instructions_applyA | Declaratively FULL-SYNC a Flow project's brief: REPLACES all existing instruction cards with the given set (destructive — cards not listed are removed). Each card is {'title', 'text', 'ref': [...], 'enabled'}. Credits-free. |
| gflow_video_assembleA | Join local video files or locally available catalog video IDs with optional music and voiceover. Ducking lowers music and clip audio under voiceover by default. This is local, credit-free processing; out_file must be inside the configured output directory. Geometry and frame rate follow the first clip. |
| gflow_media_trashA | Move a generated media item (image or video) to Flow's Trash over the wire (RPC pGCYOe). Credit-free (0 credits). Trashed items are hidden from project views but can be recovered using gflow_media_restore. Requires explicit confirm=True to prevent accidental deletion. |
| gflow_media_restoreB | Restore a trashed media item back to its Flow project over the wire (RPC pGCYOe). Credit-free (0 credits). Returns the restored item status and ID. |
| gflow_video_transcribeA | Transcribe a local video or catalog video UUID to an .srt file using the configured OpenAI-compatible audio transcription endpoint. Credit-free; output stays inside the configured output directory. Google’s default endpoint is refused before audio is sent. |
| gflow_video_captionsB | Burn an authored SRT file into a local video or transcribe first when srt is omitted. Credit-free; generated .mp4 and automatic .srt outputs stay inside the configured output directory. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| expand_prompt | [DEPRECATED: use the creative-director tool] Build the 5-component prompt formula. This is a *prompt template* — it returns an instruction string for the calling client's own model to expand. It is superseded by the ``creative-director`` tool, which performs the rewrite server-side (calls Gemini directly), strips banned keywords, supports domain styles, and records provenance. Reach it via ``gflow_list_tools`` / the ``tools`` array param on the generation tools, or ``gflow tools run creative-director`` / ``--tool`` on the CLI. This template is retained for backward compatibility (some MCP clients surface prompts as user-pickable templates, a distinct UX from agent-invoked tools) and is slated for removal in a future major release. See docs/PROMPT_EXPANSION.md. Inputs: - subject: The primary subject of the generation. - action: Description of actions or motion (optional). - setting: Setting/location/background (optional). - camera: Camera angle, lens type, framing, movement (optional). - lighting: Light source, mood, color palette, atmosphere (optional). |
| create_character | Create a consistent character profile prompt structure for Google Flow character models. Inputs: - name: The name of the character. - gender: Gender profile of the character (default: neutral). - appearance: Appearance traits (hair, eyes, facial features) (optional). - clothing: Clothing style and colors (optional). |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| MCP Agent Guide | Instructions for AI agents on how to use gflow-cli tools. Read this BEFORE making any tool calls. |
| Known Issues | Index of current known issues (titles + status). Read gflow://docs/known-issues/{slug} for one issue's full text. |
| Capabilities | What gflow can drive, as yes/no/partial/unknown per capability, with notes for partial. Same document as `gflow capabilities --json`, except on a no-spend server, where generation is no. Makes no call to Flow. |
| Database Schema | SQLite database schema for gflow.db — operations catalog. |
TDQS
Scored across 25 tools
Each tool targets a fairly distinct resource+action: generation, listing, trash/restore, upscaling, transcription/assembly, characters, instructions, and auth/credits are all separable. The main soft spots are the listing tools (gflow_list_tools vs gflow_list_models vs gflow_character_voices) and the instruction write tools, where gflow_instructions_apply (destructive full-sync) overlaps conceptually with the add/rm/set_enabled/apply quartet, though the destructive semantics are spelled out.
All names are snake_case with a shared gflow_ prefix, but the verb/noun ordering is split: roughly half are verb_object (generate_video, list_models, download_media, upscale_image, get_credits) and half are object_verb (media_trash, video_assemble, character_show, instructions_add). Still readable, but two conventions coexist.
25 tools is at the heavy end (the 16-25 'borderline heavy' band). The domain is genuinely broad — generation, media management, characters, instructions, upscaling, auth, and telemetry — so most tools earn their place, but it is more sprawl than the typical well-scoped server.
Core lifecycle is well covered (generate, list, download, upscale, trash/restore, credits, auth, instructions CRUD). But there are real gaps: gflow_character_voices says to call it 'before creating a character' yet no character_create tool exists, and projects are only listable (no create/update/delete), leaving dead ends an agent will hit.