Skip to main content
Glama

Decide workflow items

decide_workflow_items
Destructive

Answer an engine run paused on items: for every failed item the run is waiting on, retry it, edit its prompt and retry, or skip it. Read the open positions and the current revision from get_workflow_run's recovery.items; the decisions must cover exactly those positions, once each. quote=true prices the decisions and changes nothing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "run_id": "<run_id>",
      "step_id": "<step_id>",
      "revision": "<revision>",
      "decisions": "<decisions>"
    },
    "name": "decide_workflow_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
quoteNo
run_idYes
step_idYes
revisionYes
decisionsYes

Output Schema

NameRequiredDescriptionDefault
runNo
countNo
stepsNo
creditsNo
fan_outsNo
recoveryNo
checkpointNo
storyboardNo
conditionalNo
generationsNo
review_hashNo
unit_creditsNo
analysis_creditsNo
checkpoint_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / generations / items / additionalProperties
      Previous value: -{}New value: +false
    • addedOutput schema / properties / generations / items / description
      Added value: +"One image, clip, voice-over or piece of music."
    • addedOutput schema / properties / generations / items / properties
      Added value: +{
      +  "app_url": {
      +    "description": "Opens it in the app.",
      +    "format": "uri",
      +    "type": "string"
      +  },
      +  "aspect_ratio": {
      +    "description": "Null for audio.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "caption_style": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "anchor": {
      +            "default": "bottom",
      +            "enum": [
      +              "top",
      +              "bottom"
      +            ],
      +            "type": "string"
      +          },
      +          "border": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "color": {
      +                    "$ref": "#/properties/generations/items/properties/caption_style/anyOf/0/properties/color",
      +                    "default": "#000000"
      +                  },
      +                  "kind": {
      +                    "const": "outline",
      +                    "type": "string"
      +                  },
      +                  "scale": {
      +                    "default": 0.049,
      +                    "maximum": 0.3,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "shadow_scale": {
      +                    "default": 0.012,
      +                    "maximum": 0.3,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "kind"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "color": {
      +                    "$ref": "#/properties/generations/items/properties/caption_style/anyOf/0/properties/color",
      +                    "default": "#000000"
      +                  },
      +                  "kind": {
      +                    "const": "plate",
      +                    "type": "string"
      +                  },
      +                  "pad_scale": {
      +                    "default": 0.025,
      +                    "maximum": 0.3,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "kind"
      +                ],
      +                "type": "object"
      +              }
      +            ],
      +            "default": {
      +              "color": "#000000",
      +              "kind": "outline",
      +              "scale": 0.049,
      +              "shadow_scale": 0.012
      +            }
      +          },
      +          "casing": {
      +            "default": "upper",
      +            "enum": [
      +              "none",
      +              "upper"
      +            ],
      +            "type": "string"
      +          },
      +          "color": {
      +            "default": "#FFFFFF",
      +            "pattern": "^#[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?$",
      +            "type": "string"
      +          },
      +          "font_id": {
      +            "default": "noto-sans",
      +            "enum": [
      +              "inter",
      +              "montserrat",
      +              "oswald",
      +              "archivo-black",
      +              "noto-sans",
      +              "tiktok-sans"
      +            ],
      +            "type": "string"
      +          },
      +          "font_scale": {
      +            "default": 0.075,
      +            "maximum": 0.2,
      +            "minimum": 0.02,
      +            "type": "number"
      +          },
      +          "font_weight": {
      +            "default": 700,
      +            "maximum": 900,
      +            "minimum": 100,
      +            "multipleOf": 100,
      +            "type": "integer"
      +          },
      +          "grouping": {
      +            "additionalProperties": false,
      +            "default": {
      +              "gap_seconds": null,
      +              "max_chars": null,
      +              "max_lines": 2,
      +              "max_words": null,
      +              "unit": "phrase"
      +            },
      +            "properties": {
      +              "gap_seconds": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 4,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              },
      +              "max_chars": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 160,
      +                    "minimum": 8,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              },
      +              "max_lines": {
      +                "default": 2,
      +                "enum": [
      +                  1,
      +                  2
      +                ],
      +                "type": "number"
      +              },
      +              "max_words": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 24,
      +                    "minimum": 1,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              },
      +              "unit": {
      +                "default": "phrase",
      +                "enum": [
      +                  "word",
      +                  "phrase",
      +                  "sentence"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "highlight": {
      +            "default": "active_word",
      +            "enum": [
      +              "none",
      +              "active_word",
      +              "karaoke"
      +            ],
      +            "type": "string"
      +          },
      +          "highlight_color": {
      +            "$ref": "#/properties/generations/items/properties/caption_style/anyOf/0/properties/color",
      +            "default": "#FFD700"
      +          },
      +          "italic": {
      +            "default": false,
      +            "type": "boolean"
      +          },
      +          "margin_h": {
      +            "default": 0.06,
      +            "maximum": 0.4,
      +            "minimum": 0,
      +            "type": "number"
      +          },
      +          "margin_v": {
      +            "anyOf": [
      +              {
      +                "const": "auto",
      +                "type": "string"
      +              },
      +              {
      +                "maximum": 0.45,
      +                "minimum": 0,
      +                "type": "number"
      +              }
      +            ],
      +            "default": "auto"
      +          },
      +          "schema_version": {
      +            "const": "1.0",
      +            "default": "1.0",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "created_at": {
      +    "format": "date-time",
      +    "type": "string"
      +  },
      +  "credits": {
      +    "description": "Credits charged. Zero when your own provider key or the free allowance paid.",
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  },
      +  "error": {
      +    "description": "Why it failed. Null otherwise.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "id": {
      +    "format": "uuid",
      +    "type": "string"
      +  },
      +  "model": {
      +    "description": "The model id it was made with (`GET /v1/models`).",
      +    "type": "string"
      +  },
      +  "object": {
      +    "const": "generation",
      +    "type": "string"
      +  },
      +  "output_url": {
      +    "anyOf": [
      +      {
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "description": "The finished file, once `ready`. A signed link that works for about an hour; read the generation again for a fresh one."
      +  },
      +  "paid_by": {
      +    "description": "Who paid: \"credits\", \"house\" (the free allowance), \"server\" (a server that charges nothing), or the vendor of your own key (\"replicate\", \"fal\", …).",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "prompt": {
      +    "type": "string"
      +  },
      +  "ready_in_seconds": {
      +    "description": "Roughly how long an unfinished generation has left; 0 means past its usual time.",
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  },
      +  "recipe_id": {
      +    "anyOf": [
      +      {
      +        "$ref": "#/properties/generations/items/properties/id"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "description": "The recipe it was made with, if any."
      +  },
      +  "refined_from": {
      +    "anyOf": [
      +      {
      +        "format": "uuid",
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "stalled": {
      +    "type": "boolean"
      +  },
      +  "status": {
      +    "description": "`ready` and `failed` are final.",
      +    "enum": [
      +      "queued",
      +      "generating",
      +      "ready",
      +      "failed"
      +    ],
      +    "type": "string"
      +  },
      +  "thumbnail_url": {
      +    "anyOf": [
      +      {
      +        "$ref": "#/properties/generations/items/properties/output_url/anyOf/0"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "description": "A small still of the result, for a grid. Null for audio and while it works."
      +  },
      +  "type": {
      +    "description": "What was made. New values may be added; treat an unknown one as opaque.",
      +    "enum": [
      +      "image",
      +      "clip",
      +      "voiceover",
      +      "music",
      +      "tool"
      +    ],
      +    "type": "string"
      +  },
      +  "vendor_phase": {
      +    "anyOf": [
      +      {
      +        "enum": [
      +          "queued",
      +          "running"
      +        ],
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  }
      +}
    • addedOutput schema / properties / generations / items / required
      Added value: +[
      +  "object",
      +  "id",
      +  "type",
      +  "status",
      +  "model",
      +  "prompt",
      +  "aspect_ratio",
      +  "output_url",
      +  "thumbnail_url",
      +  "credits",
      +  "paid_by",
      +  "error",
      +  "ready_in_seconds",
      +  "recipe_id",
      +  "created_at",
      +  "app_url",
      +  "refined_from",
      +  "caption_style",
      +  "vendor_phase",
      +  "stalled"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and non-idempotency, so the safety profile is known. The description adds value beyond them by explaining the quote=true dry-run path ('prices the decisions and changes nothing') and by imposing the exact-coverage/once-each rule that governs valid calls. It stops short of saying what skipping an item irreversibly forfeits.

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?

Three tightly packed sentences, front-loaded with the trigger condition, followed by the prerequisite data source and the dry-run flag. No filler and no repetition of schema or annotations.

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?

An output schema exists, so return values need not be described, and the description covers the precondition, the data source, the validity constraint, and the quote mode. What remains unstated is the effect of skipping or how partial coverage is rejected, a modest gap for a destructive tool.

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?

With 0% schema description coverage, the description compensates well: it explains `revision` (read the current revision from get_workflow_run), `decisions` (position/action with retry|edit|skip and the prompt edit), and `quote` (prices only, changes nothing). Only run_id and step_id are left to obvious inference.

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 names a specific verb and resource ('Answer an engine run paused on `items`') and enumerates the three decision outcomes (retry, edit+retry, skip). This clearly separates it from the many sibling workflow tools (retry_workflow_run, resume_workflow_run, rewind_workflow_run) that do not operate on per-item decisions.

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?

It states the trigger condition precisely ('paused on `items`', 'for every failed item the run is waiting on') and gives a prerequisite workflow: pull open positions and revision from get_workflow_run's `recovery.items`, then cover exactly those positions once each. What's missing is an explicit statement of when NOT to use it (e.g. other pause types handled by resume/rewind).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources