Skip to main content
Glama

scaffold_custom_node

Generate a new ComfyUI custom node pack with required files, sample node, and optional frontend. Use as the first step to author and test your own custom nodes.

Instructions

Generate a new ComfyUI custom-node pack from a template into /custom_nodes//. Writes pyproject.toml (with the [tool.comfy] PublisherId/DisplayName/Icon table the Comfy Registry requires), init.py exporting NODE_CLASS_MAPPINGS / NODE_DISPLAY_NAME_MAPPINGS, and src/nodes.py containing a runnable sample node (INPUT_TYPES/RETURN_TYPES/FUNCTION/CATEGORY), plus .comfyignore and .gitignore. Optionally emits a web/js frontend stub (wiring WEB_DIRECTORY) and a GitHub Actions publish workflow (with_ci). This is the FIRST step of the author loop: scaffold here, then restart_comfyui to load it, test it, and finally publish_custom_node. LOCAL-ONLY: it writes to your local ComfyUI install and requires COMFYUI_PATH (it does nothing for a remote --comfyui-url target). Names must be a safe lowercase slug and cannot escape custom_nodes/; an existing non-empty directory is left untouched unless overwrite is true. Use this to CREATE a pack you author — to install someone else's pack use install_custom_node instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPack folder name — a safe lowercase slug (letters, digits, hyphens, underscores), e.g. 'my-cool-nodes'. Becomes the directory under custom_nodes/ and the pyproject [project].name.
display_nameYesHuman-readable name shown in the ComfyUI node menu and the registry listing.
categoryNoNode menu category for the sample node (default 'custom').
descriptionNoShort description written to pyproject [project].description.
publisher_idNoYour Comfy Registry publisher id, stamped into [tool.comfy].PublisherId. If omitted a placeholder is written that you must replace before publishing.
with_frontendNoIf true, also generate a web/js/<name>.js extension stub and set WEB_DIRECTORY (default false).
with_ciNoIf true, also generate .github/workflows/publish_action.yml (Comfy-Org/publish-node-action; needs the REGISTRY_ACCESS_TOKEN repo secret) so pushing a pyproject.toml version bump auto-publishes (default false).
overwriteNoIf true, overwrite template files in an existing pack directory instead of refusing (default false).
Behavior5/5

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

No annotations provided, so description carries full burden. Details file creation, safe slug requirement, directory escaping restriction, non-overwrite default, optional features (with_frontend, with_ci), and placeholder handling for publisher_id. Comprehensive behavioral disclosure.

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?

Description is appropriately sized with each sentence adding value. Front-loaded with main action. Could be slightly more concise, but well-structured overall.

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

Completeness5/5

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

Despite no output schema, description thoroughly explains generated files and their purpose. Provides workflow context (first step of author loop) and links to sibling tools. Complete for a scaffolding tool with 8 parameters.

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 baseline is 3. Description adds some context (e.g., name becomes directory name) but mostly summarizes schema. Does not significantly enhance parameter understanding beyond schema.

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 generates a custom-node pack from a template into ComfyUI's custom_nodes directory, listing specific files created (pyproject.toml, __init__.py, src/nodes.py, etc.). It distinguishes from the sibling 'install_custom_node' by specifying this is for authoring, not installing.

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?

Explicitly describes when to use: 'This is the FIRST step of the author loop' and advises alternatives: 'to install someone else's pack use install_custom_node instead'. Also notes local-only requirement and COMFYUI_PATH dependency.

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