refresh_nodes
Updates the node cache to detect newly installed custom nodes in ComfyUI workflows.
Instructions
Refresh the node cache.
Call this after installing new custom nodes to see them in list_nodes().
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function for the 'refresh_nodes' tool. It refreshes the ComfyUI node cache by clearing it and reloading the node list, then returns a confirmation message with the count of available nodes.@mcp.tool() def refresh_nodes(ctx: Context = None) -> str: """Refresh the node cache. Call this after installing new custom nodes to see them in list_nodes(). """ if ctx: ctx.info("Refreshing node cache...") clear_node_cache() try: nodes = get_cached_nodes() return f"Cache refreshed. {len(nodes)} nodes available." except Exception as e: return f"Error refreshing cache: {e}"