Skip to main content
Glama

Nest child records by parent key

bpj_relation_nested_groups
Read-onlyIdempotent

Collect matching right-hand child records into arrays associated with each left-hand parent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "left": "<left>",
      "right": "<right>",
      "leftKey": "<leftKey>",
      "rightKey": "<rightKey>"
    },
    "name": "bpj_relation_nested_groups"
  }
}

Input Schema

NameRequiredDescriptionDefault
leftYes
rightYes
leftKeyYes
rightKeyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds one useful behavioral fact beyond that: output is grouped into arrays keyed to each left-hand parent, which partially substitutes for the absent output schema. It says nothing about unmatched parents, duplicate keys, or ordering.

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?

A single front-loaded sentence with no filler, and the parent/child framing appears immediately. It is efficient, though the terseness borders on under-specification for a four-parameter transformation tool.

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?

For a four-required-parameter data-shaping tool with no output schema and no parameter descriptions, the definition is thin. An agent still lacks the input serialization contract, key-matching semantics, and handling of parents with no children, all of which determine whether the call succeeds.

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?

Schema description coverage is 0% and all four parameters are required, so the description must carry the burden. It only implicitly conveys the left/right role split via 'left-hand parent' and 'right-hand child'; it never explains that left and right are JSON strings, that leftKey/rightKey name columns within those payloads, or what format those JSON documents must take.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation (collect/nest child records into arrays) on specific resources (left-hand parents, right-hand children), which conveys a one-to-many nesting result rather than a plain join. It does not name or contrast any sibling such as bpj_relation_left_join or bpj_relation_inner_join, so differentiation is left to inference.

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?

There is no explicit when-to-use or when-not-to-use guidance. An agent cannot tell from the text why it should pick this over the many sibling relation tools (left_join, inner_join, foreign_key, match_count) that also combine two record sets; the only hint is the word 'arrays', which implies nesting rather than row expansion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.