get_prompt_status
Check the completion status of a submitted ComfyUI workflow prompt by providing its ID to monitor progress and retrieve execution results.
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
| Name | Required | Description | Default |
|---|---|---|---|
| prompt_id | Yes | Prompt ID to check |
Implementation Reference
- Core implementation of the get_prompt_status tool. Queries ComfyUI /history endpoint for the prompt status and returns structured status information including completion state and errors.@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()
- src/comfy_mcp_server/tools/__init__.py:28-28 (registration)Registers the execution tools module, which includes the get_prompt_status tool, by calling register_execution_tools(mcp).register_execution_tools(mcp)
- src/comfy_mcp_server/__init__.py:92-92 (registration)Top-level registration of all tools by calling register_all_tools(mcp), which in turn registers the execution tools including get_prompt_status.register_all_tools(mcp)