Skip to main content
Glama

get_prompt_status

Check the completion status of a submitted ComfyUI workflow prompt to monitor progress and determine when processing finishes.

Instructions

Get the status of a submitted prompt.

Args: prompt_id: The prompt ID from submit_workflow() Returns status information including completion state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prompt_idYesPrompt ID to check

Implementation Reference

  • The handler function for the 'get_prompt_status' MCP tool. It queries the ComfyUI /history/{prompt_id} endpoint to retrieve and parse the prompt's status, completion state, messages, and output availability.
    @mcp.tool() def get_prompt_status( prompt_id: str = Field(description="Prompt ID to check"), ctx: Context = None, ) -> dict: """Get the status of a submitted prompt. Args: prompt_id: The prompt ID from submit_workflow() Returns status information including completion state. """ if ctx: ctx.info(f"Checking status: {prompt_id}") try: history = comfy_get(f"/history/{prompt_id}") if prompt_id not in history: return {"status": "pending", "completed": False} entry = history[prompt_id] status = entry.get("status", {}) return { "status": status.get("status_str", "unknown"), "completed": status.get("completed", False), "messages": status.get("messages", []), "has_outputs": len(entry.get("outputs", {})) > 0, } except Exception as e: return ErrorResponse.unavailable(str(e)).model_dump()
  • Top-level registration call for execution tools module, which includes the registration of 'get_prompt_status' via its @mcp.tool() decorator in execution.py.
    register_execution_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