Skip to main content
Glama

add_node

Adds a node to a dynamic ComfyUI workflow and returns its new node ID for chaining further steps.

Instructions

Add a node to a dynamic workflow. Returns the new node id (e.g. "1", "2").

Input Schema

NameRequiredDescriptionDefault
inputsNoNode inputs (literal values; use connect_nodes for links)
class_typeYesComfyUI node class (e.g. CheckpointLoaderSimple, CLIPTextEncode)
workflow_idYesWorkflow id from create_workflow

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the burden; it does usefully disclose the return value (new node id as a string), which compensates for the missing output schema. However, it says nothing about persistence, whether the node is initially unconnected, or error behavior for an invalid class_type/workflow_id.

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?

Two short sentences, action first and return value second, with zero waste. Ideal for a simple mutation tool.

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 a simple 3-parameter tool with complete schema coverage and a described return value, the definition is largely sufficient. Only the workflow-sequencing and persistence semantics are absent, which are minor for this tool.

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 description coverage is 100%, so required workflow_id, class_type, and inputs are already documented with examples, including the note to use connect_nodes for links. The description adds nothing beyond the schema for parameters, which is the baseline 3 case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Add a node") and scope ("to a dynamic workflow"), and even discloses the return value. It is distinguishable from remove_node/connect_nodes, but it does not explicitly name those siblings as alternatives.

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

Usage Guidelines2/5

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

No guidance on when to use this versus connect_nodes, set_node_input, or build_workflow, and no stated prerequisite that a workflow must first be created via create_workflow (that only appears in the schema). The agent must infer the workflow-building sequence.

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