Skip to main content
Glama

list_nodes

Discover available workflow nodes in ComfyUI by filtering results by name or category to identify components for building automation pipelines.

Instructions

List available ComfyUI nodes.

Args: filter: Optional string to match node names (case-insensitive) category: Optional category filter (exact match) Returns a sorted list of node class names. Use this to discover available nodes for workflow building.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoFilter by name (e.g., 'fal', 'image')
categoryNoFilter by category

Implementation Reference

  • The main handler function for the 'list_nodes' tool. It fetches cached nodes using get_cached_nodes(), applies optional filters for name and category, and returns a sorted list of matching node names.
    @mcp.tool() def list_nodes( filter: str = Field(default=None, description="Filter by name (e.g., 'fal', 'image')"), category: str = Field(default=None, description="Filter by category"), ctx: Context = None, ) -> list: """List available ComfyUI nodes. Args: filter: Optional string to match node names (case-insensitive) category: Optional category filter (exact match) Returns a sorted list of node class names. Use this to discover available nodes for workflow building. """ if ctx: ctx.info(f"Listing nodes{' matching: ' + filter if filter else ''}...") try: nodes = get_cached_nodes() result = [] for name, info in nodes.items(): if filter and filter.lower() not in name.lower(): continue if category and info.get("category", "").lower() != category.lower(): continue result.append(name) return sorted(result) except Exception as e: return [f"Error: {e}"]
  • The register_all_tools function calls register_discovery_tools(mcp), which defines and registers the list_nodes tool using @mcp.tool() decorator.
    def register_all_tools(mcp): """Register all tools with the MCP server.""" register_system_tools(mcp) register_discovery_tools(mcp) register_workflow_tools(mcp) register_execution_tools(mcp)
  • Top-level registration call from the main server initialization that triggers registration of all tools including list_nodes.
    register_all_tools(mcp)
  • Pydantic schema definitions for the list_nodes tool parameters using Field for validation and descriptions.
    filter: str = Field(default=None, description="Filter by name (e.g., 'fal', 'image')"), category: str = Field(default=None, description="Filter by category"), ctx: Context = None,

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