Skip to main content
Glama
malkreide

swiss-statistics-mcp

by malkreide

list_communes

Read-onlyIdempotent

List all communes of a Swiss canton for a specific date, including official BFS numbers and LINDAS URIs.

Instructions

List all communes of a canton, as of a given date.

Canton membership is derived from the snapshot's Parent chain (commune → district → canton), so this reflects the official division on valid_at_date. Each entry carries its BFS number and LINDAS URI.

Args: params (ListCommunesInput): - canton (str): abbreviation ('ZH') or name ('Zürich') - valid_at_date (str): ISO date; default today

Returns: ListCommunesResult with the canton's communes, sorted by BFS number. On error, error and hint are set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

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

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

Adds meaningful behavior beyond annotations: explains how canton membership is derived from the Parent chain, states sorting by BFS number, and discloses error/hint fields. No contradiction with readOnly/idempotent/destructive hints.

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?

Purpose is front-loaded in first sentence; the remaining sentences explain derivation, output fields, params, and return behavior in a compact structured Args/Returns layout. No filler.

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?

For a list tool with output schema and readOnly annotations, the description covers scope, date semantics, output sorting, and error behavior. It is self-sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 0%, the description compensates by documenting both params: canton accepts abbreviation or name with examples, and valid_at_date is ISO date defaulting to today. It adds practical format details beyond bare property names.

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?

Description opens with a specific verb+resource ('List all communes of a canton, as of a given date') and specifies output contents (BFS number, LINDAS URI). It clearly distinguishes from sibling single-commune/table tools by emphasizing 'all communes' and official division by date.

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?

Provides clear context: use when you need all communes for a canton at a specific date, with membership based on the snapshot's Parent chain. It does not explicitly name alternatives/exclusions, so not a 5, but it gives enough context for appropriate selection.

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