Skip to main content
Glama

Join cardinality classification

bpj_relation_cardinality
Read-onlyIdempotent

Classify nonblank key multiplicity on both sides as one-to-one, many-to-one, one-to-many or many-to-many.

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_cardinality"
  }
}

Input Schema

NameRequiredDescriptionDefault
leftYes
rightYes
leftKeyYes
rightKeyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile needs no repeating. The description contributes one genuinely useful behavioral detail — that only 'nonblank' keys are considered — but does not say what happens to blank/null keys (ignored, error, reported), how ties or mixed cardinality across key groups are resolved, or what the returned classification looks like.

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?

A single front-loaded sentence that states the operation, the qualifying condition ('nonblank'), and the complete output vocabulary, with zero redundant wording. Nothing could be removed without losing information.

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?

For a four-required-parameter, no-output-schema, read-only tool, the definition establishes the operation and result categories but omits the input payload format and any description of the returned structure, which matters since there is no output schema to fall back on. Considered alongside sibling tools, it is largely adequate rather than complete.

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%: the four required parameters carry only titles, with no indication of format for the 'left'/'right' JSON record payloads or whether 'leftKey'/'rightKey' are column names, JSON paths, or field selectors. The description adds no parameter-level meaning beyond implying that keys exist on both sides, so it fails to compensate for the coverage gap.

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 uses a specific verb ('Classify') plus a precise resource ('nonblank key multiplicity on both sides') and enumerates the four possible outcomes, so an agent knows exactly what result to expect. It stops short of naming how it differs from near-neighbours such as bpj_relation_key_overlap or bpj_table_group_cardinality, leaving that differentiation 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 Guidelines3/5

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

The stated output (one-to-one / many-to-one / one-to-many / many-to-many) implies the use case of checking join cardinality before writing a join, but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent must infer that this is the cardinality-profiling tool rather than, say, the join-sizing or key-overlap tool.

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.