swiss-housing-mcp
This server provides MCP tools to query the Swiss Federal Register of Buildings and Dwellings (GWR/RegBL), covering building lookups, geocoding, dwelling details, and municipal construction statistics.
Look up a building by its EGID (federal building identifier) with address, status, coordinates, and construction year.
Geocode a Swiss address to EGID/EDID and LV95 coordinates, enabling other data sources to join on federal identifiers.
List all dwellings (EWID) of a building, including rooms, floor area, floor, and status.
Get yearly new residential construction per municipality, including total dwellings and the 4+ room family-housing share.
View the construction pipeline by status: projected, approved, and under construction — an early indicator for school-space planning.
Analyze buildings and dwellings within an LV95 bounding box for sub-municipal areas such as school districts.
Get a municipality housing overview: total/residential buildings, dwellings, and room-size mix.
Decode GWR code values (e.g., GSTAT, GKAT) into official German/French/Italian labels.
Check dump cache freshness and data provenance via
dump_status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@swiss-housing-mcpHow many new dwellings in Zurich since 2020?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
swiss-housing-mcp
Part of the Swiss Public Data MCP Portfolio — open-source MCP servers connecting AI agents to Swiss public data. Private project, independent of any employer or institutional affiliation.
MCP server for the Swiss Federal Register of Buildings and Dwellings (GWR/RegBL) — buildings, dwellings, and the construction pipeline
🎯 Anchor Demo Query
«How many dwellings were newly built in the City of Zurich since 2020, how many with 4+ rooms — and how many are currently under construction?»
Verified against the live dump on 2026-07-24: 16'164 new dwellings since 2020 (27.4% with 4+ rooms — the family-housing proxy), and 7'287 dwellings currently under construction. Dwellings under construction today are households in 1–3 years: the early indicator for school-space planning.
Demo
Related MCP server: swiss-apis-mcp
Overview
The GWR/RegBL is to buildings what Zefix is to companies: not one data source among many, but the federal register whose identifiers (EGID for buildings, EWID for dwellings) serve as join keys across Swiss administrative data. This server exposes the register's public extract through MCP tools — building lookups, address geocoding, per-municipality construction statistics, sub-municipal bounding-box analysis, and the planning/construction pipeline.
address_to_egid is the plug that makes other data sources EGID-capable: address in, federal identifier and LV95 coordinates out.
Architecture decision
This server uses Architecture B (Hybrid: Dump-first, API-fallback).
Rationale (verified live on 2026-07-24):
The public cantonal dump (
public.madd.bfs.admin.ch/{canton}.zip) is refreshed daily (~05:30 CET) and ships a ready-madedata.sqlitewith tablesbuilding(399'830 rows for ZH),entrance,dwelling(894'631 rows for ZH), andcode. No CSV parsing, no auth.api3.geo.admin.ch(find / identify / SearchServer) works reliably without authentication for single-entity lookups and geocoding, but does not scale to area-wide aggregations (result limits).A MADD REST endpoint probed at
/api/buildings/{egid}returned 404; it is excluded until path and auth status are clarified — no blocker, since all Phase-1 tools work without it.
Consequences:
Cantonal dumps are cached on disk with a 24 h TTL (configurable via
SWISS_HOUSING_DUMP_TTL_HOURS).Aggregations and spatial queries run as read-only SQL against the cached SQLite; single lookups and geocoding hit the live API.
Every response carries
source(attribution) andprovenance(daily_dump|live_api|cached).
Live probe findings (2026-07-24)
Endpoint | HTTP | Status | Note |
| 200 | ✅ works | full attribute set, no auth |
| 200 | ✅ works | 77 attributes incl. EGID/EWID |
| 200 | ✅ works |
|
| 200 | ✅ works | 121 MB, daily refresh, contains |
| 404 | ❌ excluded | path/auth unclear |
Invalid EGID on find | 200 | ⚠️ soft error | empty |
Features
lookup_building(egid)— single building by federal identifier (live API)address_to_egid(address)— geocode any Swiss address to EGID/EDID + LV95lookup_dwellings(egid)— all dwellings of a building with rooms, area, floornew_construction(municipality_bfs, since_year)— yearly new construction incl. 4+ room family-housing shareconstruction_pipeline(municipality_bfs)— projected / approved / under constructionbuildings_in_bbox(e_min, n_min, e_max, n_max)— sub-municipal analysis (e.g. school districts)municipality_housing_stats(municipality_bfs)— housing stock and room-size mixexplain_code(attribute, code)— decode GWR codes via the official DE/FR/IT code tabledump_status()— cache freshness, graceful-degradation entry point
Prerequisites
Python 3.10+
~130 MB disk per cached cantonal dump (ZH)
No API keys — Phase 1 is authentication-free
Installation
uvx swiss-housing-mcp # once published on PyPI
# or from source
pip install -e .Usage / Quickstart
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"swiss-housing": {
"command": "uvx",
"args": ["swiss-housing-mcp"]
}
}
}Cloud (Render/Railway):
SWISS_HOUSING_TRANSPORT=streamable-http PORT=8000 swiss-housing-mcpConfiguration
Variable | Default | Purpose |
|
|
|
|
| Dump cache directory |
|
| Dump freshness window |
MCP Protocol Version
This server speaks two protocol eras over the same endpoint. The client's first request on a connection decides which one applies; a later claim from the other era is refused.
Era | Revision | Who reaches it |
|
| What today's clients speak. The server answers with the revision asked for, or with the |
Per-request envelope |
| A request carrying the |
Both eras are measured, not inferred:
tests/test_modern_era.py drives real requests of
each era through this server's own ASGI app — the one __main__.py serves
under SWISS_HOUSING_TRANSPORT=streamable-http — and reads the negotiated
revision off the response body. Alongside it,
tests/test_protocol_version.py pins both
revisions against the installed SDK, so a Dependabot bump of mcp breaks the
build before anyone reads the measurement.
Note that the SDK's LATEST_PROTOCOL_VERSION is an alias for the modern
era, not for the handshake era — pinning against it alone would leave the era
that current clients actually negotiate free to drift.
Identity on the modern era. The 2026-07-28 era has no initialize
handshake: a connection is a single request carrying a _meta envelope. So
server/discover is the only channel through which a modern client learns
anything about this server, and the serverInfo block the SDK stamps into
every result is the only place its identity appears. This server therefore
declares version, title, description, websiteUrl and instructions.
description and websiteUrl are read from the package metadata rather than
repeated as literals — the SDK fills none of them in, and an unversioned server
announces an empty version on every single response.
Update policy. When the gate fails, do not edit the constant blindly: read
the spec changelog between the two revisions, verify the server still behaves,
then move the constant, this section, README.de.md and
CHANGELOG.md together.
Testing
PYTHONPATH=src pytest tests/ -m "not live" # CI-safe
PYTHONPATH=src pytest tests/ -m live # against real upstreamProject Structure
swiss-housing-mcp/
├── src/swiss_housing_mcp/
│ ├── server.py # FastMCP tools (9)
│ ├── gwr.py # Dump store + geo.admin.ch client + retry
│ ├── models.py # Pydantic v2 envelopes (source + provenance)
│ └── __main__.py # Dual-transport entry point
├── tests/ # respx-mocked + @pytest.mark.live
└── .github/workflows/ # CI + OIDC PyPI publishKnown Limitations
The public extract omits person-related and some sensitive attributes of the full GWR; official data deliveries to authorities go through the BFS/MADD channel.
Coordinates are building reference points (LV95), not footprint polygons — polygon joins (e.g. exact school-district boundaries) need external geometries;
buildings_in_bboxcovers the rectangular approximation.GBAUJ(construction year) is missing for a share of older buildings; period codes (GBAUP) exist as fallback but are not yet exposed.Municipality→canton resolution is seeded for common cases; pass
cantonexplicitly for others.Housing-market indices (IMPI, construction price index, vacancy rate) deliberately live in
swiss-statistics-mcp— this server is the register layer, not the statistics layer.
Changelog
See CHANGELOG.md
Contributing
Contributions are welcome — see CONTRIBUTING.md (Deutsch).
Security
Read-only, no PII, no authentication — a public federal register accessed through a fixed set of endpoints. See SECURITY.md (Deutsch) for the full posture and how to report a vulnerability.
License
MIT License — see LICENSE. Data: GWR/RegBL, Swiss Federal Statistical Office (BFS), open government data with attribution.
Author
Hayal Oezkan · github.com/malkreide
Credits & Related Projects
Portfolio siblings:
swiss-statistics-mcp(indices, STAT-TAB),zurich-opendata-mcp(city-level data)
Available Tools
9 toolsaddress_to_egidARead-only
Geocode a Swiss address to EGID/EDID and LV95 coordinates.
This is the bridge that makes other data sources EGID-capable: address in → federal building identifier out.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| address | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| query | Yes | |
| source | No | |
| matches | Yes | |
| provenance | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds the input/output transformation detail but does not disclose behavior for ambiguous addresses, no-match results, or how the limit parameter affects results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two tight sentences with no fluff. The first sentence states the core action and outputs, and the second adds useful conceptual framing. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The core purpose and input/output direction are clear, and the output schema covers return values. However, the description omits behavior around multiple matches and the meaning of 'limit', which an agent would need for fully confident invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for parameter documentation. It clarifies the 'address' parameter through 'address in → federal building identifier out', but it says nothing about the 'limit' parameter, leaving a required semantic gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Geocode') plus a precise resource and output ('Swiss address to EGID/EDID and LV95 coordinates'). It clearly differentiates this tool from siblings like lookup_building or buildings_in_bbox by framing it as the address-to-identifier bridge.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: this tool exists to convert addresses into federal building identifiers, making other data sources EGID-capable. It does not explicitly name alternatives or state when not to use it, so it stops short of full usage-rule guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
buildings_in_bboxARead-only
Aggregate buildings/dwellings inside an LV95 bounding box.
Enables sub-municipal analysis, e.g. school districts: pass the bounding box of a Schulkreis to count new construction within it. LV95 (EPSG:2056): east ~2'480'000-2'840'000, north ~1'070'000-1'300'000.
| Name | Required | Description | Default |
|---|---|---|---|
| e_max | Yes | ||
| e_min | Yes | ||
| n_max | Yes | ||
| n_min | Yes | ||
| canton | No | zh | |
| since_year | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| source | No | |
| bbox_lv95 | Yes | (e_min, n_min, e_max, n_max) |
| buildings | Yes | |
| dwellings | Yes | |
| provenance | Yes | |
| since_year | Yes | |
| dwellings_4plus_rooms | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already covers the safe-read behavior; the description adds that the tool aggregates/counts buildings and dwelllings. It does not describe filtering semantics, aggregation dimensions, or limits, but the annotation lowers the burden somewhat.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is tight and front-loaded: purpose, use-case example, and coordinate context each earn their place. There is no filler or redundant restating of the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given six parameters and no schema descriptions, the description covers the core bounding-box concept but leaves canton and since_year behavior unexplained. The output schema and readOnly annotation fill some gaps, but the definition is not fully self-sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains the LV95 coordinate system and plausible numeric ranges for the four required bounding-box parameters, and 'new construction' hints at a time filter. However, the optional canton and since_year parameters are not explicitly explained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence states a specific action ('Aggregate buildings/dwellings') and resource constrained to an LV95 bounding box, making the tool's purpose clear. It does not explicitly differentiate from siblings like new_construction or lookup_dwellings, so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The school-district example implies a sub-municipal analysis use case, giving some contextual guidance. However, it does not name alternative tools or state when not to use this tool, leaving routing decisions to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
construction_pipelineBRead-only
Buildings and dwellings in the planning/construction pipeline of a municipality.
Breaks down by status: projected (GSTAT 1001), approved (1002), under construction (1003). Dwellings under construction today are households in 1-3 years — the early indicator for school-space planning.
| Name | Required | Description | Default |
|---|---|---|---|
| canton | No | ||
| municipality_bfs | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| note | No | |
| source | No | |
| pipeline | Yes | |
| provenance | Yes | |
| municipality | Yes | |
| municipality_bfs | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the description's additional information about status breakdowns and the interpretation of 'under construction' as an early indicator adds useful behavioral context. However, it does not disclose potential limitations like data availability by municipality or time-range constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences: the first states the core purpose, the second details the status categories, and the third explains the practical implication. Every sentence adds value, and the content is front-loaded with the most critical information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema and the tool's moderate complexity, the description covers the data meaning and use case. However, it omits parameter semantics and does not specify what the output contains or how to interpret the status codes fully (though codes are listed). The description is adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage for its two parameters (canton, municipality_bfs). The description does not mention these parameters or provide any guidance on their values, formats, or roles. With no schema descriptions and no parameter information in the description, the agent receives no help beyond the schema structure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the tool retrieves buildings and dwellings in the planning/construction pipeline of a municipality, with explicit breakdowns by status codes. This verb-resource combination is distinct from sibling tools like lookup_dwellings (likely existing dwelling data) and new_construction (new building registrations). The context of early indicator for school-space planning further differentiates its use case.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for getting pipeline data for a municipality and hints at its value for school-space planning, but it does not explicitly state when to prefer this tool over siblings or when not to use it. No exclusions or alternative recommendations are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dump_statusARead-only
Cache status of the cantonal GWR dumps (graceful-degradation entry point).
Always returns an evaluable status — never silently empty records. If a source is unreachable, this tool tells you when data was last refreshed.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| note | Yes | |
| dumps | Yes | |
| source | No | |
| ttl_hours | Yes | |
| provenance | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true. The description adds value by stating the tool never returns empty records and reports last refresh time, which is beyond what annotations provide. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. The key information is front-loaded and every sentence contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and the existence of an output schema, the description adequately covers the tool's behavior and return value. It is sufficient for the agent to understand what to expect, though it doesn't detail the output structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so the baseline is 4. The description correctly adds no parameter information since none are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool shows cache status of GWR dumps with graceful degradation. It is distinct from sibling tools like lookup_dwellings which retrieve data. No explicit differentiation from siblings, but the purpose is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking cache health even when sources are unreachable, but does not explicitly state when to use it over alternatives. It provides context but no exclusions or direct guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explain_codeARead-only
Decode a GWR code value (e.g. GSTAT=1004, GKAT=1020) into human-readable labels.
Uses the official code table shipped with the dump (DE/FR/IT).
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| canton | No | zh | |
| attribute | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| source | No | |
| provenance | Yes | |
| explanations | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the read-only nature is clear. The description adds value by specifying the source of the labels (official code table) and the supported languages (DE/FR/IT), going beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise at two sentences, but the second sentence could be more structured or broken into bullet points for clarity. No superfluous information, but room for slight improvement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 params, no enums) and the presence of an output schema, the description adequately covers the main purpose. However, it lacks explanation for the optional parameter and does not mention the output schema's structure, resulting in moderate completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description bears the full burden of explaining parameters. It includes an example of 'attribute' and 'code' but does not describe the optional 'canton' parameter at all, leaving a gap in understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool decodes GWR code values into human-readable labels, with a specific verb and resource. It provides an example of inputs (GSTAT=1004) and distinguishes itself from sibling tools that handle different tasks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for decoding codes from a specific code table, but does not explicitly state when to use this tool vs alternatives, nor does it mention any prerequisites or when not to use it. Sibling tools have different purposes, so some implicit differentiation exists.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookup_buildingARead-only
Look up a single building by its EGID (federal building identifier).
Uses the live geo.admin.ch API — always current, no dump download needed. The EGID is the join key used across Swiss administrative data.
| Name | Required | Description | Default |
|---|---|---|---|
| egid | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| found | Yes | |
| source | No | |
| building | No | |
| provenance | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the incremental bar is low. The description adds the live-API behavior ('always current, no dump download needed') and explains the EGID's role as a join key, which is useful beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, no filler; purpose is front-loaded in the first sentence and the remaining sentences each add one relevant fact (live API, EGID role).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, read-only lookup with an output schema, the description is nearly complete: it states the resource, the identifier semantics, and data source. It could optionally mention routing to siblings (e.g., use address_to_egid when no EGID is known), but that gap is minor for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the schema only names the property 'egid' with type integer. The description defines EGID as a federal building identifier and the cross-administrative join key, adding the missing semantic meaning, though it stops short of providing an example or value-format details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence states a specific action and resource: 'Look up a single building by its EGID (federal building identifier).' The qualifier 'single building' plus EGID distinguishes it from siblings like buildings_in_bbox and address_to_egid, so a user can select it correctly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: it should be used for exact EGID lookups against the live geo.admin.ch API, and it explicitly avoids needing a dump download. It doesn't name sibling alternatives or state exclusions, but the 'single building by EGID' phrasing implies the boundary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookup_dwellingsARead-only
List all dwellings (EWID) of a building from the daily cantonal dump.
Includes rooms, floor area, floor and status per dwelling.
| Name | Required | Description | Default |
|---|---|---|---|
| egid | Yes | ||
| canton | No | zh |
Output Schema
| Name | Required | Description |
|---|---|---|
| egid | Yes | |
| count | Yes | |
| source | No | |
| dwellings | Yes | |
| provenance | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true. The description adds context (data source 'daily cantonal dump' and included fields) but does not disclose behavior beyond that, such as error handling or permissions. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loaded with the core action. However, it could be slightly more structured with bullet points for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only list tool with an output schema, the description adequately mentions included fields but omits explanation of the required 'egid' parameter and the default value for 'canton'. The data source reference is vague.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should explain parameters. However, it does not mention 'egid' as building ID or 'canton''s role. It only references 'a building' implicitly, leaving parameter semantics unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'List all dwellings (EWID) of a building' and specifies included attributes (rooms, floor area, floor, status). This distinguishes it from sibling tools like new_construction or dump_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied but not explicit. The description does not mention when to use this tool versus alternatives, nor does it provide conditions for appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
municipality_housing_statsCRead-only
Housing stock overview of a municipality: buildings, dwellings, room-size mix.
| Name | Required | Description | Default |
|---|---|---|---|
| canton | No | ||
| municipality_bfs | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| source | No | |
| provenance | Yes | |
| municipality | Yes | |
| buildings_total | Yes | |
| dwellings_total | Yes | |
| municipality_bfs | Yes | |
| dwellings_by_rooms | Yes | |
| buildings_residential | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already carry readOnlyHint=true, so the description's lack of behavioral disclosure is partially mitigated. However, it adds no extra context beyond that – no mention of data freshness, aggregation details, or limitations. Since the description does not contradict the annotation, it is not a failure, but it also provides no additional transparency value.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that delivers the core message immediately with no filler. It is perfectly sized for the amount of information it conveys, even though that information is incomplete elsewhere.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema (not provided) but the description fails to cover critical input usage: it doesn't explain the relationship between canton and municipality_bfs, how to obtain a BFS number, or what kind of output is expected (though the schema covers returns). Combined with zero parameter guidance and no sibling differentiation, an agent would likely struggle to invoke this correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description says nothing about either parameter. It does not explain that municipality_bfs is a BFS identifier, whether canton is optional, or how they interact. The agent must guess the meaning from the name, which is risky. This is a severe omission for a required integer parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb and resource: it provides a housing stock overview for a municipality, specifically listing buildings, dwellings, and room-size mix. This is specific enough to distinguish it from tools like lookup_dwellings (which focuses on individual dwellings) and new_construction (which covers future builds). However, it does not explicitly contrast it with any sibling, so it lacks the direct differentiation seen in top-tier descriptions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. It neither states scenarios nor mentions sibling tools. An agent cannot know whether to pick this over lookup_dwellings or buildings_in_bbox from the description alone, leaving the decision entirely to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
new_constructionBRead-only
New residential construction per year for a municipality (existing buildings).
Returns buildings, dwellings and 4+ room dwellings per year — the 4+ room share is a proxy for family housing and thus for future pupil numbers. Municipality is identified by its BFS number (e.g. 261 = City of Zurich).
| Name | Required | Description | Default |
|---|---|---|---|
| canton | No | ||
| since_year | No | ||
| municipality_bfs | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| source | No | |
| per_year | Yes | |
| provenance | Yes | |
| since_year | Yes | |
| municipality | Yes | |
| total_dwellings | Yes | |
| family_share_pct | Yes | Share of 4+ room dwellings — proxy for family housing |
| municipality_bfs | Yes | |
| total_dwellings_4plus_rooms | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true. Description adds context about the 4+ room share being a proxy for family housing, but does not disclose any additional behavioral traits such as data source, update frequency, or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is two sentences, efficiently conveying core purpose and a key interpretation note. No redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, return value explanation is not needed. However, the description lacks usage context and does not fully cover parameters. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. Description only explains municipality_bfs with an example. Parameters canton and since_year are not described at all, leaving their semantics unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it returns annual new residential construction data for a municipality, including buildings, dwellings, and 4+ room dwellings. However, phrasing 'existing buildings' may cause confusion about whether it covers new construction or existing stock.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus siblings like lookup_dwellings or construction_pipeline. Does not mention alternatives or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.2.0- Added
address_to_egid - Added
buildings_in_bbox - Added
lookup_building - Added
municipality_housing_stats
5 tool updates
v0.1.0- First observed
construction_pipeline - First observed
dump_status - First observed
explain_code - First observed
lookup_dwellings - First observed
new_construction
TDQS
Scored across 9 tools
Each tool targets a distinct resource or action: building lookup, dwelling lookup, address geocoding, bbox aggregation, municipal stock, pipeline, code decoding, and cache status. The closest pair, municipality_housing_stats and new_construction, is still clearly differentiated as stock overview vs. time-series construction.
All names are lowercase snake_case and readable, but conventions are mixed: some follow verb_noun (lookup_building, explain_code, dump_status), while others are noun phrases (buildings_in_bbox, municipality_housing_stats, construction_pipeline). There is no single consistent prefix or verb pattern across the set.
Nine tools is well-scoped for a Swiss housing/GWR data server. Each tool covers a meaningful query or utility function without redundancy or bloat.
The tool surface covers key workflows: address-to-EGID resolution, building and dwelling lookup, bounding-box aggregation, municipal stock, pipeline, historical construction, and code explanation. Minor gaps exist, such as no municipality-by-BFS-number search tool and no bulk code-table listing, but agents can work around these.
Maintenance
Related MCP Connectors
- geoOAuthco.thinair
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
CompanyLens is a remote MCP server giving AI agents instant access to official company registry data across 19 jurisdictions in Europe, the Americas, and Asia-Pacific. Eighteen read-only tools let you search companies and people, look up officers and beneficial owners, map corporate networks through shared directors, screen names against the UK disqualified directors register, find every company at a registered address, and pull filing history — all from a single connector. Visit our website: https://companylens.io
Agent-native MCP server over 49M+ US public and government records, privacy-first, always current.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides AI-native access to Swiss Federal Statistical Office datasets through 9 tools for querying education, population, and cross-cantonal comparisons without authentication.15143 PyPI2MIT
- AlicenseBqualityDmaintenanceMCP server exposing all major Swiss official public APIs as native tools for any MCP-compatible AI agent.3412 npmMIT
- AlicenseAqualityAmaintenanceMCP server for Switzerland's national metadata catalogue, enabling AI agents to discover datasets, APIs, public services, and publishers through free-text search and structured queries.1341 PyPIMIT
- AlicenseAqualityFmaintenanceMCP server that connects AI models to Swiss federal geodata, offering tools for spatial queries like layer discovery, coordinate identification, building zones, and terrain heights.915 PyPIMIT