Skip to main content
Glama

swisstopo_lookup_postal_code

Read-onlyIdempotent

Resolve a Swiss postal code into its locality, municipality, district, canton, and official BFS commune number for joining statistical data.

Instructions

Löst eine Schweizer PLZ in Ort, Gemeinde, Bezirk und Kanton auf (OpenPLZ, amtlich).

Beantwortet «Zu welcher Gemeinde/welchem Kanton gehört PLZ 8001?» und liefert die BFS-Gemeindenummer (bfs_commune_number). bfs_commune_number ist der amtliche Join-Schlüssel zu BFS-Statistikdaten (swiss-statistics-mcp) und zu zurich-opendata-mcp. Quelle OpenPLZ (BFS/swisstopo OGD), nicht die swisstopo-Geodaten. Eine unbekannte PLZ liefert eine leere Trefferliste mit erklärendem Hinweis.

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.
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds valuable context beyond annotations: unknown postal codes return an empty list with an explanatory hint, and the data source is OpenPLZ (not swisstopo geodata). This enriches transparency without contradicting annotations.

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 compact and well-structured with XML-like tags (use_case, important_notes). Each sentence adds distinct value: the main statement, an example use case, and essential notes about the BFS key and unknown-PLZ behavior. No wasted words.

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 simple single-parameter lookup tool with an output schema present, the description covers all essential aspects: what it does, the use case, key output (BFS number), data source caveat, and behavior for unknown inputs. No gaps are evident.

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 schema provides a clear description for the single parameter ('Schweizer Postleitzahl (4-stellig, z.B. 8001)'). The tool description only adds an example ('8001') in the use_case, contributing minimal additional meaning beyond the schema. Given the schema coverage is 0% from the description side, this is a baseline score.

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 uses a specific verb ('Löst auf') and resource ('Schweizer PLZ') to clearly state the output ('Ort, Gemeinde, Bezirk und Kanton'). The use_case further clarifies by giving a direct example question and mentioning the BFS commune number, which distinguishes it from sibling tools like geocode or reverse_geocode.

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 important_notes section clarifies the data source (OpenPLZ) and the primary use case (joining to BFS statistics), which implies when to use this tool. However, it does not explicitly name alternative tools or state when not to use it, so it falls slightly short of full explicit guidance.

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