Skip to main content
Glama

rerun_generation

Re-run any previous generation by retrieving its workflow from execution history and re-enqueuing it, with optional input overrides and seed randomization control.

Instructions

Re-run the workflow behind a previous generation. Retrieves the prompt graph from execution history (by prompt_id, or the most recent run when omitted — chosen by ComfyUI's queue number, same logic as get_history) and re-enqueues it, optionally applying inputs overrides. Seeds are re-randomized unless disable_random_seed is set. Returns the new prompt_id and the source prompt_id it came from. Clear error if no matching history exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsNoOptional overrides applied to every node with a matching input name (e.g. cfg, steps, sampler_name, seed, text).
prompt_idNoPrompt ID of the generation to re-run. If omitted, uses the most recent execution.
disable_random_seedNoIf true, do not randomize seed fields (combine with inputs.seed to reproduce exactly).
Behavior5/5

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

With no annotations provided, the description fully bears the burden of disclosure. It details that seeds are re-randomized unless disable_random_seed is set, that it returns the new prompt_id and source prompt_id, and that errors occur if no matching history exists. This is comprehensive and transparent.

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 two sentences long, front-loaded with the main action in the first sentence and details in the second. Every sentence adds value, and there is no redundancy or unnecessary information.

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 the complexity of re-running a workflow with history retrieval and overrides, the description covers all necessary aspects: purpose, parameter behavior, expected return values, and error cases. The sibling list is large, but the tool's role is clearly defined.

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 covers all three parameters with descriptions, but the description adds context beyond the schema: it explains how inputs overrides are applied globally, the behavior of prompt_id when omitted, and the effect of disable_random_seed on seed randomization. This enhances understanding significantly.

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 the tool re-runs the workflow behind a previous generation, specifying it retrieves the prompt graph from history and re-enqueues it. This differentiates it from siblings like enqueue_workflow (which enqueues a new workflow) and regenerate (which might regenerate something else).

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 when to use the tool (re-running a previous generation by prompt_id or most recent) and optional overrides. It references the same logic as get_history, providing context. However, it does not explicitly state when not to use it or mention alternative tools, missing a small opportunity for clarity.

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