Skip to main content
Glama

get_history

Retrieve recent ComfyUI generation history to view past workflow jobs, outputs, and statuses for monitoring and analysis.

Instructions

Get recent generation history.

Args: limit: Maximum number of history entries (1-100, default: 10) Returns history entries with outputs and status for each job. Use this to see past generations and their results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax entries to return

Implementation Reference

  • The MCP tool handler for 'get_history', decorated with @mcp.tool(). Fetches recent ComfyUI generation history using the limit parameter and handles errors.
    @mcp.tool() def get_history( limit: int = Field(default=10, ge=1, le=100, description="Max entries to return"), ctx: Context = None, ) -> dict: """Get recent generation history. Args: limit: Maximum number of history entries (1-100, default: 10) Returns history entries with outputs and status for each job. Use this to see past generations and their results. """ if ctx: ctx.info(f"Fetching last {limit} history entries...") try: return comfy_get(f"/history?max_items={limit}") except Exception as e: return ErrorResponse.unavailable(str(e)).model_dump()
  • Helper function in api.py that performs the actual API call to retrieve history, used by the tool handler.
    def get_history(max_items: int = 10) -> dict: """Get generation history.""" return comfy_get(f"/history?max_items={max_items}")

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