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)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'Returns status information including completion state', which adds some behavioral context about the output. However, it lacks details on error handling, rate limits, authentication needs, or whether this is a read-only operation, leaving significant gaps for a tool that queries system state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose in the first sentence, followed by structured Args and Returns sections. It's efficient with no wasted words, though the formatting could be slightly cleaner for better readability.

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 no annotations and no output schema, the description provides basic purpose and parameter context but is incomplete. It doesn't detail the structure of the returned status information, error cases, or how it integrates with sibling tools like 'submit_workflow', leaving the agent with insufficient guidance for robust use.

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter 'prompt_id' documented as 'Prompt ID to check'. The description adds minimal value by specifying 'The prompt ID from submit_workflow()', which provides a source context but doesn't elaborate on format or validation beyond what the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 resource 'status of a submitted prompt', making the purpose specific and understandable. However, it doesn't explicitly differentiate from siblings like 'get_queue_status' or 'get_history', which might also provide status information in different contexts.

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 by referencing 'prompt_id from submit_workflow()', suggesting it should be used after submission to check completion. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'get_queue_status' or 'get_history', nor does it mention prerequisites or exclusions.

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/IO-AtelierTech/comfyui-mcp'

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