Skip to main content
Glama

map

Apply a prompt template to multiple inputs in parallel, executing each with configurable tools, model, and sandbox for batch processing.

Instructions

Apply a prompt template to each input in parallel. Use {input} as the placeholder.

Args: prompt_template: Prompt template with {input} placeholder(s). inputs: JSON array of input strings: ["input1", "input2", ...]. sandbox: Named sandbox spec or inline JSON. network: Whether containers have network access (default: true — needed for API calls). tools: Comma-separated list of allowed Claude tools. model: Claude model to use (default: sonnet). timeout: Max execution time per agent in seconds (default: 120). max_concurrency: Max agents running simultaneously (default: 5). system_prompt: System prompt injected via --system-prompt. claude_md: Project instructions written to workspace CLAUDE.md. output_schema: JSON schema string for structured output. mcps: JSON array of MCP server names to attach. effort: Effort level: low, medium, high, max.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prompt_templateYes
inputsYes
sandboxNo
networkNo
toolsNoRead,Write,Glob,Grep,Bash
modelNosonnet
timeoutNo
max_concurrencyNo
system_promptNo
claude_mdNo
output_schemaNo
mcpsNo
effortNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations exist, so the description carries full burden. It discloses key behaviors: parallel execution, defaults (model, network, tools, timeout, concurrency), and that network=true is needed for API calls. Lacks warnings about cost or resource implications.

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 begins with a concise one-sentence purpose, followed by a well-structured argument list. Every sentence adds value, with no redundancy or fluff.

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 13 parameters and an output schema, the description covers all necessary aspects: parallel execution, defaults, allowed tools, and optional settings. The output schema exists, so return values need not be explained. The tool's complexity is fully addressed.

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 coverage is 0%, yet the description's 'Args' section explains every parameter with types, defaults, and context (e.g., 'inputs: JSON array of input strings', 'network: default: true — needed for API calls'). This adds substantial meaning beyond the raw 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 'Apply a prompt template to each input in parallel' which is a specific verb+resource, and the placeholder '{input}' clarifies usage. This differentiates from siblings like chain and map_reduce.

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?

The description implies parallel processing but does not explicitly contrast with alternatives like chain (sequential) or map_reduce (with reduction). No when-not-to-use guidance is given.

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/stiege/swarm-mcp'

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