Skip to main content
Glama

batch

Execute multiple AI tasks in parallel across all available GPUs to process files, review code, summarize documents, and analyze content simultaneously for maximum throughput.

Instructions

Execute multiple tasks in PARALLEL across all available GPUs for maximum throughput. Distributes work across local and remote backends intelligently.

WHEN TO USE:

  • Processing multiple files/documents simultaneously

  • Bulk code review, summarization, or analysis

  • Any workload that can be parallelized

Args: tasks: JSON string containing an array of task objects. Each object can have: - task: "quick"|"summarize"|"generate"|"review"|"analyze"|"plan"|"critique" - content: The content to process (required) - file: Optional file path - model: Force tier - "quick"|"coder"|"moe" - language: Language hint for code tasks

ROUTING LOGIC:

  • Distributes tasks across ALL available GPUs (local + remote)

  • Large content (>32K tokens) → Routes to backend with sufficient context

  • Normal content → Round-robin for parallel execution

  • Respects backend health and circuit breakers

Returns: Combined results from all tasks with timing and routing info

Example: batch('[ {"task": "summarize", "content": "doc1..."}, {"task": "review", "content": "code2...", "language": "python"}, {"task": "analyze", "content": "log3..."} ]')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so well by detailing routing logic (distribution across GPUs, handling large content, round-robin, backend health), performance implications (maximum throughput), and return format (combined results with timing and routing info). It doesn't mention rate limits or auth needs, but covers key behavioral traits thoroughly.

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?

The description is well-structured with clear sections (description, usage, args, routing, returns, example) and front-loaded key information. It's appropriately sized for a complex tool, though slightly verbose; every sentence adds value, such as the routing logic details.

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?

Given the tool's complexity (parallel execution, routing logic) and no annotations, the description is complete: it covers purpose, usage, parameters, behavior, and returns. With an output schema present, it needn't detail return values, but still provides useful context like timing and routing info, making it fully adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate fully. It does by explaining the 'tasks' parameter as a JSON string with an array of task objects, detailing each object's fields (task types, content, file, model, language), including enums and requirements. This adds comprehensive meaning beyond the bare schema.

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?

The description clearly states the tool executes multiple tasks in parallel across GPUs for maximum throughput, specifying the verb 'execute' and resource 'tasks' with the key characteristic of parallel distribution. It distinguishes from siblings like 'delegate' or 'queue_status' by emphasizing parallel execution rather than sequential delegation or status checking.

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?

The 'WHEN TO USE' section explicitly lists scenarios for using this tool: processing multiple files simultaneously, bulk operations like code review, and any parallelizable workload. It implicitly contrasts with non-parallel siblings by highlighting parallel execution, though it doesn't name specific alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zbrdc/delia'

If you have feedback or need assistance with the MCP directory API, please join our Discord server