Skip to main content
Glama

fetch_metadata

Retrieve detailed metadata for a PxWeb table, including variable IDs, value codes, and code lists, to understand its structure and construct accurate queries.

Instructions

Fetch detailed metadata for a table to understand its structure.

Returns variable IDs, value codes, elimination info, and available code lists. Use this to construct queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage - 'no' for Norwegian (default), 'en' for English.no
table_idYesThe table ID (e.g. '07459', '11342').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of explaining behavior. It communicates that the operation fetches metadata and lists what is returned, which is useful. It does not explicitly state read-only behavior, error conditions, or any caveats, though 'Fetch' strongly implies a non-mutating lookup.

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 three efficient sentences: what it does, what it returns, and why to use it. Every sentence contributes value, and nothing is redundant or padded.

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 that there is no output schema, the description helpfully names the main return categories. It is complete enough for a straightforward metadata-fetching tool with only two parameters. A slightly richer example of how the metadata supports query construction would make it fully complete.

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

Parameters3/5

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

The input schema already fully documents both parameters and the language enum, so the description adds little parameter-level meaning. The statement that metadata contains variable IDs and code lists implicitly explains why table_id matters, but it does not go beyond the schema's own descriptions.

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 clearly identifies the action ('Fetch detailed metadata for a table') and the resource (a table), and also names the returned components, so the purpose is specific and actionable. It does not explicitly differentiate itself from the sibling tool get_table_info, which could plausibly overlap, so it misses the top score.

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 gives a clear use case: 'Use this to construct queries.' This tells the agent when the metadata is needed. However, it does not mention alternatives or when not to use this tool, such as distinguishing it from search_tables or get_table_info.

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