comfy_get_queue
Check the current generation queue status 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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/queue.ts:5-47 (handler)The handler function that implements the core logic of the 'comfy_get_queue' tool. It retrieves the current ComfyUI queue, formats running and pending items, and handles errors.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)Tool registration entry in the ListTools response, including name, description, and empty input schema.{ 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)Dispatch case in the CallToolRequest handler that invokes the handleGetQueue function.case 'comfy_get_queue': return await handleGetQueue();
- src/server.ts:18-21 (registration)Import statement for the handleGetQueue handler from the queue module.handleGetQueue, handleCancelGeneration, handleClearQueue } from './tools/queue.js';
- src/server.ts:115-118 (schema)Inline JSON schema definition for the tool's input (empty object, no parameters required).inputSchema: { type: 'object', properties: {}, },