Skip to main content
Glama

Generate a batch of images

grok_batch

Runs multiple image generation jobs in sequence, checks the full batch against the daily budget before starting, and continues after individual job errors unless budget limits stop it.

Instructions

Run several image jobs one after another. Each job: {"prompt", "name", "aspect"?, "n"? (1..4, default 1), "mode"?, "max_side"?, "size"?, "keep_original"?, "timeout_s"?, "out_dir"?}. The whole batch is checked first (job count, total submissions vs today's budget); nothing runs if it does not fit. Batches needing more than confirm_over submissions need confirm=true (ask the user first). Returns {"results": [...], "submissions_planned", "usage"}; a failed job gets an "error" and the batch goes on, except budget/no-extension errors, which stop it and mark the rest "skipped".

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": {
      "jobs": "<jobs>"
    },
    "name": "grok_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobsYes
confirmNo
out_dirNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Beyond the annotations (which only declare it writes, is open-world and non-idempotent), the description discloses the up-front validation pass, the all-or-nothing semantics when the batch doesn't fit, the human-confirmation gate, and precise partial-failure behavior including which error classes stop the batch and mark remaining jobs "skipped". That is exactly the non-obvious behavior an agent needs.

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?

Dense and front-loaded: what it does, the job shape, the validation/confirm rule, then the return contract and failure semantics in order of need. The embedded JSON snippet wraps awkwardly mid-line, but no sentence is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a batch mutation tool with no output schema and an untyped `jobs` array, the description supplies the job structure, the return keys ("results", "submissions_planned", "usage"), and failure handling. What "submissions" or "today's budget" mean in units is left to grok_usage, a minor omission.

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?

With 0% schema description coverage, the description carries the load and does: it enumerates the full job object shape including bounds and defaults (`n` 1..4 default 1) and lists all optional keys. The only gap is the top-level `out_dir`, which is only implied via the identically named job-level field, and `confirm_over` is referenced but not shown as a parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource — "Run several image jobs one after another" — which clearly distinguishes it as the batch counterpart to grok_generate_image. It doesn't explicitly name the single-image sibling as the alternative, but the batch framing makes the split obvious.

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

Usage Guidelines3/5

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

It gives concrete conditions for the `confirm` flag ("ask the user first" above `confirm_over` submissions) and explains that budget/no-extension errors halt the batch. It never states outright when to prefer grok_generate_image over this one, nor the preconditions for a job to be accepted beyond the fit check.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.