Skip to main content
Glama

export_workflow_json

Read-onlyIdempotent

Export a ComfyUI workflow as JSON in UI or API format, optionally writing it to a file path for sharing or POST /prompt automation.

Instructions

The workflow as JSON: 'ui' (shareable, opens in the editor, keeps layout & notes) or 'api' (for POST /prompt automation).

Pass path to also write the JSON to a file; the dict then reports saved_to instead of embedding the graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
formatNoui
workflow_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.19.0
    • addedInput schema / properties / path
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv0.15.1
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / workflow_id / title
      Removed value: -"Workflow Id"
    • removedInput schema / title
      Removed value: -"export_workflow_jsonArguments"
  3. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds behavior beyond that: 'ui' preserves layout and notes, and passing path has a side effect of writing to a file, after which the dict reports saved_to instead of embedding the graph. That file-write side effect is genuinely useful context not present in the annotations.

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?

Two short passages, front-loaded with the format distinction before the optional path behavior. Every clause carries information; nothing is redundant with the schema or annotations.

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 three-parameter tool with one enum and an existing output schema, the description covers format semantics and the path side effect, which is what an agent needs to call it correctly. Return shape details are legitimately delegated to the output schema.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the burden and largely does: it explains both 'ui' and 'api' enum values with their purposes and explains path as an optional file-write target with its effect on the response. Only workflow_id is left implicit, which is self-evident.

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 names the resource (the workflow) and specifies the two output variants ('ui' vs 'api') with concrete distinguishing traits (layout & notes vs POST /prompt automation). The export verb itself is implicit from the name rather than stated, but an agent can tell what it produces. Sibling tools like save_workflow and port_workflow are not contrasted, so differentiation is partial.

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?

It gives real selection guidance at the format level ('ui' for editor-shareable, 'api' for automation via POST /prompt) and explains what passing path does. However, it never says when to reach for this tool instead of siblings such as port_workflow or save_workflow, so usage is implied rather than explicit.

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