Skip to content

MCP: expose the models catalog as gflow_list_models #883

Closed

Description

@ffroliva

Split out of #880 (gap 3).

gflow models --json returns the live image/video catalog — names, aliases, reference caps, durations, aspects, tiers — and MCP clients have no way to read it. They hardcode catalogs instead; the reporter in #880 ships a dated snapshot for exactly this reason.

Why the current exemption is wrong

tests/mcp/test_cli_parity.py::_MCP_EXEMPT says:

"models": "informational; models are enumerated in the generate tools' descriptions"

Prose in a tool description is not a catalog. It carries no ref_cap, no max_duration, no alias list, and nothing a client can parse. This is the second law's failure mode: a capability behind only one door, with nothing telling the agent at the other door that it exists.

Shape

cli_models.build_catalog() is already pure, Click-free and does no I/O — it derives everything from the Model / VideoModel enums plus the alias maps and per-model caps, so it cannot drift from what the generation commands actually accept. The tool is a wrapper over it.

gflow_list_models() -> dict   # build_catalog() verbatim

No arguments, no profile, no browser, no spend.

It must not touch the labs tRPC listing. projectInitialData 401s for migrated accounts (the #791 family) and project.createProject on that surface now answers 404 "Flow RPCs have been deprecated and disabled". Reading the static table keeps the tool correct on both hosts.

Done when

  • gflow_list_models registered in src/gflow_cli/mcp/tools.py beside gflow_list_tools, added to __all__
  • "models" moved from _MCP_EXEMPT to CLI_TO_MCP in tests/mcp/test_cli_parity.py
  • docs/MCP.md lists the tool
  • Run over a live serve and paste the result — the MCP twin is its own surface, so the Iron Law applies to it separately. Zero credits; tests/e2e/test_credits_mcp_e2e.py is the precedent at 3 assertions / 58s.

Activity

  1. added a commit that references this issue on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions