Skip to main content
Glama

get_defaults

Fetch the current generation defaults to verify the exact values workflow tools will use before generating an image, including config, environment, and runtime precedence, even without ComfyUI running.

Instructions

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.Execution.PreviewMethod (default|none|auto|latent2rgb|taesd), 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.Execution.PreviewMethod (default|none|auto|latent2rgb|taesd), 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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoComfyUI UI setting id, e.g. 'Comfy.Validation.Workflows'. REQUIRED for action:"set_ui". OPTIONAL for action:"get_ui" — omit to list all stored settings.
valueNoaction:"set_ui" — REQUIRED. New value for the ComfyUI UI setting. Stored as-is; booleans/numbers are NOT coerced from strings (pass true, not "true").
actionYesWhich 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`.
filterNoaction:"get_ui" — case-insensitive substring filter on setting ids when listing (e.g. 'preview'). Ignored when `id` is given.
valuesNoaction:"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".
persistNoaction:"set" — if true, write to the config file in addition to runtime.
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description fully covers behavioral aspects: read-only vs write operations, persistence semantics (runtime vs config/file), restart behavior, availability constraints (Comfy Cloud mode), type coercion absence, and return value details (e.g., for set_ui). It even explains the precedence of settings and how per-call MCP args override defaults.

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

Conciseness4/5

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

The description is long (over 500 words) but structured per action with bullet points. Every sentence adds necessary detail given the complexity of four distinct actions. It is front-loaded with the core purpose and then elaborates systematically. While not minimal, the length is justified by the tool's multi-action nature.

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

Completeness4/5

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

Given the tool's complexity (6 parameters, 4 actions, two stores) and the absence of an output schema, the description covers most essential context: it explains precedence, persistence, availability, and known IDs. However, it omits the return structure for 'get' and 'get_ui' actions (it mentions a merged view but not its schema, and lists settings but not their format). Minor gap, but overall very complete.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds significant value beyond the schema: it ties each parameter to specific actions, explains required/optional contexts (e.g., 'REQUIRED for action:"set_ui"'), provides enumerations of known IDs, and clarifies type handling (booleans/numbers not coerced). This goes well beyond what the schema alone conveys.

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 clearly states the tool's purpose: reading and writing settings, with explicit differentiation between two separate stores (generation defaults vs ComfyUI UI settings). It uses specific verbs for each action and distinguishes the tool from siblings by covering unique functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use each action, including when not to (e.g., 'Not for Comfy.* UI ids — those go through action:"set_ui"'). It outlines prerequisites (e.g., 'Requires a reachable local or remote ComfyUI') and clarifies context for each of the four actions.

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

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