Skip to main content
Glama

codebrain_batch_generate

Run multiple generation prompts in sequence with a shared system prompt. Captures errors inline per item, returning all results with delimiters.

Instructions

Run several generation prompts in sequence and return all results.

One shared system prompt applies to every item. Prompts are processed serially (Ollama serialises on a single GPU anyway). A failure on one prompt is captured inline as [codebrain error] ... at that index, so the whole batch never aborts.

Returns a single string with per-item delimiters:

--- [0] ---
<result for prompts[0]>

--- [1] ---
<result for prompts[1]>

Args: prompts: List of prompts to run with the same system message. system: Optional shared system message. use_brain: If true, prepend .brain/context.md from cwd to the system prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptsYes
systemNo
use_brainNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: serial processing, inline error handling without aborting, shared system prompt, effect of use_brain parameter, and the exact output format with delimiters. This is comprehensive.

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 concise (~150 words), front-loaded with the purpose, and well-structured with bullet points and an example of the output. Every sentence adds value without redundancy.

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 (batch processing, error handling, output format), the description covers all necessary aspects: parameters, behavior, failure mode, and return structure. There are no gaps.

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 explain parameters. It does so effectively: prompts as list of strings, system as optional shared message, and use_brain as flag to prepend a context file. This adds significant meaning beyond the schema's minimal metadata.

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: running several generation prompts in sequence and returning all results. It effectively distinguishes itself from siblings by emphasizing batch processing and serial execution.

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 explains the shared system prompt and serial processing but lacks explicit guidance on when to use this tool versus alternatives like codebrain_generate (single) or codebrain_consensus_generate. It implies usage scenarios but does not state when-not-to-use or 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/Tschonsen/CodeBrain'

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