Skip to main content
Glama

build_node

Read-onlyIdempotent

Generate valid ComfyUI node JSON with inputs and outputs for workflow assembly. Set custom inputs or use defaults and placeholders for connections.

Instructions

Generate valid node JSON with proper inputs/outputs that can be assembled into a workflow. Provide inputs to override defaults, or leave empty to get a node with default values and placeholders for connections.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nodeType": "<nodeType>",
      "nodeId": "<nodeId>"
    },
    "name": "build_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsNoInput values to set. For connections, use [nodeId, slotIndex] format. Omitted inputs use defaults.
nodeIdYesThe node ID for this node in the workflow (e.g., '1', '5')
nodeTypeYesThe node class_type (e.g., 'KSampler', 'CheckpointLoaderSimple')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint and idempotentHint, so the safety profile is covered and the 'generate' framing is consistent with a non-mutating builder. The description adds that omitted inputs yield defaults and placeholder connections, which is useful. It does not disclose behavior on an unknown nodeType, whether output is a string or object, or any validation/side effects.

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?

Two sentences, front-loaded with the outcome and followed by the parameter choice; no filler. Slightly terse for the nested 'inputs' object, but efficient.

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?

For a three-parameter builder with no output schema, the description says what is produced (valid node JSON with inputs/outputs and connection placeholders) and how defaults behave. The remaining gap, error behavior for invalid nodeType and the exact return type, is modest.

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%, and the schema itself documents inputs format ([nodeId, slotIndex]), nodeId and nodeType with examples. The description only restates the override-defaults behavior for inputs, adding no syntax or example detail beyond the schema, so baseline 3 applies.

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 concrete verb and resource: 'Generate valid node JSON ... assembled into a workflow,' which is specific enough to distinguish it from lookup siblings like get_node_info and list_nodes. It stops short of naming an alternative tool explicitly, so it is clear but not maximally differentiated.

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

Usage Guidelines3/5

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

It explains the two usage modes ('provide inputs to override defaults, or leave empty'), which is genuine how-to guidance. It gives no when-to-use context against siblings (e.g., information lookup vs. JSON construction) and no stated preconditions such as whether nodeType must be valid.

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