Skip to main content
1 tool. Generated from the live MCP tool schemas — do not edit by hand; run npm run docs:gen.
You don’t type these calls. Ask your agent for what you want in ordinary English — it chooses the tool and fills in the arguments. The JSON on this page is what it sends. New here? Start with Using the tools.

get_defaults

Read and write settings — either OUR generation defaults or ComfyUI’s own frontend UI settings. These are two SEPARATE stores and the action says which one you mean:
  • action:“get” — Return the merged view of OUR generation defaults with per-source attribution. Precedence (lowest → highest): config file → COMFYUI_DEFAULT_* env vars → runtime overrides via action:“set”. Per-call MCP tool args always win over these defaults when consumed by a workflow-construction tool. Read-only, and works even with no ComfyUI running.
  • action:“set” — Update OUR generation defaults from values. By default updates the in-memory runtime layer (lost on restart); pass persist:true to also write the change into the config file (~/.config/comfyui-mcp/config.json by default). Use this to avoid repeating common values like width, height, steps, cfg, sampler, checkpoint.
  • action:“get_ui” — Read COMFYUI’s OWN per-user frontend UI settings (the Comfy.* ids its Settings panel writes, served by the frontend user manager). This is a DIFFERENT store from action:“get” — nothing here feeds our generation defaults. Read-only. Provide id to read one setting’s raw stored value; omit id to list all stored settings (optionally narrowed by filter). Known ids include Comfy.Validation.Workflows (boolean; its strictness rejects some custom-node workflows), Comfy.PreviewMethod (auto|latent2rgb|taesd|none), Comfy.LinkRenderMode (0 straight / 1 linear / 2 spline / 3 hidden), Comfy.UseNewMenu, and Comfy.Sidebar.Location. Ids are frontend-defined and stored verbatim; keys never written by the user are absent here and fall back to invisible frontend defaults. Values are surfaced with their raw stored type (no coercion). Requires a reachable local or remote ComfyUI; not available in Comfy Cloud mode.
  • action:“set_ui” — Modify one of COMFYUI’s OWN persisted frontend UI settings by id. This writes ComfyUI’s user settings store, NOT our generation defaults (that is action:“set”). The change is persisted immediately and takes effect on the next frontend load/refresh (an already-open UI tab keeps its old value until reloaded). The value is stored as-is: booleans/numbers are NOT coerced from strings, so pass true (not “true”) and 2 (not “2”). Known ids: Comfy.Validation.Workflows (boolean; loosening it lets stricter custom-node workflows load), Comfy.PreviewMethod (auto|latent2rgb|taesd|none), Comfy.LinkRenderMode (0 straight / 1 linear / 2 spline / 3 hidden), Comfy.UseNewMenu, Comfy.Sidebar.Location. Ids are frontend-defined; an unknown id is stored verbatim and simply ignored by the UI. Returns { id, previous, value } — the prior value is read first so you can report and undo the change (previous is null when the key was unset).
In plain terms: Two separate sets of settings behind one tool, told apart by action. get/set are the values the agent falls back to when you do not say one — stop repeating yourself and set them once. get_ui/set_ui are ComfyUI’s OWN interface settings, the ones its Settings panel writes; changing those changes the ComfyUI web UI, not what the agent renders.

Parameters

enum
required
Which settings operation to perform, and on WHICH store. “get”/“set” are the MCP server’s own generation defaults (width, steps, cfg, …); “get_ui”/“set_ui” are ComfyUI’s separate frontend UI settings (the Comfy.* ids). “get” takes no other parameters; “set” requires values (optional persist); “get_ui” takes an optional id or filter; “set_ui” requires id + value. Options: action:"get", action:"set", action:"get_ui", action:"set_ui".
object
action:“set” — REQUIRED. Key/value map of GENERATION defaults to set. Keys are typically lowercase (e.g. width, steps). Not for Comfy.* UI ids — those go through action:“set_ui”.
boolean
action:“set” — if true, write to the config file in addition to runtime.
string
ComfyUI UI setting id, e.g. ‘Comfy.Validation.Workflows’. REQUIRED for action:“set_ui”. OPTIONAL for action:“get_ui” — omit to list all stored settings.
string
action:“get_ui” — case-insensitive substring filter on setting ids when listing (e.g. ‘preview’). Ignored when id is given.
string | number | boolean | object | any[]
action:“set_ui” — REQUIRED. New value for the ComfyUI UI setting. Stored as-is; booleans/numbers are NOT coerced from strings (pass true, not “true”).

Examples

You say: What settings do you use when I don’t say?
You get back: The current fallback size, steps, cfg, sampler and checkpoint, and where each came from. You say: Always use 1024 by 1024 and 30 steps, permanently.
You get back: Confirmation of the new defaults. persist: true writes them to your config file so they survive a restart; without it they last only for this session. You say: ComfyUI keeps refusing to open this workflow — loosen its validation.
You get back: The old and new value of that ComfyUI interface setting, so you can put it back. Reload the ComfyUI tab for it to take effect — an already-open tab keeps the old value.