Skip to main content
Glama

map_reduce_mr_map

Extract a specific field from each element of a JSON array. Optionally apply a transform like upper, lower, strip, len, bool, str, int, float, abs, or not.

Instructions

[map_reduce] Extract a field from every item in a JSON array. Optional transform: upper, lower, strip, len, bool, str, int, float, abs, not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
fieldYes
transformNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations exist, so the description must disclose behavioral traits. It mentions extraction and transforms but omits details like field path syntax, error handling, idempotency, or whether it modifies data. This is insufficient for safe invocation.

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 with a listed transform options. It is concise and front-loads the core purpose. Minor improvement could separate syntax details for clarity.

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

Completeness2/5

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

Given the tool's complexity and lack of annotations, the description is incomplete. It omits input format requirements, error behavior, and how field nesting works. The output schema exists but description doesn't complement it with behavioral context.

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

Parameters3/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 compensate. It adds meaning by naming the transform options and implying 'data' is a JSON array. However, it fails to explain that 'data' should be a stringified JSON array and 'field' syntax (e.g., dot notation).

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 action: 'Extract a field from every item in a JSON array.' The verb 'extract' and resource 'field from items' are specific. It also lists optional transforms, distinguishing it from siblings like mr_filter or mr_reduce.

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 on when to use this tool versus alternatives is provided. With many similar map_reduce siblings, the agent lacks context to choose correctly.

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