Skip to main content
Glama
malkreide

swiss-statistics-mcp

by malkreide

lookup_commune

Read-onlyIdempotent

Resolve a Swiss commune by name or BFS number for a given date. Get the official register entry with BFS number, canton, validity dates, and stable LINDAS URI as it existed on the specified date.

Instructions

Resolve a Swiss commune by name or BFS number, as of a given date.

The BFS commune number is the portfolio's join key. This tool returns the official register entry — BFS number, name, canton, validity dates and the stable LINDAS URI — for a commune as it existed on valid_at_date.

Args: params (LookupCommuneInput): - name_or_bfs_number (str): name/substring or BFS number - valid_at_date (str): ISO date; commune state as of this date

Returns: LookupCommuneResult with matching communes (BFS number, canton, validity, LINDAS URI). On error, error and hint are set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
noteNo
errorNo
queryNo
sourceNoAmtliches Gemeindeverzeichnis der Schweiz (BFS) — https://www.bfs.admin.ch/bfs/de/home/grundlagen/agvch.html. Open Government Data, freie Weiterverwendung.
communesNo
provenanceNo
total_matchesNo
valid_at_dateNo
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds valuable behavioral context: it specifies the exact return fields (BFS number, canton, validity, LINDAS URI), explains the date-sensitive state of the commune, and discloses error handling (error and hint fields are set). This goes beyond the annotations to clarify expected outputs and failure modes.

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 well-structured with an opening purpose statement, a brief context paragraph, and clearly labeled Args/Returns sections. While slightly verbose with the join key explanation, every sentence contributes meaningful context. It is front-loaded with the main purpose and easy to scan.

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 the tool's simplicity, the presence of an output schema, and strong annotations, the description covers all necessary aspects: what it does, key parameters, return structure, and error behavior. It is complete enough for an agent to understand when and how to use it without further documentation.

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 input schema already provides rich descriptions for both parameters, including examples and matching behavior for name_or_bfs_number and the ISO date format for valid_at_date. The description's Args section merely repeats this information without adding new semantic depth, so it adds little beyond the schema.

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 opens with a specific verb and resource: 'Resolve a Swiss commune by name or BFS number, as of a given date.' It clearly states the tool's scope and output (official register entry with BFS number, name, canton, validity, LINDAS URI), distinguishing it from siblings like list_communes or resolve_historical_commune by emphasizing temporal resolution and the portfolio's join key.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides contextual hints—'as of a given date' and 'portfolio's join key'—but does not explicitly state when to use this tool over alternatives like resolve_historical_commune or list_communes. There are no stated exclusions or alternative naming, so the usage guidance is only implied, not explicit.

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