Skip to main content
Glama

emit_partner_workflow

Write a local API workflow containing a partner model's node, avoiding upfront API calls and spending. Run the saved workflow later to execute and bill.

Instructions

Write a runnable workflow that drives a partner model's NODE on LOCAL ComfyUI.

Wraps comfy generate <model> --emit-workflow <out_path>. Writes an API-format graph containing the partner's API node and returns — calls no partner API, spends nothing. Chain::

emit_partner_workflow("flux-pro", "/tmp/flux.json", {"prompt": "a red fox"})
run_workflow("/tmp/flux.json", confirm_spend=True)   # the node bills HERE
fetch_outputs(prompt_id)

Args: model: only FIVE aliases map to a node — flux-2, flux-pro, kling-i2v, nano-banana, seedance. Everything else raises; route to partner_generate instead (narrow coverage, not "unsupported"). params: the model's own inputs, same validation as partner_generate; optional even where the proxy requires them (defaults fillable later via set_workflow_slot). out_path: the workflow JSON to write. comfy-cli OVERWRITES it in place with no existence check — name a fresh file.

Returns: comfy-cli's own {"out": ..., "model": ..., "nodes": ...}.

Gotchas: - No confirm_spend here: this call never spends. RUNNING the emitted graph is what bills — pass confirm_spend=True to that run_workflow call, and do not read its absence as protection: a comfy-cli lacking the spend gate runs and bills silently regardless.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
paramsNo
out_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description fully discloses side effects: it never spends, but running the emitted graph does; it overwrites out_path in place without existence checks; and a comfy-cli lacking the spend gate bills silently. It also states it spends nothing and calls no partner API, providing complete behavioral context.

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 uses clear headings (Args, Returns, Gotchas) and a code chain example. Every sentence adds value: purpose, chain, parameter details, return format, and safety caveats. It is thorough yet tight, with front-loaded purpose and no 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 no annotations and no output schema, the description provides everything an agent needs: what it does, how to call it with each parameter, the return shape, and critical gotchas. The chain example ties it to sibling tools. Nothing essential is missing for correct invocation.

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 coverage is 0%, so the description must carry all parameter meaning. It does: model is constrained to five aliases (with routing advice), params mirrors partner_generate's validation and is optional even where the proxy requires it, and out_path points to the JSON file with an overwrite warning. This fully compensates for the schema's lack of description.

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 a precise verb+resource: 'Write a runnable workflow that drives a partner model's NODE on LOCAL ComfyUI.' It clearly identifies the tool's function (emit a workflow graph) and distinguishes it from siblings by noting that non-listed models route to partner_generate. The chain example further clarifies the role.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: it names the alternative partner_generate for models outside the five listed, and explains the full chain (emit → run_workflow → fetch_outputs), including that billing occurs at run_workflow, not at emit. It also warns against assuming the absence of confirm_spend means safety, which is a clear usage caveat.

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