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. 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 approved amount. 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.

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 amount they approved. The call is refused if the estimate is higher.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantially beyond the annotations: the dry-run behavior of omitting maxCredits, that credits are charged to the project's organisation per image, that failed runs are refunded, that calls are refused if the estimate exceeds maxCredits, that unrunnable targets come back under 'skipped' with a reason, and that jobIds return at once with 10–60s latency to be followed via get_jobs. This is exactly the operational detail the readOnlyHint=false annotation cannot convey.

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 purpose, then grouped into cost-estimation, execution and follow-up paragraphs. Dense but almost every sentence carries distinct operational information; the shot/element/art-direction enumeration in the first line is slightly redundant with the schema's target.kind enum, keeping it from a 5.

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?

With no output schema, the description carries the full burden of describing returns and it does: the estimate payload (estimatedCredits, per-target cost, skipped reasons) and the execution payload (jobId per target, images in 10–60s, poll with get_jobs). An agent can execute the full workflow without further inference.

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?

Schema coverage is 100%, so the baseline is 3, and the description genuinely adds meaning: it explains the estimate/approve loop for maxCredits and how to build the targets list ('one { target: { kind: "story_element", id: entityId } } per character'), plus the omission semantics for nodeId. It stops short of covering every nested field, leaving the schema to handle group defaults.

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 concrete verb and resource ('Generate images') and immediately enumerates the target classes: shot panels, story element reference sheets, production references, the Art Style Image, or any generator of a group. It also states the unit of work ('each target runs its generator once') so it is clearly distinguishable from set_prompt, add_reference_images and get_jobs.

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 without maxCredits for an estimate, ask the user once for the batch total, then re-call with the approved amount. It also states prerequisites (set prompt and references first with set_prompt and add_reference_images), exclusions (video generators are skipped, video generation unavailable to agents), and an initiative rule ('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.