Skip to main content
Glama

comfy_sweep_grid

Enqueue every combination of multiple workflow parameters in a Cartesian grid, with configurable limits and per-prompt assignment labels for output tracking.

Instructions

N-dimensional parameter sweep over a Cartesian product of axes.

Where comfy_sweep varies one widget across a list, this enqueues every combination across multiple axes. E.g. seed x cfg x steps with 3 values on each axis produces 27 queued prompts.

Args: workflow: Base API-format workflow. axes: Mapping of 'node_id.param' -> list of values. At least 1 axis; order is preserved for the returned grid_shape. max_combinations: Hard cap on total queued prompts. Reject the call when the Cartesian product would exceed this. Default 64.

Returns: JSON with prompt_ids list (length = product of axis sizes), the grid_shape (e.g. [3, 3, 3] for 3x3x3), and a per-prompt assignment map so the caller can label each output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axesYes
workflowYes
max_combinationsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With annotations having destructiveHint=false and readOnlyHint=false, the description adds safety context by stating a hard cap (max_combinations) that will 'Reject the call' when exceeded, preventing runaway operations. It also explains the Cartesian product behavior and the returned grid_shape and assignment map, which are behavioral details not in the annotations. Fails a 5 only because it doesn't mention whether it modifies any state or requires specific permissions.

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 compact and well-structured: a concise summary of purpose, a clear distinction from siblings, a terse example, a structured Args section, and a Returns section. Every sentence provides value without fluff, front-loading the core concept before implementation details.

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?

The description is complete for a sweep tool with an output schema: it specifies the required workflow and axes, the tier cap, and the return format (prompt_ids, grid_shape, assignment map). The output schema likely covers exact JSON structure, so the description's brief but sufficient note on returns is acceptable. Loses a point because it doesn't detail edge cases like empty axes lists or validation of axis values, but for typical usage it's adequate.

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?

Despite schema coverage being 0%, the description thoroughly explains the purpose of each parameter: workflow as the base API-format workflow, axes as a mapping with format 'node_id.param' -> list of values, and max_combinations as a hard cap with default 64. This adds semantics beyond the bare schema (which only provides types), compensating for the lack of schema descriptions. Not a 5 because it doesn't give examples of valid axes keys or value constraints.

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 clearly states the tool performs an 'N-dimensional parameter sweep' over a Cartesian product, with the key difference from comfy_sweep ('varies one widget') explicitly noted. It names the resources (workflow, axes) and outcomes (queued prompts). While it doesn't mention all sibling tools, it distinguishes itself from the most similar one, earning a 4 rather than a 5.

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 gives a clear context for when to use this tool: when you need to enqueue multiple combinations across multiple axes, contrasted with comfy_sweep for single-axis variation. It implies this is for exhaustive search rather than targeted variations, though it doesn't explicitly state when NOT to use it (e.g., for simple single-axis sweeps). The example (seed x cfg x steps) provides practical guidance.

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/dreamrec/ComfyPilot'

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