Skip to main content
Glama
malkreide

swiss-statistics-mcp

by malkreide

bfs_get_table_metadata

Read-onlyIdempotent

Retrieve a BFS table's metadata: title, variables, and filter values. Use variable codes from the response to build data queries.

Instructions

Get metadata for a BFS table: title, variables, and available filter values.

Essential step before calling bfs_get_data. Returns all dimension variables with their codes and value labels needed to construct data queries.

Args: params (GetTableMetadataInput): - table_id (str): BFS table ID, e.g. 'px-x-1504000000_173' - lang (str): Language for labels

Returns: str: JSON with table title, source, update date, and all variables with their codes and value options. Use variable codes in bfs_get_data filters.

Example output structure: { "title": "Lehrkräfte nach Schuljahr, Kanton...", "variables": [ { "code": "Schuljahr", "label": "Schuljahr", "n_values": 14, "values": [{"code": "0", "label": "2010/11"}, ...] } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
hintNo
table_idNo
titleNo
sourceNo
last_updatedNo
theme_codeNo
theme_nameNo
languageNo
n_variablesNo
variablesNo
usage_hintNo
Behavior4/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds behavioral context: returns dimension variables with codes and value labels needed for queries. Shows example output structure, aiding understanding of return content.

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?

Well-structured with summary, usage context, args, returns, and example. Slightly verbose but front-loaded with purpose. Each section 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?

Given tool complexity and presence of output schema, description covers purpose, parameters, return structure, and next steps. Example output clarifies what to expect. No gaps identified.

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?

Description briefly mentions params (table_id, lang) but schema already provides detailed descriptions (patterns, defaults, enum). No additional semantics added beyond schema; baseline 3 is appropriate.

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?

Clearly states 'Get metadata for a BFS table' and specifies what metadata (title, variables, filter values). Explicitly distinguishes from sibling bfs_get_data by stating it's an essential step before data retrieval.

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?

Explicitly says 'Essential step before calling bfs_get_data', implying when to use. Provides context on what to do after (use variable codes in filters). No explicit when-not-to-use or alternatives mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/swiss-statistics-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server