Skip to main content
Glama

generate_with_api_node

Build and enqueue a minimal workflow using a chosen API node and its inputs. Returns the prompt ID for result retrieval.

Instructions

Build a minimal single-node workflow that runs a chosen API/partner node with the provided inputs and enqueue it. Returns immediately with the prompt_id (use get_job_status / get_history for results). Do NOT pass auth credentials in inputs — the ComfyUI server injects those from its logged-in session. Use get_api_node_schema to discover valid inputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsYesInput values keyed by input name, per the node's schema.
class_typeYesThe API node class_type to run (from list_api_nodes / get_api_node_schema).
disable_random_seedNoIf true, do not randomize seed/noise_seed inputs.
Behavior4/5

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

No annotations exist, so the description carries full burden. It discloses that the tool returns immediately with a prompt_id and that results are fetched via get_job_status/get_history. It also warns about auth injection. It could mention the enqueuing behavior explicitly but already states 'enqueue it'.

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 three concise sentences with no fluff. It front-loads the main action, then adds warnings and usage tips. Every sentence earns its place.

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?

For a simple tool with 3 parameters and no output schema, the description fully explains the return value (prompt_id), how to retrieve results, and critical auth guidance. No gaps given the complexity.

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 coverage is 100% (all three parameters documented in schema). The description adds minimal value: for class_type it references list_api_nodes/get_api_node_schema, but otherwise repeats schema descriptions. Baseline 3 is appropriate.

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 clearly states: 'Build a minimal single-node workflow that runs a chosen API/partner node...' This specifies the verb (build and run), resource (API/partner node), and distinguishes from siblings like generate_image or generate_audio which target specific node types.

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 explicitly advises: 'Do NOT pass auth credentials in inputs' and suggests using get_api_node_schema for valid inputs. It provides clear when-to-use context but could further differentiate from other generate tools like generate_with_controlnet.

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/artokun/comfyui-mcp'

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