Skip to main content
Glama

comfy_randomize_seeds

Replace -1 seed sentinels in ComfyUI workflows with fresh random values, or force randomization of all seed widgets. Returns a patched workflow and new seed assignments.

Instructions

Replace seed sentinels (-1) with fresh random uint32 values.

By default, only widgets currently set to -1 are randomised; this lets a caller "opt in" by writing -1 for the seeds they want fresh while pinning the others to specific values. Set force=True to randomise every seed widget in the workflow regardless of its current value.

Uses secrets.randbelow(2**32) for cryptographic-grade randomness - avoids the seeded global random module so concurrent randomisation calls don't share a stream.

Args: workflow: API-format workflow dict (deep-copied; caller's dict stays unchanged). force: Randomise every seed widget regardless of current value.

Returns: JSON with workflow (patched copy) and assignments mapping node_id.field -> new_seed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
workflowYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations give basic safety hints (readOnlyHint=false, destructiveHint=false), but the description adds critical context: it deep-copies the workflow so the caller's dict is unchanged, uses cryptographic randomness via secrets.randbelow, and avoids shared random streams for concurrency. This goes well beyond 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence. Subsequent sentences provide useful behavioral details, but the explanation is slightly longer than strictly necessary (e.g., the cryptographic randomness detail, while relevant, could be trimmed). The Args/Returns structure aids navigation.

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?

The description is complete for this tool's complexity: it covers the input format, the transformation semantics, the default versus force behavior, the deep-copy guarantee, and the return shape. Since an output schema exists, the Returns section succinctly summarizes the structure of the result.

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?

The schema has 0% property description coverage, but the description's Args section thoroughly defines both parameters: 'workflow' as an API-format dict that is deep-copied, and 'force' as an override for randomizing every seed widget. This fully compensates for the missing schema descriptions.

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 clear, specific verb-resource pair: 'Replace seed sentinels (-1) with fresh random uint32 values.' This precisely distinguishes the tool from its many siblings, which handle workflows, models, or system stats, none of which target seed randomization.

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 explains the default behavior (only -1 widgets randomized), the opt-in pattern, and the 'force=True' alternative. This gives clear context for when to use each mode, though it does not explicitly mention alternative tools or states when not to use this tool.

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