Skip to main content
Glama

batch_prompt

Execute multiple CLI agent prompts in parallel using server-side asyncio, enabling concurrent task processing with controlled concurrency limits.

Instructions

Send multiple prompts to CLI runners in parallel (primary tool).

Fans out tasks server-side with asyncio.gather and a semaphore, enabling true parallel runner execution within a single MCP call. Single-task usage is perfectly valid — use prompt for convenience when sending one task.

Args: tasks: List of AgentTask objects, each with cli, prompt, and optional fields. max_concurrency: Max parallel runner invocations (default: 3). ctx: MCP context (auto-injected by FastMCP). None when called directly in tests.

Returns: MultiPromptResponse with results for each task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYes
max_concurrencyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYes
failedYes
resultsYes
succeededYes
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 of behavioral disclosure. It effectively describes the parallel execution behavior ('Fans out tasks server-side with asyncio.gather and a semaphore'), concurrency control ('max_concurrency'), and notes the 'ctx' parameter is auto-injected. However, it doesn't mention error handling, timeout behavior, or rate limits.

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?

The description is well-structured and efficiently organized: purpose statement, behavioral explanation, usage guidance, parameter descriptions, and return value - all in 7 sentences with zero wasted words. Key information is front-loaded in the first sentence.

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?

Given the tool's complexity (parallel execution, multiple parameters), no annotations, and an output schema that covers return values, the description does well but has minor gaps. It explains the parallel execution model and parameter semantics but doesn't cover error scenarios, timeout handling, or detailed behavior of optional task fields.

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 must compensate. It explains the 'tasks' parameter structure (AgentTask objects with cli, prompt, and optional fields), 'max_concurrency' purpose and default value, and 'ctx' injection behavior. This adds substantial meaning beyond the bare schema, though it doesn't detail all optional fields in the tasks object.

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's purpose: 'Send multiple prompts to CLI runners in parallel (primary tool).' It specifies the verb ('send'), resource ('prompts'), and target ('CLI runners'), and distinguishes it from the sibling 'prompt' tool by noting it's for multiple tasks while 'prompt' is for single-task convenience.

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 description provides explicit guidance on when to use this tool versus alternatives: 'Single-task usage is perfectly valid — use prompt for convenience when sending one task.' This clearly differentiates it from the 'prompt' sibling tool and indicates valid usage scenarios.

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/j7an/nexus-mcp'

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