Skip to main content
Glama

dpe_rank_territories

Read-onlyIdempotent

Rank French departments, regions, or communes by share of F-G or A-B dwellings or mean primary energy, with filters for region, climate, building type, and DPE dates.

Instructions

Rank départements, régions or communes by share of F-G dwellings, share of A-B, or mean primary energy. Use for "which departments have the most passoires thermiques?". region may narrow a department ranking; group_by=region takes no geography.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "group_by": "<group_by>",
      "metric": "<metric>"
    },
    "name": "dpe_rank_territories"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRows to return, 1-20.
orderNo'desc' (highest first, default) or 'asc'.desc
metricYes'share_fg' (% of F-G labels), 'share_ab' (% of A-B) or 'mean_primary_energy' (kWh/m²/year).
regionNoINSEE region code, e.g. '11' Île-de-France, '84' Auvergne-Rhône-Alpes, '93' PACA.
group_byYes'department', 'region' or 'commune'. commune requires `department` and ranks the 200 communes with the most DPE.
departmentNoINSEE department code: '01'-'95', '2A', '2B', '971'-'976'.
dpe_date_toNoOnly DPE established on/before this date (YYYY-MM-DD).
climate_zoneNoClimate zone, one of: H1a, H1b, H1c, H2a, H2b, H2c, H2d, H3.
building_typeNoOne of: appartement, maison, immeuble.
dpe_date_fromNoOnly DPE established on/after this date (YYYY-MM-DD). Dataset starts 2021-07-01.
min_dwellingsNoIgnore groups with fewer DPE than this (default 100, minimum 10).
construction_periodNoConstruction period, one of: avant 1948; 1948-1974; 1975-1977; 1978-1982; 1983-1988; 1989-2000; 2001-2005; 2006-2012; 2013-2021; après 2021.
construction_year_maxNoLatest construction year (1700-2030).
construction_year_minNoEarliest construction year (1700-2030).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the safety profile is covered. The description adds the non-obvious scoping rule that region is ignored when grouping by region and only narrows department rankings, which is behavioral context not fully implied by 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the verb/resource/metrics and followed by the usage example and the geography caveat. Slightly telegraphic ('group_by=region takes no geography') but no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 14 parameters, an output schema, and 100% schema coverage, the description only needs to convey purpose, selection guidance, and cross-parameter quirks — all present. Nothing an agent needs to invoke it correctly is missing, though extra guidance on combining with sibling analysis tools would help.

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 description coverage is 100%, so the baseline is 3; the description earns above that by explaining how region interacts with group_by (a relationship the per-parameter descriptions state only partially). It does not add meaning for the date, construction, or climate filters, which the schema already handles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (rank) plus the exact resources (départements, régions, communes) and enumerates the three metrics it can rank on. An agent can tell this is a ranking tool rather than a distribution/stats/trend tool, though no sibling is named for contrast.

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?

Gives a concrete natural-language query it answers ('which departments have the most passoires thermiques?') plus two interaction rules: region narrows a department ranking, and group_by=region ignores geography. It stops short of stating when to prefer dpe_energy_stats or dpe_label_distribution instead.

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