Skip to main content
Glama

Swiss municipality facts (Wikidata)

get_swiss_municipality_facts
Read-only

Retrieve Wikidata facts for a Swiss municipality by name or BFS number—Q-id, canton, population, area, elevation, coordinates, postal codes, website, and Wikipedia link—for enrichment and Q-id joins.

Instructions

Wikidata facts for a Swiss municipality by name or BFS number (P771): Q-id, labels, canton, population (latest, with date), area km², elevation m, coordinates, postal codes, official website, coat of arms image, HLS/DHS id and Wikipedia link. Examples: bfs_number=261 (Zürich), name='Lugano', name='Val de Bagnes'. For official BFS statistics prefer get_population / get_municipality; use this for the Q-id join key and enrichment.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
nameNoMunicipality name in any national language, e.g. 'Bern', 'Genève', 'Chur'
languageNoLanguage for labels and the Wikipedia link (default en)en
bfs_numberNoBFS municipality number, e.g. 261 (Zürich), 351 (Bern)
include_formerNoAlso match dissolved/merged municipalities

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered; the description adds real behavioral value by specifying that population is 'latest, with date' and that the Q-id serves as a join key for other tools. It stops short of saying how ambiguous name matches or a not-found municipality are handled, which matters for a name-keyed open-world lookup.

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?

Front-loaded with purpose, then the return-field inventory, then examples, then the sibling routing — a sensible order with no filler. Minor redundancy: the 'bfs_number=261 (Zürich)' example duplicates what the schema already says, so that sentence earns less than its length.

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?

With no output schema, the description carries the return-value burden itself and does so by enumerating every field returned (Q-id, canton, population with date, area, elevation, coordinates, postal codes, website, coat of arms, HLS/DHS id, Wikipedia link). Combined with the routing note, an agent has everything needed to call it correctly.

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?

Schema coverage is 100%, so all four parameters are already documented, including the language enum and include_former. The description only echoes the BFS-number and name examples already present in the schema, adding no new format or disambiguation guidance beyond it; baseline 3 applies.

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?

States a specific verb+resource ('Wikidata facts for a Swiss municipality') and the two lookup keys (name or BFS number P771), then enumerates exactly which facts come back. An agent can tell this apart from get_municipality or get_wikidata_entity without opening the schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: 'For official BFS statistics prefer get_population / get_municipality; use this for the Q-id join key and enrichment.' That names both the alternatives and the selection condition, plus concrete call examples (bfs_number=261, name='Lugano').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools