Skip to main content
Glama

comfyui_get_workflow_from_image

Read-onlyIdempotent

Extract the exact ComfyUI workflow and prompt metadata embedded in a generated PNG to retrieve and reuse the original generation settings.

Instructions

Extract embedded workflow and prompt metadata from a ComfyUI-generated PNG.

    ComfyUI embeds the full workflow JSON and prompt data in PNG text chunks.
    This enables extracting the exact settings used to generate an image
    for inspection or re-execution.

    Args:
        filename: Name of the PNG file to extract metadata from
        subfolder: Subfolder within ComfyUI's output directory (default: empty)

    Returns:
        Dict with 'workflow' (parsed JSON or None), 'prompt' (parsed JSON or None),
        and 'message' (human-readable status).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
subfolderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already cover read-only and non-destructive behavior. The description adds value by explaining the underlying mechanism ('ComfyUI embeds the full workflow JSON and prompt data in PNG text chunks') and detailing return values (workflow/prompt parsed JSON or None, plus a message). This goes beyond the annotation hints, though it does not discuss error handling or edge cases.

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

Conciseness5/5

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

The description is well-structured with a summary paragraph, a short explanation of why, and a clean Args/Returns layout. Every sentence contributes necessary detail; there is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and the presence of output schema plus annotations, the description is complete. It explains the parameters, return shape, and purpose. No critical information is missing for an agent to select and invoke the tool correctly.

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

Parameters5/5

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

Schema description coverage is 0%, but the Args section provides meaningful definitions: filename is 'Name of the PNG file to extract metadata from', and subfolder is 'Subfolder within ComfyUI's output directory (default: empty)'. This fully compensates for the missing schema descriptions and clarifies the expected path semantics.

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

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Extract embedded workflow and prompt metadata from a ComfyUI-generated PNG', which is a specific verb and resource. It clearly differentiates from siblings like comfyui_get_model_metadata and comfyui_get_image by focusing on embedded workflow extraction. The phrase 'for inspection or re-execution' further clarifies why this tool exists.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context: 'This enables extracting the exact settings used to generate an image for inspection or re-execution.' This implies when to use the tool but does not explicitly mention alternatives or when-not-to-use conditions. Because alternatives are not named, it falls short of a 5.

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/hybridindie/comfyui_mcp'

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