Skip to main content
Glama

extract_workflow

Read-onlyIdempotent

Extracts embedded workflow JSON from ComfyUI-generated PNG files or URLs, returning it in API format ready to pass directly to run_workflow.

Instructions

Extract the workflow JSON from a ComfyUI-generated PNG image. Works with local file paths or URLs. Returns the workflow in API format that can be passed directly to run_workflow.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source": "<source>"
    },
    "name": "extract_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesPath to a local PNG file or URL of a PNG image with embedded ComfyUI workflow

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and open-world behavior, so the agent knows the safety profile. The description usefully adds that URL sources are supported and what the return format is (API format). It says nothing about failure behavior when the PNG has no embedded workflow, which is the main edge case for this tool.

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?

Three short sentences, front-loaded with the core action, then inputs, then output. Every sentence carries information and there is no padding.

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

Completeness4/5

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

For a one-parameter read-only tool with no output schema, the description covers input sources and the shape of the result well. The only missing piece is guidance on what happens when the image lacks embedded workflow metadata, which would help agents handle failures.

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%, so the single 'source' parameter is already fully documented in the schema. The description restates the local-path/URL distinction but adds no format details (e.g., scheme requirements, relative paths) beyond what the schema provides.

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?

Names a specific verb and resource ('Extract the workflow JSON from a ComfyUI-generated PNG image') and constrains the input type clearly. It is easy to tell apart from siblings like run_workflow or get_example_workflow.

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?

Provides clear context on supported inputs (local file paths or URLs) and implicitly positions the tool as a predecessor to run_workflow by saying the output can be passed directly to it. It does not state exclusions, such as what to do with non-ComfyUI images.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.