Skip to main content
Glama

Recode categorical labels

bpj_table_lookup_recode
Read-onlyIdempotent

Apply a text-keyed recoding map, retain unmatched cells and count matches.

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": {
      "rows": "<rows>",
      "column": "<column>",
      "mapping": "<mapping>"
    },
    "name": "bpj_table_lookup_recode"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYes
columnYes
mappingYes

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, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description does add genuinely useful behavior beyond them: unmatched cells are retained rather than dropped or nulled, and matches are counted. It does not say what happens on duplicate keys, case sensitivity, or whether the count comes back as a new column or a separate result.

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; the recoding action comes first and the retention/count guarantees follow. It is terse to the point of under-specification, but nothing in it is wasted.

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?

Three required parameters, zero schema description coverage, and no output schema mean the description must explain both inputs and return shape. It gives no detail on the expected JSON format for 'rows' or 'mapping', and only obliquely hints at the output via 'count matches', leaving an agent unable to call the tool correctly without trial and error.

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% across all three required parameters, so the description carries the full explanatory burden and largely fails to. It hints that the mapping is text-keyed but never explains that 'rows' is a JSON-encoded record array or that 'column' names the field to recode. Only the mapping parameter gains any meaning from the description.

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 names a specific verb and resource: recoding categorical labels via a text-keyed mapping applied to a column of a record array. An agent can tell it is a value-substitution transform rather than an aggregation or a filter. It stops short of differentiating itself from the many other bpj_table_* transform siblings, so it does not reach a 5.

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 guidance on when this tool is appropriate versus alternatives such as the backward/forward fill or coalesce siblings, and no stated preconditions (e.g. that the column must contain discrete label values). The clause about retaining unmatched cells implies a use case but never states when to reach for this 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.