Skip to main content
Glama

list_nodes

Discover available ComfyUI nodes for workflow building by filtering nodes by name or category to identify components needed for automation tasks.

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

  • Core implementation of the list_nodes MCP tool. Filters and returns sorted list of available ComfyUI node names using cached data.
    @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}"]
  • Input schema defined using Pydantic Field for the filter (optional name filter) and category (optional exact category match) parameters.
    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,
  • Registers the discovery tools (including list_nodes) by calling register_discovery_tools during overall tool registration.
    register_discovery_tools(mcp)
  • Top-level registration of all MCP tools, which chains to list_nodes registration.
    register_all_tools(mcp)
  • Uses get_cached_nodes() helper from api.py to fetch node data efficiently.
    nodes = get_cached_nodes()
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns 'a sorted list of node class names,' which is useful behavioral context not in the schema. However, it does not mention potential limitations like rate limits, authentication needs, or whether the list is paginated/complete, leaving gaps for a read operation.

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?

The description is appropriately sized and front-loaded, starting with the core purpose. The Args and Returns sections are structured but slightly verbose; every sentence earns its place by clarifying usage, though it could be more streamlined (e.g., integrating the 'Use this' sentence into the opening).

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

Completeness3/5

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

Given the tool's low complexity (read-only list operation), 2 parameters with full schema coverage, and no output schema, the description is adequate but has gaps. It explains the return format ('sorted list of node class names') but does not cover behavioral aspects like error handling or performance, which could be useful for an agent. It meets minimum viability but lacks depth.

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 the schema already documents both parameters ('filter' and 'category') with descriptions. The description adds minimal value by restating the parameters in the Args section without providing additional meaning beyond the schema, such as examples of categories or how filtering interacts. Baseline 3 is appropriate as the schema does the heavy lifting.

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 specific action ('List available ComfyUI nodes') and resource ('nodes'), distinguishing it from siblings like 'search_nodes' (which likely has different filtering capabilities) and 'get_node_info' (which focuses on individual node details). It explicitly mentions the purpose is 'to discover available nodes for workflow building,' making the intent unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool ('to discover available nodes for workflow building'), but it does not explicitly state when not to use it or name alternatives like 'search_nodes' (which might offer more advanced filtering). The guidance is helpful but lacks explicit exclusions or comparisons with sibling tools.

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

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