Skip to main content
Glama

Run generations

run_generations

Generate images: shot panels, story element reference sheets and production references, the art direction's Art Style Image, or any image generator of a group (a scene's own Production group included). Each target runs its generator once, as the Generate button does in the app, on the model and settings the generator has, and its prompt and references as they are now (set them first with set_prompt and add_reference_images).

Call it first without maxCredits: it returns the total for the whole batch (estimatedCredits), each target's cost and what is wired to run, and runs nothing. Targets that cannot run (unresolved references, an empty prompt, a video generator, a generator already running) come back under skipped with the reason. Ask the user once for the batch total, then call again with the same targets and maxCredits set to the suggestedMaxCredits the estimate returned (the estimate plus a small margin, for the whole batch). It returns a jobId per target at once; the images take about 10 to 60 seconds. Follow them with get_jobs.

Credits are charged to the project's organisation per image, as in the app; a failed run is refunded. Never generate on your own initiative after creating or importing a project: offer it and let the user decide. Video generation is not available to agents.

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": {
      "targets": "<targets>",
      "projectId": "<projectId>"
    },
    "name": "run_generations"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetsYesThe generators to run, 40 at most per call. Each runs once on the model and settings it already has. Build the list from list_entities and list_shots (or get_group), e.g. every character's reference sheet: one { target: { kind: "story_element", id: entityId } } per character.
projectIdYesScreenWeaver project id (from list_projects).
maxCreditsNoLeave out to get the cost estimate; nothing runs and nothing is charged. Ask the user to approve the total, then call again with maxCredits set to the suggestedMaxCredits the estimate returned (the total for the whole call, not per item). The call is refused if the estimate is higher.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / maxCredits / description
      Previous value: -"Leave out to get the cost estimate; nothing runs and nothing is charged. Ask the user to approve the total, then call again with maxCredits set to the amount they approved. The call is refused if the estimate is higher."New value: +"Leave out to get the cost estimate; nothing runs and nothing is charged. Ask the user to approve the total, then call again with maxCredits set to the suggestedMaxCredits the estimate returned (the total for the whole call, not per item). The call is refused if the estimate is higher."
  2. Changed2 schema fields changed
    • changedInput schema / properties / targets / items / properties / nodeId / description
      Previous value: -"A generator of the group (nodeId from get_group). Omit for the group's own generator: a shot's panel, a story element's reference sheet (storyboard) or production reference (production), the starred generator of a production group (a shot's, or a scene's own) or the art direction (the Art Style Image)."New value: +"A generator of the group (nodeId from get_group). Omit for the group's own generator: a shot's panel, a story element's reference sheet (storyboard) or production reference (production), the starred generator of a scene's Production group or the art direction (the Art Style Image)."
    • changedInput schema / properties / targets / items / properties / target / properties / kind / description
      Previous value: -"shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group), scene (a scene's own Production group, beside its shots) or art_direction (the project's art direction)."New value: +"shot (a shot's storyboard group, or its production group, which is empty: shots are produced in their scene's group), story_element (a character, place or object's moodboard, storyboard or production group), scene (a scene's own Production group, beside its shots) or art_direction (the project's art direction)."
  3. Changed6 schema fields changed
    • changedInput schema / properties / targets / items / properties / nodeId / description
      Previous value: -"A generator of the group (nodeId from get_group). Omit for the group's own generator: a shot's panel, a story element's reference sheet (storyboard) or production reference (production), the starred generator of a production group or the art direction (the Art Style Image)."New value: +"A generator of the group (nodeId from get_group). Omit for the group's own generator: a shot's panel, a story element's reference sheet (storyboard) or production reference (production), the starred generator of a production group (a shot's, or a scene's own) or the art direction (the Art Style Image)."
    • changedInput schema / properties / targets / items / properties / target / description
      Previous value: -"The group, e.g. { kind: \"shot\", id: shotId } for a shot's panel group, { kind: \"story_element\", id: entityId } for a reference sheet, { kind: \"art_direction\" }."New value: +"The group, e.g. { kind: \"shot\", id: shotId } for a shot's panel group, { kind: \"story_element\", id: entityId } for a reference sheet, { kind: \"scene\", id: sceneId } for a scene's Production group, { kind: \"art_direction\" }."
    • changedInput schema / properties / targets / items / properties / target / properties / group / description
      Previous value: -"Which group. A shot has storyboard (its panel) and production; a story element has moodboard, storyboard (its reference sheet) and production. Defaults to storyboard. Ignored for the art direction."New value: +"Which group. A shot has storyboard (its panel) and production; a story element has moodboard, storyboard (its reference sheet) and production; a scene has production only. Defaults to storyboard (production for a scene). Ignored for the art direction."
    • changedInput schema / properties / targets / items / properties / target / properties / id / description
      Previous value: -"shotId (list_shots) for a shot, entityId (list_entities) for a story element. Omit for the art direction."New value: +"shotId (list_shots) for a shot, entityId (list_entities) for a story element, sceneId (get_project_outline) for a scene. Omit for the art direction."
    • changedInput schema / properties / targets / items / properties / target / properties / kind / description
      Previous value: -"shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group) or art_direction (the project's art direction)."New value: +"shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group), scene (a scene's own Production group, beside its shots) or art_direction (the project's art direction)."
    • changedInput schema / properties / targets / items / properties / target / properties / kind / enum
      Previous value: -[
      -  "shot",
      -  "story_element",
      -  "art_direction"
      -]New value: +[
      +  "shot",
      +  "story_element",
      +  "scene",
      +  "art_direction"
      +]
  4. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, so the description carries real additional weight and does so: credits charged to the project's organisation per image, failed runs refunded, jobId returned per target, 10-60 second latency, and skip reasons for unrunnable targets. It also discloses two scoping limits (video generation unavailable to agents, 40 targets max). Not a 5 only because the interaction/state semantics of re-running an already-completed generator (idempotentHint=false) are never spelled out.

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?

Front-loaded with the verb, targets and prerequisites, then the estimate/approve workflow, then result handling. Dense and mostly earned, though the maxCredits two-call protocol is restated in the prose, the targets description and the maxCredits description, which is more repetition than necessary.

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?

There is no output schema, and the description compensates fully: it explains that the estimate call returns estimatedCredits, per-target cost, what is wired to run and a skipped list with reasons, and that the run call returns a jobId per target to follow with get_jobs. For a 3-parameter, credit-spending batch mutation, an agent has everything needed to call it correctly twice.

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 description coverage is 100% and the nested target shape is thoroughly documented in the schema itself, so the description's job here is mostly reinforcement. It does add the batch-level framing for maxCredits ("the total for the whole call, not per item") and the estimate-then-approve loop, which is useful but largely echoed by the schema's own maxCredits description.

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?

Opens with a specific verb+resource ("Generate images") and then enumerates exactly which generators are covered: shot panels, story element reference sheets, production references, the Art Style Image, and a group's generators. It is clearly distinguishable from siblings like set_prompt, add_reference_images and get_jobs, which it explicitly positions around the generation step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit two-phase protocol: call first without maxCredits to get estimatedCredits and per-target costs, ask the user once for the batch total, then re-call with maxCredits set to suggestedMaxCredits. It names alternatives for prerequisites (set_prompt, add_reference_images) and the follow-up tool (get_jobs), and states an explicit when-not: "Never generate on your own initiative after creating or importing a project".

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.