Skip to main content
Glama
malkreide

swiss-statistics-mcp

by malkreide

bfs_get_data

Read-onlyIdempotent

Query statistical data from a BFS table with optional dimension filters. Returns actual data values with dimension labels.

Instructions

Query statistical data from a BFS table with optional filters.

Fetches actual data values from a STAT-TAB table. Always call bfs_get_table_metadata first to understand available variables and values.

Args: params (GetDataInput): - table_id (str): BFS table ID - filters (Optional[list]): Dimension filters to narrow results. Each filter: {"code": "VariableCode", "values": ["val1", "val2"]} Without filters, all data is returned (may be very large). - lang (str): Language for labels - max_rows (int): Safety limit on returned rows (default 500)

Returns: DataTableResult with dimensions, rows, plus truncated, rows_total, rows_returned for machine-readable capping. On error, error and hint are set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
hintNo
table_idNo
titleNo
sourceNo
updatedNo
languageNo
dimensionsNo
rows_totalNo
rows_returnedNo
truncatedNo
rowsNo
noteNo
cantons_comparedNo
canton_variableNo
topicNo
topic_descriptionNo
cantonNo
canton_filterNo
regionNo
breakdownNo
yearNo
Behavior4/5

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

Annotations already provide readOnlyHint=true and destructiveHint=false, so the description's claim of querying data is consistent. The description adds behavioral context about the safety limit max_rows and the potential for large datasets when no filters are applied. It also describes error handling in the return (error and hint fields). This fills gaps beyond 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 well-structured: a clear purpose statement, a critical prerequisite, and then a bullet-point list of parameters with their roles. Every sentence adds value, and the most important information (what the tool does and the precondition) is front-loaded. There is no unnecessary verbosity.

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 that an output schema exists (DataTableResult), the description does not need to detail return values, but it does mention key fields (dimensions, rows, truncated, etc.). It covers prerequisites, filtering, language, and safety limits. The tool is a simple query with clear inputs and outputs, and the description addresses all relevant aspects.

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 schema provides detailed descriptions for each parameter (table_id, filters, lang, max_rows), so the description's summary in Args adds only marginal value. The description does include practical examples (e.g., '['1', '2'] for Zürich and Bern') in the schema itself, but the tool description restates key points concisely. Since schema coverage is high, the description does not significantly enhance parameter understanding.

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 clearly states it queries statistical data from a BFS table with optional filters, distinguishing it from sibling tools like bfs_get_table_metadata (which fetches metadata) and bfs_search_tables (which searches for tables). The verb 'Query' and resource 'data values from a STAT-TAB table' are specific and unambiguous.

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 explicitly advises calling bfs_get_table_metadata first to understand available variables and values, which is a clear prerequisite. It also notes that without filters, all data is returned (may be very large), implying when to use filters. However, it does not explicitly state when not to use this tool or list alternatives, but the context is sufficient.

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