Skip to main content
Glama

Describe a BFS STAT-TAB table

get_bfs_table_metadata
Read-only

Retrieve STAT-TAB table metadata: dimensions, variable codes/labels, value counts, time range, defaults, and cell counts; list or search values for one variable to find codes.

Instructions

Dimensions of one STAT-TAB table: each variable's code, label, number of values, first values (code + label), which one is time (with range), the default used when unspecified, and the cell count. Pass 'variable' to list (and 'value_filter' to search) all values of one dimension, e.g. to find a commune code. Examples: {table_id:'px-x-0102010000_101'}, {table_id:'px-x-0102010000_101', variable:'Kanton', value_filter:'Bern'}.

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": {
      "table_id": "<table_id>"
    },
    "name": "get_bfs_table_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage of titles/labels: de, fr, it or en (default en)en
limitNoWith 'variable': max values listed
table_idYesTable id like 'px-x-0102010000_101' (or its API path / STAT-TAB URL)
variableNoList values of this variable only (code or label)
max_valuesNoValues shown per variable
value_filterNoWith 'variable': substring filter on value codes/labels

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered; the description adds real behavioral context by specifying the returned fields and that a default value is reported when none is specified. It does not mention truncation behavior when value lists exceed 'limit', which is the one remaining behavioral gap.

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?

The description is front-loaded: the return contents come first, then the mode switch, then compact inline examples. The opening sentence is long and list-like, but every clause carries information an agent needs, and there is no filler.

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?

There is no output schema, so the description must describe the return shape, and it does so thoroughly for a metadata tool, including the time dimension and default value. The only thing an agent must infer is how results are bounded when 'limit'/'max_values' truncate output, which the schema partly covers.

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 earns above that by explaining the interaction between 'variable' and 'value_filter' and by supplying worked examples with a real table_id format. It reinforces rather than merely repeats the schema, though it adds little on 'lang', 'limit', or 'max_values'.

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 names a specific resource (one STAT-TAB table's dimensions) and enumerates exactly what is returned: variable codes, labels, value counts, first values, the time variable with range, the default, and the cell count. It also clearly states the secondary mode triggered by 'variable', so an agent can distinguish metadata inspection from querying data.

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?

It gives concrete when-to-use guidance for the two modes: bare 'table_id' to get the dimension overview, and 'variable' (optionally with 'value_filter') to look up individual values such as a commune code. It does not name a sibling like query_bfs_table to say when to fetch data instead, so the routing guidance is clear but not exhaustive.

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

Deploy Server

Other Tools