Skip to main content
Glama

list_model_folders

Discover available model folder types in ComfyUI to identify valid directories for listing models. This tool helps organize and access model files by returning folder names compatible with the list_models() function.

Instructions

List available model folder types.

Returns a list of valid folder names for list_models().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'list_model_folders' MCP tool. It lists available model folders by calling the ComfyUI '/models' API endpoint.
    @mcp.tool() def list_model_folders(ctx: Context = None) -> list: """List available model folder types. Returns a list of valid folder names for list_models(). """ if ctx: ctx.info("Listing model folders...") try: return comfy_get("/models") except Exception as e: return [f"Error: {e}"]
  • Registers the discovery tools module, which defines and registers the list_model_folders tool.
    register_discovery_tools(mcp)
  • Top-level call to register all tools, chaining to the registration of list_model_folders via tools/__init__.py.
    register_all_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