Skip to main content
Glama

Look up coded values

lookup_codes
Read-onlyIdempotent

Look up code-to-label mappings for a dataset variable to find the filter value needed for data queries. Provide a format name and optional comma-separated codes to decode.

Instructions

Look up the code-to-label mapping for a coded variable — mainly to find a filter value for get_data ("California" -> fips=6).

Args: format_name: The "Format" shown for a variable in describe_dataset — "fips", "race", "sex", "school_level", "charter", … codes: Comma-separated codes to look up — "6,48". Omit for all values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codesNo
format_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false. The description adds behavioral context beyond that: its role in supporting get_data and that omitting 'codes' returns all values. This is useful supplemental transparency without contradicting annotations.

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?

The description is concise and front-loaded: the main purpose and example appear in the first sentence, followed by clear parameter definitions. No wasted words; every sentence earns its place.

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

Completeness5/5

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

An output schema exists, so return format is covered there. The description provides everything an agent needs to call the tool correctly: purpose, parameter semantics, and the key behavior of omitting codes. It is complete for a lookup helper with these annotations.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden for parameters. It completely explains format_name ('The "Format" shown for a variable in describe_dataset' with examples) and codes ('Comma-separated codes to look up — "6,48". Omit for all values.'). This fully compensates for the schema's lack of descriptions.

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 states a specific verb and resource: 'Look up the code-to-label mapping for a coded variable' and immediately ties it to a concrete use case with an example ('"California" -> fips=6'). This clearly differentiates it from sibling tools like describe_dataset or get_data. The purpose is unmistakable.

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

Usage Guidelines4/5

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

The description says 'mainly to find a filter value for get_data', giving clear primary context and the example reinforces when it applies. It lacks an explicit 'when not to use' or alternatives, but the main scenario is well conveyed. A 4 is appropriate for strong context without explicit exclusions.

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