Skip to main content
Glama
malkreide

swiss-statistics-mcp

by malkreide

bfs_compare_cantons

Read-onlyIdempotent

Compare a BFS statistical indicator across multiple Swiss cantons simultaneously. Provide the table ID, canton value codes, and optional filters to get side-by-side data for direct comparison.

Instructions

Compare a BFS statistical indicator across multiple Swiss cantons.

Designed for KI-Fachgruppe demos and benchmarking. Fetches the same dataset for multiple cantons simultaneously, enabling direct comparison.

Args: params (CompareCantonsInput): - table_id (str): BFS table ID to query - canton_values (list[str]): Canton value codes to compare. Use '0' for Switzerland total, '1' for Zürich, '2' for Bern, etc. Get codes via bfs_get_table_metadata on any canton-level table. - additional_filters (Optional[list]): Extra dimension filters - lang (str): Language code

Returns: str: JSON with data for all selected cantons side by side.

Example use case: Compare teacher-to-student ratios across ZH, BE, LU, CH total: canton_values=['0', '1', '2', '3']

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 indicate readOnlyHint=true and idempotentHint=true. The description adds that it fetches data simultaneously for multiple cantons and returns JSON. This adds useful behavioral context without contradicting 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 a single paragraph with an integrated example. It states the purpose upfront and every sentence adds information. No wasted words.

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 tool's moderate complexity and the presence of annotations (read-only, idempotent), the description covers purpose, parameters, usage, and ties to sibling tools. It lacks mention of error handling or response structure, but an output schema is likely provided.

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?

The schema already provides descriptions for each parameter, but the description adds value by explaining canton code meanings (e.g., '0' for Switzerland total) and including a concrete example in the use case.

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 first sentence clearly states 'Compare a BFS statistical indicator across multiple Swiss cantons', providing a specific verb (compare) and resource (BFS indicator across cantons). This distinguishes it from sibling tools like bfs_get_data which is likely for single-canton queries.

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 usage context: 'Designed for KI-Fachgruppe demos and benchmarking', and provides an example use case. It also instructs to get canton codes via bfs_get_table_metadata. However, it does not explicitly contrast with alternatives like bfs_get_data for single cantons.

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