Skip to main content
Glama

remove_node

Delete a specific node from a ComfyUI workflow to modify or simplify the automation process.

Instructions

Remove a node from a workflow.

Args: workflow: Workflow dict to modify node_id: ID of node to remove Warning: This doesn't update connections from other nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowYesWorkflow dict to modify
node_idYesNode ID to remove

Implementation Reference

  • The remove_node tool handler: removes the specified node from the workflow dictionary by deleting the key. Includes inline schema via Pydantic Field and registration via @mcp.tool() decorator.
    @mcp.tool() def remove_node( workflow: dict = Field(description="Workflow dict to modify"), node_id: str = Field(description="Node ID to remove"), ctx: Context = None, ) -> dict: """Remove a node from a workflow. Args: workflow: Workflow dict to modify node_id: ID of node to remove Warning: This doesn't update connections from other nodes. """ if ctx: ctx.info(f"Removing node: {node_id}") if node_id in workflow: del workflow[node_id] return workflow
  • Invocation of register_workflow_tools(mcp) which registers the remove_node tool among others.
    register_workflow_tools(mcp)

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/IO-AtelierTech/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server