Skip to main content
Glama
swiss-statistics-mcp

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "params": "<params>"
    },
    "name": "list_communes"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.8/5.0
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.