Skip to main content
Glama

Analyze Building Stock (BDNB)

analyze_building_stock
Read-only

Get aggregate building stock characteristics for a location from the BDNB national database.

Counts ALL buildings (not just those with DVF transactions). Returns totals by construction decade, usage type, total housing units, and percentage of pre-1975 buildings (renovation indicator). par_usage (BDNB usage_principal): residentiel (= residentiel_collectif + residentiel_individuel), tertiaire, dependance, secondaire, non_renseigne; mixte and autre are kept for compatibility.

REQUIRED: at least one location — code_commune_insee, commune, or code_departement

  • code_commune_insee: 5-digit INSEE code (most precise, no ambiguity between same-name communes)

  • commune: city name (uppercase, e.g. "LYON")

  • code_departement: department code (e.g. "69")

Example output: { nb_batiments: 12500, annee_construction_median: 1968, pct_vieux: 42, par_tranche: { avant_1919: 800, "1946_1970": 4200, ... }, par_usage: { residentiel: 4440, residentiel_collectif: 2740, residentiel_individuel: 1700, tertiaire: 623, dependance: 38, secondaire: 11, non_renseigne: 986, mixte: 0, autre: 0 } }

Cost: 5 credits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
communeNoCommune name (e.g., 'LYON')
code_postalNoPostal code (e.g., '75015')
code_departementNoDepartment code (e.g., '69')
code_commune_inseeNoINSEE commune code (5 digits, e.g., '69123')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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=false, so the safety profile is covered. The description adds genuinely useful context beyond that: the credit cost, the 'all buildings' counting rule, and the par_usage bucket semantics (residentiel = collectif + individuel).

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 constraints, then parameter guidance, then a concrete output sample. Dense but every block earns its place; the enum enumeration for par_usage is slightly verbose but relevant to interpreting results.

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 compensates by supplying a worked example output covering top-level keys and nested par_tranche/par_usage maps, plus the required-input rule and cost. An agent has enough to call and interpret the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: it states the 'at least one of' requirement and calls out code_commune_insee as most precise to avoid same-name ambiguity. Minor gap: code_postal appears in the schema but is omitted from the location list in the description.

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 ('Get aggregate building stock characteristics') plus a scoped resource and names its data source (BDNB national database). The 'aggregate' framing and 'Counts ALL buildings (not just those with DVF transactions)' distinguishes it from row-level siblings like get_building_characteristics.

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?

Clearly states the precondition ('at least one location') and ranks the location parameters by precision, and carves out its scope versus DVF-based tools. It does not explicitly name a sibling alternative the way a 5 would, so it stops at clear context without exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources