Skip to main content
Glama

comfy_get_queue

Retrieve current generation queue details to monitor running and pending AI image processing tasks in ComfyUI.

Instructions

Get detailed information about the current generation queue, including running and pending items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'comfy_get_queue' tool. It retrieves the current queue from the ComfyUI client, formats the running and pending items, and returns a JSON response.
    export async function handleGetQueue() {
      try {
        const client = getComfyUIClient();
        const queue = await client.getQueue();
    
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              running: queue.queue_running.map((item: any) => ({
                prompt_id: item[1],
                number: item[0],
                workflow_summary: "generation"
              })),
              pending: queue.queue_pending.map((item: any) => ({
                prompt_id: item[1],
                number: item[0],
                workflow_summary: "generation"
              })),
              summary: `${queue.queue_running.length} running, ${queue.queue_pending.length} pending`
            }, null, 2)
          }]
        };
      } catch (error: any) {
        if (error.error) {
          return {
            content: [{
              type: "text",
              text: JSON.stringify(error, null, 2)
            }],
            isError: true
          };
        }
    
        return {
          content: [{
            type: "text",
            text: JSON.stringify(ComfyUIErrorBuilder.connectionError(error.message), null, 2)
          }],
          isError: true
        };
      }
    }
  • src/server.ts:112-119 (registration)
    Registers the 'comfy_get_queue' tool in the MCP server's listTools response, specifying name, description, and input schema (empty object since no parameters required).
    {
      name: 'comfy_get_queue',
      description: 'Get detailed information about the current generation queue, including running and pending items.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/server.ts:176-177 (registration)
    In the tool call dispatcher switch statement, routes calls to 'comfy_get_queue' to the handleGetQueue function.
    case 'comfy_get_queue':
      return await handleGetQueue();
  • Defines the input schema for the 'comfy_get_queue' tool as an empty object (no input parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it gets 'detailed information' but does not disclose behavioral traits such as rate limits, authentication needs, or what format the information is returned in. This is a significant gap for a tool with zero annotation coverage.

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 a single, efficient sentence that front-loads the purpose ('Get detailed information about the current generation queue') and adds specific scope ('including running and pending items'). There is zero waste, making it highly concise and well-structured.

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 0 parameters and no output schema, the description is adequate for a simple read operation but incomplete. It lacks details on return format, error handling, or behavioral context, which are important for an agent to use the tool effectively without annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter information is needed in the description. The baseline for this scenario is 4, as the description appropriately focuses on purpose without redundant parameter details.

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 verb 'Get' and the resource 'detailed information about the current generation queue', specifying it includes 'running and pending items'. This distinguishes it from siblings like comfy_get_status (general status) or comfy_get_output_images (specific output).

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

Usage Guidelines3/5

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

The description implies usage for checking queue details, but does not explicitly state when to use this tool versus alternatives like comfy_get_status or comfy_wait_for_completion. No exclusions or prerequisites are mentioned, leaving usage context somewhat vague.

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/Nikolaibibo/claude-comfyui-mcp'

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