Skip to main content
Glama

list_models

List available models, samplers, schedulers, upscalers, or LoRAs from a ComfyUI instance. Use to find valid values for checkpoint parameters or see installed resources.

Instructions

List available models or samplers on the ComfyUI instance. Use this to discover valid values for the 'checkpoint' parameter of other tools, or to see what LoRAs and samplers are installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoWhich category of resource to listcheckpoints

Implementation Reference

  • The 'list_models' tool handler registered via server.tool(). It calls fetchList() with the kind argument and returns a formatted text response listing the available models/samplers.
    server.tool(
      "list_models",
      "List available models or samplers on the ComfyUI instance. Use this to discover valid values for the 'checkpoint' parameter of other tools, or to see what LoRAs and samplers are installed.",
      listModelsSchema,
      async (args) => {
        const list = await fetchList(client, args.kind);
        const body =
          list.length > 0
            ? list.map((n, i) => `  ${i + 1}. ${n}`).join("\n")
            : "  (none found)";
        return {
          content: [
            {
              type: "text" as const,
              text: `${args.kind} (${list.length}):\n${body}`,
            },
          ],
        };
      },
    );
  • Zod schema defining the 'kind' parameter for list_models: enum of 'checkpoints', 'loras', 'samplers', 'schedulers', 'upscalers' with default 'checkpoints'.
    const listModelsSchema = {
      kind: z
        .enum(["checkpoints", "loras", "samplers", "schedulers", "upscalers"])
        .default("checkpoints")
        .describe("Which category of resource to list"),
    };
  • src/server.ts:45-45 (registration)
    Registration call that wires registerModelTools (which contains the list_models tool) into the MCP server during initialization.
    registerModelTools(s, client);
  • fetchList() helper function that dispatches to the appropriate ComfyUIClient method based on the kind parameter.
    async function fetchList(
      client: ComfyUIClient,
      kind: "checkpoints" | "loras" | "samplers" | "schedulers" | "upscalers",
    ): Promise<string[]> {
      switch (kind) {
        case "checkpoints":
          return client.listCheckpoints();
        case "loras":
          return client.listLoras();
        case "samplers":
          return client.listSamplers();
        case "schedulers":
          return client.listSchedulers();
        case "upscalers":
          return client.listUpscaleModels();
      }
    }
  • listNodeOptions() private helper that fetches object info for a node class and extracts available options for a given field name. Used by listCheckpoints, listLoras, listSamplers, listSchedulers, listUpscaleModels.
    private async listNodeOptions(
      nodeClass: string,
      fieldName: string,
    ): Promise<string[]> {
      const info = await this.getObjectInfo(nodeClass);
      const node = info[nodeClass];
      const field = node?.input?.required?.[fieldName];
      if (!Array.isArray(field) || !Array.isArray(field[0])) return [];
      return field[0] as string[];
    }
Behavior3/5

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

No annotations are provided, so the description must carry behavioral context. It implies a read-only operation by saying 'List available...', but it does not explicitly state it is safe or idempotent, nor does it mention any potential side effects or required permissions. The description adds minimal behavioral depth beyond the verb.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences. The first sentence states the primary function, and the second provides concrete usage guidance. No unnecessary words or repetition. Every sentence earns its place.

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?

The description does not mention the output format or structure (e.g., returns list of names, models, or objects). Since there is no output schema, the description should ideally provide hints about the return value. It also does not note the default value 'checkpoints' from the schema. The tool is simple, so completeness is adequate but not thorough.

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 coverage is 100% because the parameter 'kind' is described in the schema with enum values. The description adds usage context (e.g., 'checkpoint' parameter), but does not elaborate on the parameter meaning beyond the schema. With full schema coverage, baseline is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists available models or samplers, and provides concrete use cases like discovering valid values for the 'checkpoint' parameter. However, it mentions only 'models or samplers' and 'LoRAs and samplers', while the enum includes schedulers and upscalers as well, slightly narrowing the scope.

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 explicitly tells when to use this tool: to discover valid values for other tools' parameters or to see installed LoRAs/samplers. It does not mention when not to use it or alternative tools, but given the sibling tools are for workflows and generation, no direct alternative exists, so this is adequate.

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/miller-joe/comfyui-mcp'

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