Sume MCP script_run: fan out 3+ calls in one turn, 55 s limit
script_run runs a short JavaScript program on Sume that calls tools in a loop or in parallel. timeout_seconds is 5 to 55. Use it for 3+ similar calls.

Use script_run when one agent turn needs three or more independent calls of the same shape, such as one tts_create per sentence or one generate_image per scene. The program runs on the Sume side, calls tools with await sume.call(name, arguments), and returns one value. timeout_seconds runs from 5 to 55.
| Item | Value |
|---|---|
timeout_seconds | 5 to 55 |
| Other limits | max_calls, max_paid_calls |
| Returns | Value, calls[] journal, child jobs[] |
| Cannot call | Discovery tools or script_run itself |
Same gates as direct calls
A call inside the script has the same gates, redaction and errors as a direct call. Paid creates still need their own idempotency_key, and under OAuth read-only the paid tools are not available. Keep max_paid_calls low so a loop cannot run away.
Arguments
This read-only example runs three account lookups in parallel in one tool call. A paid fan-out has the same shape, with generate_image and one idempotency_key per call, and the agent then uses one jobs_wait with job_ids.
{
"timeout_seconds": 30,
"max_calls": 3,
"max_paid_calls": 0,
"code": "return Promise.all(['account_me', 'balance_get', 'usage_get'].map(n => sume.call(n, {})));"
}After the script
The response lists child jobs[], which you hand to jobs_wait. Do not put a long wait inside the script: the whole run has a 55-second ceiling, and a render takes longer than that. Submit in the script, wait outside it, and read the batch with jobs_result.
- Good fit: N similar submits, a loop with a condition, a fan-out and merge.
- Poor fit: one call, or waiting on a long render.
- Check the
calls[]journal for errors on individual calls.
Reading the journal
The calls[] journal records each tool call the script made. Scan it for failures before trusting the returned value, since one failed call can sit inside a successful script. Child jobs[] hold the job ids created by paid calls, which you pass to jobs_wait.
When not to use it
For one or two calls, a direct tool call is simpler and easier to review. Scripts hide the individual steps from the approval prompt, so keep max_calls and max_paid_calls small, and keep paid scripts for tasks where the user already confirmed the spend.
Pick timeout_seconds to match the slowest call you expect inside the script. Submits return quickly, so 30 seconds is plenty for a fan-out of creates. Reads of large results take longer, and the full 55 is there for them. If a script hits its limit, check the journal to see which calls finished before it stopped, and do not repeat those that already created paid jobs.
Keep in mind that Sume's hosted endpoint is the same for every client in this series: https://mcp.sume.com/mcp, with OAuth consent on the MCP host or an API key in a header. What differs is each client's config keys, its timeout defaults and its approval prompts. When a connection misbehaves, first separate those two layers: test the endpoint with curl and your credential, and only then look at the client's settings.
Sources
More in Integrations
- Sume with Zapier, Make or n8n: no app in the docs, so use HTTP
Sume's docs list no Zapier, Make or n8n app. Start Formats over HTTP, receive results on a webhook_url, and poll as a backup. Limits of each tool.
- VS Code mcp.json: put the Sume API key in a password input
In VS Code, declare a promptString input with password true and reference it as ${input:id} in the x-api-key header, so the Sume key never lands in mcp.json.
- VS Code mcp.json for Sume: set type http, not sse
VS Code accepts type http or sse for a remote MCP server. Sume documents a streamable HTTP endpoint at https://mcp.sume.com/mcp, so use type http and a url.
- Zapier Catch Hook URL is the same in test and live: test Sume safely
Zapier's Catch Hook URL does not change between test and live. Use Sume's webhook.test delivery to check the Zap before a real run sends a real result into it.
Written by Sume