Skip to main content
Glama

reduce

Synthesize multiple outputs into one coherent result using a custom prompt. Accepts plain text or structured agent objects for flexible combination.

Instructions

Synthesise multiple results into one. Accepts plain strings or structured AgentResult objects (auto-extracts .text fields), so you can pipe par/map output directly without manual unwrapping.

Args: results: JSON array — either plain strings ["text1", "text2"] or AgentResult objects [{"text": "...", ...}]. synthesis_prompt: Instructions for how to synthesise the results. sandbox: Named sandbox spec or inline JSON. network: Whether the container has 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 in seconds (default: 120). mcps: JSON array of MCP server names to attach to the reducer agent. system_prompt: System prompt for the reducer agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes
synthesis_promptYes
sandboxNo
networkNo
toolsNoRead,Write,Glob,Grep,Bash
modelNosonnet
timeoutNo
system_promptNo
mcpsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Discloses auto-extraction of .text fields and input handling, but does not mention that it calls a language model or potential network usage (though parameter descriptions cover defaults). Without annotations, more explicit behavioral cues would help.

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?

Concise intro followed by a clear parameter list. No redundant sentences; efficiently front-loads purpose. Appropriate length for the tool's complexity.

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?

Covers all parameters and core behavior. With an output schema provided, return values are handled. Could explicitly note that output is a single synthesized string and that model usage may incur costs.

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 has 0% description coverage, but the description provides thorough explanations for all 9 parameters, including format clarifications (e.g., results as JSON array, sandbox spec), defaults, and allowed values, fully compensating for schema gaps.

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?

Clearly describes the tool as synthesizing multiple results into one, specifying input types (plain strings or AgentResult objects) and noting it works with output from par/map, distinguishing it from siblings.

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?

Implies usage after par/map, but does not explicitly contrast with alternatives like map_reduce or state when not to use it. Provides clear context but no exclusions.

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