Skip to main content
Glama

set_defaults

Update generation defaults to avoid re-entering common values like width, height, steps, cfg, sampler, and checkpoint. Optionally persist changes to config file.

Instructions

Update generation defaults. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYesKey/value map of defaults to set. Keys are typically lowercase (e.g. width, steps).
persistNoIf true, write to the config file in addition to runtime.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that changes are by default in-memory and lost on restart, and that persist=true writes to a config file at a specific path. This is sufficient behavioral context for a mutation tool, though it could mention if any permissions are required.

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?

The description is three sentences, each serving a purpose: stating the action, explaining default vs persistent behavior, and providing a use case. No unnecessary words, making it highly efficient and easily parseable by an AI agent.

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 has no output schema, the description focuses on input behavior and side effects. It covers the key aspects: what changes, default vs persist, and config file location. While it doesn't mention return value, the absence is acceptable for a mutation tool. The description is comprehensive enough for an agent to use correctly.

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

Parameters4/5

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

Schema coverage is 100% as both parameters have descriptions. The description adds value by providing example keys (width, height, steps, cfg, sampler, checkpoint) and noting that keys are typically lowercase, which is not in the schema. This helps the agent understand the expected format beyond the schema's generic 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 clearly states the tool updates generation defaults, specifying the verb 'update' and resource 'generation defaults'. It distinguishes from the sibling tool 'get_defaults' by indicating this is a write operation. It also provides context about in-memory vs persisted changes, making the purpose unambiguous.

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 explains when to use the tool: to avoid repeating common values. It also provides guidance on the persist parameter: by default updates runtime memory, and to persist changes pass persist=true. It does not explicitly mention when not to use it or alternatives, but the context is clear enough for an AI agent.

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