Skip to main content
Glama

batch_batch_partition

Split a batch into passing and failing lists using a custom function, returning both lists along with pass and fail counts.

Instructions

[batch] Split into passing (truthy) and failing (falsy) lists. Returns {passing, failing, pass_count, fail_count}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
fnYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description discloses the split behavior and return format, which is the core operation. However, it does not explain details such as how 'fn' is applied (e.g., as a function name string), error handling for invalid fn, or what happens with empty input. Without annotations, more behavioral context would be beneficial.

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 a single sentence that conveys the essential purpose and return value. It is very concise but lacks some detail; however, it is not verbose and is easily parseable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a partition operation with a function parameter, the description covers the basic flow but omits details about function execution, type constraints, and edge cases. The mention of return keys provides some context, but the tool would benefit from more thorough explanation.

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

Parameters2/5

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

The input schema has two parameters (items, fn) with no description. The tool description does not explain the format or expected values for 'fn' (e.g., is it a function name, an expression, or a lambda?). With 0% schema coverage, the description should compensate but does not.

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: split an array into two lists based on a truthy/falsy evaluation of each element. It specifies the return shape including counts, and the '[batch]' prefix categorizes it correctly. The operation is distinct from sibling batch tools like filter, map, reduce, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool over alternatives like batch_batch_filter (which only returns passing items) or other partitioning utilities. The description does not mention prerequisites, typical use cases, or scenarios where this tool is preferred.

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/0-co/agent-friend'

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