Skip to main content
Glama

comfy_cli

Drive ComfyUI operations: manage server lifecycle, validate/run workflows, track jobs, search nodes, transfer files, and handle models/skills via CLI actions.

Instructions

Drive the official comfy-cli (envelope/1 JSON contract) for the selected ComfyUI environment. The MCP resolves comfy from COMFY_CLI_PATH, PATH, or the selected workspace's .venv/venv. Driven by the action parameter:

  • action:"status" — Inspect the comfy-cli integration and selected environment (comfy which / comfy env); detail selects version/which/env/discover (default env). Call this before local CLI operations when workspace or server routing is uncertain.

  • action:"server_start" / "server_stop" / "server_restart" — Manage a local ComfyUI through comfy-cli background process management. Restart performs comfy stop followed by comfy launch --background; extra launch arguments go in launchArgs.

  • action:"jobs_list" — List local or Comfy Cloud jobs (limit optional). Local jobs include CLI-tracked async submissions plus the ComfyUI queue/history.

  • action:"jobs_status" / "jobs_watch" / "jobs_cancel" — Inspect, watch, or cancel one job; promptId required.

  • action:"jobs_wait" — Wait for jobs: one of promptId, promptIds, or all=true is required; timeoutSeconds optional.

  • action:"search_nodes" — Fuzzy-search actual ComfyUI node classes by name, display name, or description using comfy nodes search; query required. Complements search_custom_nodes, which searches installable node packs. Works locally, in Comfy Cloud, or offline with objectInfoPath. When comfy-cli is not installed/on PATH and the target is the connected (local) server, falls back to fuzzy-searching that server's live /object_info — so installed-node discovery works without the CLI.

  • action:"workflow_validate" — Validate an API/UI workflow file (class types, inputs, enums, edge wiring) without submission; workflowPath required.

  • action:"workflow_run" — Submit an API/UI workflow file (workflowPath required). Asynchronous by default; set wait=true to await outputs (timeoutSeconds).

  • action:"transfer_upload" — Upload input files (files required) for local ComfyUI or Comfy Cloud; overwrite=false passes --no-overwrite.

  • action:"transfer_download" — Download completed outputs for promptId (required); outDir and urlOnly optional.

  • action:"models_list_folders" / "models_list_folder" / "models_search" / "models_show" — Discover model folders/files locally or in Comfy Cloud (folder required for list_folder, name for show). When comfy-cli is not installed/on PATH and the target is the connected (local) server, these read-only listings fall back to that server's own local models (via /models) — so model discovery works without the CLI.

  • action:"models_download" — Download a model url (required) into the workspace (relativePath, default models/checkpoints). A download can run for many minutes and is gated on an idle-liveness timeout, so a progressing download is never killed.

  • action:"models_remove" — Remove workspace model files (modelNames required; relativePath optional).

  • action:"skills_list" / "skills_show" / "skills_validate" / "skills_install" / "skills_status" / "skills_uninstall" — Manage the official comfy-cli bundled agent skills (comfy, fragments, debug, relay, director). validate requires path; install/uninstall default to dry-run unless apply=true; scope="project" requires projectDir.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoaction:"jobs_wait" — wait on every known job.
urlNoaction:"models_download" — model URL to download. REQUIRED.
nameNoactions "models_show"/"skills_show" — the model or skill name.
pathNoaction:"skills_validate" — path to the skill to validate. REQUIRED.
textNoaction:"models_search" — search text.
typeNoaction:"models_search" — model type filter (checkpoint, lora, vae, …).
waitNoaction:"workflow_run" — await outputs instead of returning after submission.
applyNoactions "skills_install"/"skills_uninstall" — actually mutate; default false = dry-run.
filesNoaction:"transfer_upload" — input files to upload. REQUIRED.
limitNoResult cap for "jobs_list", "search_nodes" and the "models_*" listing/search actions.
queryNoaction:"search_nodes" — fuzzy search text. REQUIRED.
scopeNoactions "skills_install"/"skills_uninstall"/"skills_status" — install scope.
whereNoTarget for the jobs/search_nodes/workflow/transfer/models actions: "local" (default) or "cloud" (Comfy Cloud).
actionYesWhich comfy-cli operation to perform. Families: status; server_* (lifecycle); jobs_* (list/status/wait/watch/cancel); search_nodes; workflow_* (validate/run); transfer_* (upload/download); models_* (list_folders/list_folder/search/show/download/remove); skills_* (list/show/validate/install/status/uninstall).
detailNoaction:"status" — which inspection to run.env
folderNoaction:"models_list_folder" — the model folder to list. REQUIRED.
outDirNoaction:"transfer_download" — output directory.
skillsNoactions "skills_install"/"skills_uninstall" — skill names.
targetsNoactions "skills_install"/"skills_uninstall" — agent targets.
urlOnlyNoaction:"transfer_download" — print URLs instead of downloading files.
promptIdNoSingle prompt id. Required for "jobs_status"/"jobs_watch"/"jobs_cancel" and "transfer_download"; accepted for "jobs_wait" (normalized into a one-element promptIds list).
overwriteNoaction:"transfer_upload" — set false to pass --no-overwrite.
promptIdsNoaction:"jobs_wait" — prompt ids to wait on. Use this or promptId or all=true.
workspaceNoOptional ComfyUI workspace override. Otherwise COMFYUI_PATH/auto-detection is used.
launchArgsNoactions "server_start"/"server_restart" — extra ComfyUI launch arguments, e.g. ['--listen','0.0.0.0','--port','8188'].
modelNamesNoaction:"models_remove" — model filenames to remove. REQUIRED.
projectDirNoWorking directory for project-scoped skill operations. Required when scope='project'.
relativePathNoactions "models_download"/"models_remove" — workspace-relative model directory (default models/checkpoints).
workflowPathNoactions "workflow_validate"/"workflow_run" — path to an API/UI workflow JSON file. REQUIRED.
objectInfoPathNoaction:"search_nodes" — offline object_info JSON file to search instead of a live target.
timeoutSecondsNoactions "jobs_wait"/"jobs_watch"/"workflow_run" — max seconds to wait.
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers meaningful behavioral disclosure: search_nodes and models_list fall back to live server endpoints when the CLI is absent, models_download is gated on an idle-liveness timeout so a progressing download is never killed, and skills_install/skills_uninstall default to dry-run unless apply=true. It also explains server_restart as stop-followed-by-launch. It does not describe response formats or warn about permanent deletion for models_remove, but the core side effects are transparent.

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

Conciseness5/5

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

Although long, the description is dense and efficiently structured with a clear lead sentence followed by action-family bullets. Every clause earns its place — fallback behaviors, defaults, required parameters, and cross-references are packed into crisp statements. No filler or redundancy; each action gets one focused line.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is exceptionally complex (26 actions, 31 parameters, no annotations, no output schema). The description covers all actions, required parameters, defaults, and fallback logic comprehensively. However, it does not describe any return values or response shapes for any action, and with no output schema, the description should compensate. This leaves a meaningful gap in completeness for an agent deciding how to interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description's parameter references largely mirror the schema's action-scoped descriptions (e.g., relaunchArgs, relativePath default). It adds some contextual value by grouping parameters under action families, but it does not provide syntax, formats, or constraints beyond the schema. The parameter semantics are fully covered but not enriched by the description.

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 description opens with a specific verb+resource: 'Drive the official comfy-cli' for the selected ComfyUI environment. It then enumerates 26 concrete actions across named families, making the tool's scope unmistakable. It also distinguishes itself from sibling search_custom_nodes by explicitly noting it searches installed node classes while search_custom_nodes searches installable packs.

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?

The description provides actionable when-to-use guidance, e.g., 'Call this before local CLI operations when workspace or server routing is uncertain' for status, and it flags fallback behavior when comfy-cli is not installed. It explicitly positions search_nodes as complementing search_custom_nodes. However, it does not explicitly contrast with other overlapping siblings like restart_comfyui or list_local_models, leaving some alternatives implicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/artokun/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server