Skip to main content
Glama

clear_queue

Remove pending jobs from the ComfyUI workflow queue by clearing all items or deleting specific prompt IDs to manage processing tasks.

Instructions

Clear the queue or delete specific items.

Args: delete_ids: Optional list of prompt IDs to delete. If not provided, clears entire queue. Use this to remove pending jobs from the queue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delete_idsNoSpecific prompt IDs to delete

Implementation Reference

  • The MCP tool handler for 'clear_queue'. It calls ComfyUI's /queue API to clear the queue or delete specific prompt IDs, logging via ctx and returning a success/failure message.
    @mcp.tool() def clear_queue( delete_ids: list = Field(default=None, description="Specific prompt IDs to delete"), ctx: Context = None, ) -> str: """Clear the queue or delete specific items. Args: delete_ids: Optional list of prompt IDs to delete. If not provided, clears entire queue. Use this to remove pending jobs from the queue. """ if ctx: if delete_ids: ctx.info(f"Deleting {len(delete_ids)} items from queue") else: ctx.info("Clearing entire queue") if delete_ids: status, _ = comfy_post("/queue", {"delete": delete_ids}) else: status, _ = comfy_post("/queue", {"clear": True}) return "Queue cleared" if status == 200 else "Clear failed"
  • Registration call for system tools, including clear_queue, within the register_all_tools function.
    register_system_tools(mcp)
  • Top-level call to register_all_tools(mcp), which indirectly registers the clear_queue tool.
    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