Skip to main content
Glama

swisstopo_find_commune

Read-onlyIdempotent

Resolve Swiss commune names to BFS numbers, find a commune by BFS number, or list all communes in a canton or district.

Instructions

Löst Gemeinden auf: Name→BFS-Nummer, BFS-Nummer→Name, oder alle Gemeinden eines Kantons/Bezirks.

Vier Modi (genau einen Parameter angeben): name (Name → BFS-Nummer), bfs_number (BFS-Nummer → Gemeinde), canton (alle Gemeinden eines Kantons) oder district (alle Gemeinden eines Bezirks). Beantwortet z.B. «Welche Gemeinden liegen im Bezirk Uster und wie lauten ihre BFS-Nummern?». bfs_commune_number ist der amtliche Join-Schlüssel zu BFS-Statistikdaten (swiss-statistics-mcp). canton akzeptiert Kürzel ('ZH') oder BFS-Nummer ('1') — die Kürzel→Schlüssel-Auflösung erfolgt serverseitig, weil der Pfad sonst still eine leere Liste liefert. Gemeindelisten sind vollständig (interne Pagination), nicht auf 10 Einträge gekürzt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoActionable hint when a search returns nothing — what to try next, rather than a bare negative (audit ARCH-003).
countNoNumber of structured results.
sourceNoData source attribution.swisstopo / geo.admin.ch
licenseNoData licence.Swiss Open Government Data (opendata.swiss)
resultsNoStructured result records (machine-readable).
summaryYesHuman-readable Markdown summary of the result.
is_errorNoTrue if this represents a handled error.
match_typeNoexact | fuzzy | none (for search-style tools).
provenanceNoHow the data was obtained.live_api
retrieved_atNoISO-8601 retrieval timestamp.
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, etc.), the description adds valuable behavioral details: lists are complete ('interne Pagination, nicht auf 10 Einträge gekürzt'), canton abbreviation→key resolution happens server-side to avoid silent empty results, and the BFS number is the official join key. These details help the agent anticipate behavior and pitfalls.

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 well-structured with a concise opening sentence, a <use_case> block, and an <important_notes> block. Each sentence serves a purpose—covering modes, examples, and caveats—without fluff. The use of tags helps an agent scan key information efficiently.

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 complexity (four modes, exact-one-parameter constraint) and the existence of an output schema (which covers return values), the description is complete. It covers all parameter semantics, a usage example, and important edge cases like canton abbreviation resolution and full pagination. No critical information is missing.

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?

Schema description coverage is effectively 0% at the top level (only 'params' wrapper has no description), so the prose must compensate. The description thoroughly explains each of the four modes and parameters: name (forward), bfs_number (reverse), canton (abbreviation or number), district (numeric). It also emphasizes that exactly one parameter must be given, which is critical for correct invocation.

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: 'Löst Gemeinden auf: Name→BFS-Nummer, BFS-Nummer→Name, oder alle Gemeinden eines Kantons/Bezirks.' This clearly defines the tool as a commune resolver, distinct from siblings like swisstopo_geocode or swisstopo_reverse_geocode. The four modes are enumerated, making the purpose unmistakable.

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 provides clear context on when to use the tool: 'Vier Modi (genau einen Parameter angeben)' followed by a concrete example ('Welche Gemeinden liegen im Bezirk Uster...'). It explains the input constraints and the exact modes. It does not explicitly exclude alternatives or name sibling tools, but the guidance is sufficient for an agent to decide when this tool is appropriate.

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/swisstopo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server