Six scene clips in one agent turn: script_run with a paid-call cap

Fan out six scene generations in one script_run on Sume's MCP, cap them with max_paid_calls, then wait on the child jobs. Sketch, limits and failure behavior.

4 min readSume
All posts

Use one script_run that loops over six scene prompts and calls generate_video through sume.call, with max_paid_calls set to 6. The run returns a calls[] journal and the child jobs[], and you then jobs_wait on them in a later step. That keeps a six-scene storyboard to one agent turn instead of six.

The behavior below is from the MCP tools and gates doc, read 2026-10-02. The sketch is not tested against your account, so run it once with dry_run first.

What does the script look like?

script_run runs JavaScript on the Sume side. Each paid create needs its own idempotency_key, so build it from the scene index. This sketch uses dry_run so it previews all six.

const scenes = [
  "Product on a kitchen counter, morning light",
  "Hand opens the box, close up",
  "Product in use, over the shoulder",
  "Detail shot of the texture",
  "Product beside a window, slow push in",
  "Closing shot, product centered",
];
const out = [];
for (const [i, prompt] of scenes.entries()) {
  out.push(await sume.call("generate_video", {
    idempotency_key: `storyboard-v1-scene-${i + 1}`,
    dry_run: true,
    payload: { prompt, duration: 5 }, // confirm fields with tools_schema
  }));
}
return out;

What are the limits?

The run is bounded by three numbers.

script_run bounds, Sume docs read 2026-10-02
BoundValueWhy it matters
timeout_seconds5 to 55Submit only; do not wait for renders inside
max_callsSet per runCaps every tool call in the script
max_paid_callsSet per runStops a loop from creating more paid jobs than planned

How do I wait for the clips?

The response lists the child jobs[]. Pass those ids to jobs_wait, which returns in slices, so call it again until every job is done. Discovery tools and script_run itself cannot be called from inside a script.

When is one turn per scene better?

When scenes depend on each other. If scene two needs the last frame of scene one, a loop cannot see it. Use this pattern for independent shots, and check the first dry run before you remove dry_run.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume