Schwaizer BFS MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Schwaizer BFS MCP Serversearch for datasets about population in Zurich"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
About Schwaizer
SHAPING SWITZERLAND'S AI FUTURE
Empowering Swiss businesses and society through responsible AI adoption.
Founded in 2025, Schwaizer is a non-profit organization dedicated to accelerating the responsible adoption of artificial intelligence across Switzerland.
Website: https://www.schwaizer.ch
Related MCP server: swiss-democracy-mcp
Overview
The Schwaizer BFS MCP Server provides programmatic access to statistical data from the Swiss Federal Statistical Office (Bundesamt fΓΌr Statistik / Office fΓ©dΓ©ral de la statistique) through the Model Context Protocol (MCP).
This server integrates with three BFS APIs:
PXWEB API - Main statistical data API with comprehensive datasets
Swiss Stats Explorer (SSE) API - Modern SDMX-based API for time-series data
DAM API - Data Asset Management catalog for searching and discovering datasets
Features
π Search datasets by keywords, themes, and spatial divisions
π Retrieve statistical data with flexible filtering options
π Multi-language support (German, French, Italian, English)
π Time-series data access via Swiss Stats Explorer API
ποΈ Browse catalog with 21 statistical themes
π§ Metadata exploration to understand dataset structure
β‘ Rate limiting handling with automatic retries
π Structured logging for debugging
Installation
Prerequisites
Node.js 20.0.0 or higher
npm or pnpm
Install Dependencies
npm installConfiguration
Copy the example environment file:
cp .env.example .envEdit .env to customize settings (optional):
# Logging level (debug, info, warn, error)
LOG_LEVEL=info
# Optional: Rate limiting
BFS_REQUEST_DELAY=0
BFS_MAX_RETRIES=3Usage
Running the Server
npm startThe server runs via stdio and can be integrated with any MCP-compatible client.
Available Tools
Catalog Tools
search_datasets
Search for statistical datasets in the BFS catalog.
Parameters:
language(optional): Language for results (de, fr, it, en) - default: enquery(optional): Search term to find in titles and descriptionstheme(optional): Filter by theme (prodima number)spatialDivision(optional): Filter by spatial division levelpublishingYearStart(optional): Filter by publishing year startpublishingYearEnd(optional): Filter by publishing year endlimit(optional): Maximum results (1-1000) - default: 50
Example:
{
"language": "en",
"query": "students",
"theme": 900212,
"limit": 10
}list_themes
List all available statistical themes (categories).
Parameters:
language(optional): Language for theme names - default: en
Returns: List of 21 themes with prodima numbers and codes.
get_dataset_info
Get detailed information about a specific dataset.
Parameters:
numberBfs(optional): BFS number (e.g., "px-x-1502040100_131")numberAsset(optional): Asset numberlanguage(optional): Language for results - default: en
Note: Provide either numberBfs or numberAsset. The BFS number is different for PXWEB and SSE datasets.
Data Tools
get_statistical_data
Retrieve statistical data from the PXWEB API.
Parameters:
numberBfs(required): BFS number of the datasetlanguage(optional): Language for results - default: enquery(optional): Dimension filters as key-value pairsformat(optional): Response format (json-stat, json, csv) - default: json-stat
Example:
{
"numberBfs": "px-x-1502040100_131",
"language": "en",
"query": {
"Jahr": ["40", "41"],
"Studienstufe": ["2", "3"]
}
}get_sse_data
Retrieve time-series data from the Swiss Stats Explorer API.
Parameters:
numberBfs(required): SSE dataset identifier (e.g., "DF_LWZ_1")language(optional): Language for results - default: enquery(optional): Dimension filtersstartPeriod(optional): Start period (e.g., "2020")endPeriod(optional): End period (e.g., "2023")
Note: The BFS number for SSE datasets is different from the PXWEB datasets.
Example:
{
"numberBfs": "DF_PASTA_552_MONTHLY",
"language": "en",
"query": {
"FREQ": "M",
"ACCOMMODATION_TYPE": ["552001"],
"COUNTRY_ORIGIN": ["CH", "AUSL"]
},
"startPeriod": "2020",
"endPeriod": "2023"
}Metadata Tools
get_dataset_metadata
Get complete metadata structure for a PXWEB dataset.
Parameters:
numberBfs(required): BFS number of the datasetlanguage(optional): Language for labels - default: en
Returns: Complete dimension structure with all codes and values.
get_sse_metadata
Get metadata for a Swiss Stats Explorer dataset.
Parameters:
numberBfs(required): SSE dataset identifierlanguage(optional): Language for labels - default: en
get_dataset_dimensions
Get a simplified view of available dimensions for filtering.
Parameters:
numberBfs(required): BFS number of the datasetlanguage(optional): Language for labels - default: en
Returns: Dimension codes with sample values for quick reference.
Typical Workflow
1. Discover Datasets
// Search for datasets about students
search_datasets({
"query": "students",
"language": "en",
"theme": 900212 // Education theme
})2. Explore Dataset Structure
// Get metadata to understand available dimensions
get_dataset_metadata({
"numberBfs": "px-x-1502040100_131",
"language": "en"
})3. Retrieve Data
// Get filtered data
get_statistical_data({
"numberBfs": "px-x-1502040100_131",
"language": "en",
"query": {
"Jahr": ["40", "41"], // Years 2020/21, 2021/22
"Geschlecht": ["0", "1"] // All genders
}
})Example Use Case: Demographic Analysis
This section demonstrates a complete workflow for finding and retrieving specific demographic data.
Goal: Find the total permanent resident population of Zurich (ZH), Bern (BE), and Vaud (VD) for the years 2020-2024.
Step 1: Search for Relevant Datasets
First, search for datasets related to population at the cantonal level.
search_datasets({
"language": "en",
"query": "population",
"spatialDivision": "Cantons"
})This returns a list of datasets. We identify "px-x-0102010000_102" ("Permanent and non-permanent resident population by canton, sex, marital status and age, 2010-2024") as the most relevant one.
Step 2: Get Dataset Metadata
Next, get the metadata to understand the dataset's structure and find the codes for filtering.
get_dataset_metadata({
"numberBfs": "px-x-0102010000_102",
"language": "en"
})From the metadata, we identify the following codes:
Cantons:
ZH,BE,VDPopulation Type:
1(Permanent resident population)Sex:
-99999(Total)Marital Status:
-99999(Total)Age:
-99999(Total)
Step 3: Retrieve the Data
Finally, use the codes to query the specific data points.
get_statistical_data({
"language": "en",
"numberBfs": "px-x-0102010000_102",
"query": {
"Jahr": ["2020", "2021", "2022", "2023", "2024"],
"Kanton": ["ZH", "BE", "VD"],
"BevΓΆlkerungstyp": "1",
"Geschlecht": "-99999",
"Zivilstand": "-99999",
"Alter": "-99999"
},
"format": "json"
})Step 4: Analyze the Results
The query returns the following data, which can then be used for analysis or visualization.
Year | Canton | Population |
2020 | Zurich | 1,553,423 |
2020 | Bern | 1,043,081 |
2020 | Vaud | 814,762 |
2021 | Zurich | 1,564,662 |
2021 | Bern | 1,047,422 |
2021 | Vaud | 822,968 |
2022 | Zurich | 1,579,967 |
2022 | Bern | 1,051,437 |
2022 | Vaud | 830,431 |
2023 | Zurich | 1,605,508 |
2023 | Bern | 1,063,533 |
2023 | Vaud | 845,870 |
2024 | Zurich | 1,620,020 |
2024 | Bern | 1,071,216 |
2024 | Vaud | 855,106 |
This workflow demonstrates how to efficiently navigate the BFS data catalog and retrieve precise data for analysis.
BFS Themes
The BFS organizes data into 21 thematic areas:
Code | Theme | Prodima |
00 | Statistical basis and overviews | 900001 |
01 | Population | 900010 |
02 | Territory and environment | 900035 |
03 | Work and income | 900051 |
04 | National economy | 900075 |
05 | Prices | 900084 |
06 | Industry and services | 900092 |
07 | Agriculture and forestry | 900104 |
08 | Energy | 900127 |
09 | Construction and housing | 900140 |
10 | Tourism | 900160 |
11 | Mobility and transport | 900169 |
12 | Money, banks and insurance | 900191 |
13 | Social security | 900198 |
14 | Health | 900210 |
15 | Education and science | 900212 |
16 | Culture, media, information society, sports | 900214 |
17 | Politics | 900226 |
18 | General Government and finance | 900239 |
19 | Crime and criminal justice | 900257 |
20 | Economic and social situation of the population | 900269 |
21 | Sustainable development, regional disparities | 900276 |
Rate Limiting
The BFS PXWEB API has rate limits. If you encounter HTTP 429 errors:
Add delays between requests: Set
BFS_REQUEST_DELAYin.envQuery specific dimensions: Instead of requesting all data, filter by specific dimensions
Use smaller datasets: Break large queries into smaller chunks
API Documentation
PXWEB API
Base URL:
https://www.pxweb.bfs.admin.ch/api/v1Documentation: PXWEB API Guide
Swiss Stats Explorer (SSE)
Base URL:
https://stats.swiss/api/v1Format: SDMX-based XML responses
DAM API
Base URL:
https://dam-api.bfs.admin.ch/hub/apiPurpose: Dataset catalog and metadata
Error Handling
The server provides clear error messages for common issues:
404 Not Found: Dataset doesn't exist - check the BFS number
429 Too Many Requests: Rate limit exceeded - add delay or reduce query size
400 Bad Request: Invalid query parameters - check dimension codes and values
No records found: Query filters don't match any data - adjust filters or time period
Development
Project Structure
schwaizer-bfs-mcp/
βββ src/
β βββ index.js # MCP server entry point
β βββ config.js # Configuration loader
β βββ api/ # API clients
β β βββ pxweb-client.js # PXWEB API
β β βββ sse-client.js # Swiss Stats Explorer
β β βββ dam-client.js # DAM catalog
β βββ tools/ # MCP tool implementations
β β βββ catalog-tools.js # Search & discovery
β β βββ data-tools.js # Data retrieval
β β βββ metadata-tools.js # Metadata access
β βββ utils/ # Utilities
β βββ logger.js # Logging
β βββ formatting.js # Helpers
βββ tests/ # Test files
βββ docs/ # Documentation
βββ .env.example # Environment template
βββ package.json # Dependencies
βββ README.md # This fileScripts
npm start- Start the MCP servernpm run dev- Start with auto-reload on file changesnpm test- Run tests (when implemented)npm run lint- Run ESLintnpm run format- Format code with Prettier
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
MIT License - See LICENSE file for details
Disclaimer
This is an unofficial community project and is not affiliated with or endorsed by the Swiss Federal Statistical Office (BFS/OFS/UST/UFS).
Resources
Support
For issues and questions, please open an issue on the project's GitHub repository.
Built with β€οΈ by Schwaizer for the Swiss AI community
Available Tools
8 toolsget_dataset_dimensionsA
Get a simplified view of available dimensions and their values for a PXWEB dataset. This is useful for quickly understanding what filters you can apply when querying data. Returns dimension codes and all possible values.
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | Yes | BFS number (FSO number) of the dataset | |
| language | No | Language for dimension labels | en |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavior. It describes the return (dimension codes and values) but does not explicitly state read-only nature or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each adding value: defines the action, states usefulness, and describes return. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given two simple parameters and no output schema, the description adequately covers purpose and return, but could be improved by specifying output format or structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the description adds no new meaning beyond the schema's parameter descriptions; it only restates the same information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('simplified view of available dimensions and their values for a PXWEB dataset'), and distinguishes itself from siblings by focusing on dimensions for filtering, not metadata or data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for understanding filters before querying ('useful for quickly understanding what filters you can apply'), but does not explicitly state when not to use or provide alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_dataset_infoB
Get detailed information about a specific BFS dataset using its BFS number or asset number. Returns comprehensive metadata including title, description, available languages, publication date, and links to data files.
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | No | BFS number (FSO number) of the dataset (e.g., "px-x-1502040100_131") | |
| numberAsset | No | Asset number of the dataset | |
| language | No | Language for results | en |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It explicitly states the tool retrieves information and lists returned metadata, indicating a read-only operation. However, it does not disclose any additional behavioral traits such as idempotency, response size, or data freshness, which are moderately important for a data retrieval tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loading the purpose and then listing return fields. Every word is meaningful; no filler or repetition. It is optimally concise for the complexity of the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description compensates by listing the types of metadata returned (title, description, languages, date, links). This provides sufficient context for an agent to understand the return value. However, it could be improved by noting the response format or mentioning that the tool only works with BFS datasets specifically.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers all three parameters with detailed descriptions, achieving 100% schema coverage. The description adds limited value by mentioning 'using its BFS number or asset number' but does not enhance semantic understanding beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get detailed information' and the resource 'specific BFS dataset' using either a BFS number or asset number. It lists the type of metadata returned. However, it does not explicitly differentiate from sibling tools like get_dataset_metadata or get_dataset_dimensions, which may have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus other sibling tools such as get_dataset_dimensions or search_datasets. There is no mention of preconditions, exclusions, or alternatives, leaving the agent to infer usage from the tool name and description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_dataset_metadataA
Get complete metadata structure for a BFS dataset from the PXWEB API. Returns information about all available dimensions, their codes, and possible values. Use this before querying data to understand what filters you can apply.
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | Yes | BFS number (FSO number) of the dataset (e.g., "px-x-1502040100_131") | |
| language | No | Language for dimension and value labels | en |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states what the tool returns but does not disclose any behavioral traits such as side effects, authorization requirements, or rate limits. For a simple read-only operation, this is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with front-loaded purpose. Every word adds value; no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains the return content (dimensions, codes, values) and usage context. It is sufficient for a metadata retrieval tool with only two well-documented parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and both parameters are well-described in the schema. The description adds no new semantic information beyond what the schema already provides; it only rephrases the purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get', the resource 'complete metadata structure for a BFS dataset', and specifies what is returned (dimensions, codes, possible values). It distinguishes from sibling tools like get_dataset_dimensions by emphasizing completeness and pre-query usage.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises to use this before querying data to understand filters, providing clear context. However, it does not mention when not to use it or compare directly to siblings like get_dataset_info.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sse_dataA
Retrieve time-series data from the Swiss Stats Explorer (SSE) API. This is a modern SDMX-based API that works well for time-series data. Use get_sse_metadata first to see available dimensions. You can filter by dimensions and time periods.
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | Yes | BFS dataset identifier for SSE (e.g., "DF_LWZ_1") | |
| language | No | Language for results and labels | en |
| query | No | Optional dimension filters as key-value pairs. Example: {"GR_KT_GDE": ["2581", "4001"], "LEERWOHN_TYP": ["4"]} | |
| startPeriod | No | Start period for time-series data (e.g., "2020") | |
| endPeriod | No | End period for time-series data (e.g., "2023") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It describes the API as 'modern SDMX-based' and 'works well', but does not disclose behavioral traits like rate limits, response format, or read-only nature. It is adequate but minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences efficiently convey purpose, API context, and usage guidance. The mention of 'modern SDMX-based' adds slight value but is not essential. Well-structured and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 5 parameters (1 required), no output schema, and no annotations, the description adequately covers the tool's role and prerequisite steps. It could elaborate on return values, but the context is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds general context about filtering by dimensions and time periods but does not provide additional meaning beyond the schema descriptions for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves time-series data from the Swiss Stats Explorer API, specifying a verb and resource. It distinguishes from siblings by recommending get_sse_metadata first, clarifying its role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises using get_sse_metadata first to explore dimensions, providing clear context for when to use this tool. It lacks explicit exclusions or alternatives beyond that, but the guidance is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sse_metadataA
Get metadata for a Swiss Stats Explorer (SSE) dataset. Returns available dimensions and their possible values. Use this before calling get_sse_data to understand what filters you can apply.
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | Yes | BFS dataset identifier for SSE (e.g., "DF_LWZ_1") | |
| language | No | Language for dimension and value labels | en |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It transparently describes it as a read-only metadata retrieval operation returning dimensions and values. No destructive effects or additional behaviors are implied, which is appropriate for this function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words. The action verb 'Get' is front-loaded, and the important usage guidance is included efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given two parameters, no output schema, and multiple sibling tools, the description sufficiently explains the output (dimensions and values) and the tool's role. It could elaborate on language parameter effects but overall complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions already defining numberBfs and language. The description adds workflow context but no new semantic detail beyond the schema. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it 'Gets metadata for a Swiss Stats Explorer (SSE) dataset' and specifies it 'Returns available dimensions and their possible values.' It differentiates itself from siblings like get_sse_data by framing itself as a prerequisite step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises 'Use this before calling get_sse_data to understand what filters you can apply,' providing clear context and sequence. However, it does not mention when not to use it or alternatives like get_dataset_dimensions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_statistical_dataA
Retrieve statistical data from a BFS dataset using the PXWEB API. You can optionally filter by specific dimensions. Use get_dataset_metadata first to see available dimensions and values for filtering. Returns data in JSON-stat format by default.
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | Yes | BFS number (FSO number) of the dataset (e.g., "px-x-1502040100_131") | |
| language | No | Language for results and labels | en |
| query | No | Optional dimension filters as key-value pairs. Keys are dimension codes, values are dimension value codes (string or array of strings). Example: {"Jahr": ["40", "41"], "Geschlecht": ["0", "1"]} | |
| format | No | Response format (default: json-stat) | json-stat |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; the description mentions default return format (json-stat) but does not cover other behavioral traits like error handling, rate limits, or required permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. Purpose and key usage hint are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple retrieval tool with a required parameter, but lacks details on output structure or potential errors, which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds little beyond what the input schema already provides (e.g., filtering via query). Baseline score applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves statistical data from a BFS dataset using the PXWEB API, with optional filtering. This distinguishes it from sibling tools which handle metadata listing or search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises to use get_dataset_metadata first to discover dimensions, providing clear context for when to use this tool. No contraindications given, but usage is well-scoped.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_themesA
List all available statistical themes (categories) in the BFS catalog. Each theme has a name, prodima number (for filtering), and theme code. Use the prodima number with search_datasets to filter by theme.
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Language for theme names | en |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description carries burden. States it lists all themes, which implies read-only. No mention of side effects or limits, but for a simple listing this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, first defines purpose, second adds output details and usage hint. No waste, front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, but description explains output fields and how to use them. Adequate for a simple listing tool with one parameter.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only one parameter 'language' with schema covering 100%. Description adds context about output fields (name, prodima, theme code) but not new parameter details beyond schema's description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb 'list' and resource 'themes'. Specifies output components (name, prodima number, theme code). Differentiates from sibling tools like search_datasets which filter datasets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises using the prodima number with search_datasets for filtering, providing clear usage context. Does not state when not to use, but implied by sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_datasetsB
Search for statistical datasets in the Swiss Federal Statistical Office (BFS) catalog. Search by keywords, themes, spatial divisions, and other criteria. Returns a list of matching datasets with their BFS numbers and metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Language for results (de=German, fr=French, it=Italian, en=English) | en |
| query | No | Search term to find in titles and descriptions | |
| theme | No | Filter by theme (prodima number). Use list_themes to see available themes. | |
| spatialDivision | No | Filter by spatial division level | |
| publishingYearStart | No | Filter by publishing year start (e.g., "2020") | |
| publishingYearEnd | No | Filter by publishing year end (e.g., "2023") | |
| limit | No | Maximum number of results to return (default: 50, max: 1000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only mentions returning a list of datasets with metadata, omitting details such as whether the operation is read-only, any rate limits, pagination behavior, or side effects. This is insufficient for a complex search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at three sentences and front-loads the primary purpose. While efficient, it could be more structured (e.g., bullet points for parameters) but remains easily readable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's 7 optional parameters, no required params, and no output schema, the description gives a high-level overview but lacks guidance on default behavior when no query is provided, how filters combine, or how to handle large result sets. It does not reference sibling tools to aid selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so each parameter is documented. The tool description adds little beyond summarizing that search is by 'keywords, themes, spatial divisions, and other criteria,' which maps directly to the schema. It does not provide additional examples or deeper semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: searching for statistical datasets in the BFS catalog with various filters. It specifies the resource (datasets), action (search), and result (list with BFS numbers and metadata), effectively distinguishing it from siblings like get_dataset_info or list_themes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The explanation implies usage for searching by keywords, themes, etc., but does not explicitly state when to use this tool versus alternatives like get_dataset_info (for specific dataset details) or list_themes (for theme selection). No exclusions or when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
8 tool updates
v1.0.0- First observed
get_dataset_dimensions - First observed
get_dataset_info - First observed
get_dataset_metadata - First observed
get_sse_data - First observed
get_sse_metadata - First observed
get_statistical_data - First observed
list_themes - First observed
search_datasets
TDQS
Scored across 8 tools
Tools are mostly distinct, but some overlap exists between get_dataset_dimensions, get_dataset_metadata, and get_dataset_info as they all provide metadata about datasets. Descriptions help differentiate, but agents might be confused about which to use for dimension exploration.
All tools follow a consistent 'verb_noun' pattern with snake_case (e.g., list_themes, search_datasets, get_sse_data). No deviations or mixed conventions.
8 tools is well-scoped for a statistical data server covering two APIs (PXWEB and SSE) and basic discovery. Not too few to be incomplete, and not overwhelming.
The tool surface covers discovery, metadata retrieval, and data extraction for both APIs. Minor gaps include lack of a tool to list all datasets directly (search is needed) and no tool for SSE-specific search, but overall the domain is reasonably covered.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
opendata.swiss MCP β Switzerland's federal open-data portal (CKAN catalogue).
MCP server for Statistics Sweden (SCB) - 1200+ tables with population, economy, environment data
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
This MCP server provides seamless access to Malaysia's government open data, including datasets, wβ¦
Related MCP Servers
- AlicenseAqualityDmaintenanceSwiss open data MCP server β transport, weather, geodata, companies, etc,. Zero API keys.7622722MIT
- AlicenseAqualityAmaintenanceAn MCP server providing access to Swiss direct democracy data, covering all federal popular votes since 1848 and elections since 1900.102MIT
- AlicenseAqualityBmaintenanceMCP server for Swiss federal geodata -- maps, elevation, geocoding, cadastral extracts, and downloadable datasets via Swisstopo APIs.208MIT
- AlicenseAqualityDmaintenanceMCP server for accessing statistical data via the PxWeb API v2.6231MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ishumilin/schwaizer-bfs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server