discover
Retrieve comfy-cli's command schemas and capabilities at runtime so agents can learn the CLI contract dynamically instead of hard-coding it.
Instructions
Return comfy-cli's self-describing command surface (its own contract).
Wraps comfy discover so an agent can learn the CLI's contract at
runtime instead of hard-coding it.
Args:
schemas_only: forwards --schemas-only to the CLI (default True).
command: return ONE schema body by name instead of the index.
Sizes matter here because MCP clients cap tool output (e.g. Claude Code's
MAX_MCP_OUTPUT_TOKENS, default 25,000) by TRUNCATING mid-JSON, so an
oversized reply comes back broken rather than short:
discover()— the default. Capabilities, version, command schemas, and aschema_indexof names. A couple of KB; always under the cap.discover(command="run")— one schema body (~1.6 KB).discover(schemas_only=False)— the entire surface,commandstree anderror_codesincluded. Big; only for a client with a raised cap.
The default USED to return all 35 schema bodies — ~63 KB from the CLI and ~109 KB once pretty-printed, which exceeded a standard cap and made the tool uncallable at its own default. Measured on comfy-cli 1.15.0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | No | ||
| schemas_only | No |