Skip to main content
Glama

get_code_list

Retrieve a statistical code list by its ID: get valid variable values from valuesets (vs_*) or aggregation mappings from groupings (agg_*), in Norwegian or English. Find available code lists in table metadata.

Instructions

Fetch a code list (valueset or grouping).

Valuesets (vs_*): Lists of valid values for a variable. Groupings (agg_*): Aggregation mappings (e.g., municipality mergers).

Find available code lists in table metadata under 'codeLists'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage - 'no' for Norwegian (default), 'en' for English.no
code_list_idYesCode list ID (e.g. 'vs_Fylker', 'agg_KommSummer').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It usefully explains the vs_*/agg_* distinction and points to metadata as the source for valid IDs, but it does not describe the response structure, pagination, or exact return contents. This is adequate for a simple fetch tool but not richly transparent.

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 compact and front-loaded with the core action, followed by concise type definitions and a practical discovery hint. Every sentence earns its place with no filler or repetition of schema details.

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?

Given the simple 2-parameter schema and the absence of an output schema, the description is largely complete: it defines what code lists are, how IDs are structured, and where to find valid IDs. The only notable gap is the lack of explicit return-format detail, but the definition of valuesets/groupings indirectly conveys what will be retrieved.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond the schema by explaining the meaning of ID prefixes (vs_* vs agg_*) and providing concrete examples. The language parameter is already fully documented in the schema, so the description does not need to repeat it.

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 opens with 'Fetch a code list', a specific verb and resource, and immediately clarifies the two types (valuesets vs_* and groupings agg_*). This distinguishes the tool from siblings like query_table or fetch_metadata, which serve different data/metadata needs.

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 description implies when to use the tool—when you need valid values or aggregation mappings—and explains how to discover available code lists via table metadata. However, it does not explicitly state when NOT to use it or name alternative sibling tools, leaving some routing to inference.

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