Skip to main content
Glama

Run a batch

run_batch

Run the same paid tool on up to 50 inputs at once (for example 10 product shots, 20 ad variants or one video per language), with one quote for the whole batch and one approval. Call it once without max_credits for the total, tell the user, then call it again with the same items plus max_credits. The batch itself is free; each item uses credits like the tool would on its own, and failed items are refunded. Returns a batch_id; call get_batch for the results.

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": {
      "tool": "<tool>",
      "items": "<items>"
    },
    "name": "run_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional short name for this batch, shown in get_batch.
toolYesThe paid PopNow tool to run for every item, for example create_image, create_video, edit_image, create_3d or translate_video.
itemsYes1 to 50 argument objects, one per run, each exactly what you would pass to that tool (leave out max_credits). Example for create_image: [{"prompt": "a red sneaker on sand"}, {"prompt": "a blue sneaker on snow"}].
max_creditsNoThe most PopNow credits the user agreed to spend on the whole batch. Only set it after the user confirmed the quoted total.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the cost model (batch overhead free, each item billed as if run alone), failed-item refunds, the quote-then-approve two-call pattern, and that the call returns a batch_id with results fetched via get_batch. The two-phase flow also implicitly clarifies why a first call does not execute, which matters given idempotentHint=false.

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?

Front-loads what the tool does and the example shapes, then immediately gives the required call sequence and cost behavior. Five sentences, each carrying distinct information, with no filler.

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?

No output schema exists, yet the description states the return value (batch_id) and the follow-up call (get_batch) needed to retrieve results. Combined with the cost/refund rules and the two-call approval protocol, an agent has everything needed to invoke this tool correctly.

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, but the description adds workflow meaning to max_credits (set only after the user confirms the quoted total) and to items (same items reused on the second call, per-item args minus max_credits). It adds procedural semantics the schema alone does not convey.

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?

States a specific verb and resource with scope: run one paid tool across up to 50 inputs in a single batch, with examples (product shots, ad variants, per-language videos). The batching wrapper role is unmistakable versus the sibling single-run tools like create_image or create_video.

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?

Gives an explicit operating procedure: call once without max_credits to get a total, tell the user, then call again with the same items plus max_credits. The batching context is clear from the examples, but there is no explicit statement of when *not* to batch (e.g., a single item should go straight to the underlying tool).

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.