Skip to main content
Glama

Analyze Market Statistics

analyze_market_statistics
Read-only

Market statistics: average/median price, price per m², surface. MCP Apps hosts render a chart of the price per m², sale price and surface ranges.

REQUIRED: one location filter: code_postal, commune (uppercase; Paris by arrondissement: "PARIS 01"–"PARIS 20"), code_departement, or latitude + longitude (radius). Example: {commune: "PARIS 11", type_local: "Appartement"}. A T3: add pieces_min: 3, pieces_max: 3 (rooms gives the scope).

Returns count, price (min/max/avg/median), surface, price_per_m2. Figures drop the scope's lowest and highest 1% €/m² (outliers_excluded, 20+ sales); count is every matching sale. Caps, back from data_as_of: radius_m > 1000 is restricted to the latest 12 months (so is any radius); code_departement alone or commune without type_local → 1 year; else 2 years. Read window.applied when dates are capped or defaulted; a cap starting after date_fin returns window_unavailable (not charged).

Cost: 5 credits per call

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": "analyze_market_statistics"
  }
}

Input Schema

NameRequiredDescriptionDefault
communeNoUPPERCASE as stored, e.g. "PARIS 11" (Paris, Lyon, Marseille by arrondissement). Unsure? Call resolve_location first.
date_finNoEnd date (YYYY-MM-DD)
latitudeNoLatitude for radius search (requires longitude)
radius_mNoRadius in meters (default: 500, max: 50000)
longitudeNoLongitude for radius search (requires latitude)
date_debutNoStart date (YYYY-MM-DD)
pieces_maxNoMax pièces
pieces_minNoMin pièces (rooms, not bedrooms)
type_localNoProperty type
code_postalNoPostal code (e.g., '75001')
exclude_vefaNoExclude VEFA new-build (off-plan) sales (default: true)
include_terrainNoInclude terrain-only transactions in search results (default: false)
code_departementNoDepartment code (e.g., '73' for Savoie, '83' for Var)
use_original_typeNoUse the raw DVF type_local, not the corrected computed_type_local (default: false)
exclude_bulk_salesNoExclude bulk and aggregated sales (default: true)
include_pouvoir_achatNoAdd a price-to-income ratio field (INSEE Filosofi × DVF). Ignored on radius searches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / radius_m / description
      Previous value: -"Radius in meters (default: 500)"New value: +"Radius in meters (default: 500, max: 50000)"
    • addedInput schema / properties / radius_m / maximum
      Added value: +50000
  2. Changed3 schema fields changed
    • changedInput schema / properties / exclude_bulk_sales / description
      Previous value: -"Exclude bulk sales and aggregated transactions (default: true for clean market data)"New value: +"Exclude bulk and aggregated sales (default: true)"
    • changedInput schema / properties / exclude_vefa / description
      Previous value: -"Exclude VEFA (new-build, vente en l'état futur d'achèvement) sales (default: true — keeps 'ancien' results from double-counting new-build activity)"New value: +"Exclude VEFA new-build (off-plan) sales (default: true)"
    • changedInput schema / properties / use_original_type / description
      Previous value: -"Use original type_local instead of smart computed_type_local (default: false)"New value: +"Use the raw DVF type_local, not the corrected computed_type_local (default: false)"
  3. Changed4 schema fields changed
    • changedInput schema / properties / commune / description
      Previous value: -"UPPERCASE as stored, e.g. \"LYON\", \"PARIS 11\" (Paris, Lyon and Marseille are stored by arrondissement). A name shared by several departments (SAINT-DENIS) needs code_postal or code_departement too. Unsure? Call resolve_location first."New value: +"UPPERCASE as stored, e.g. \"PARIS 11\" (Paris, Lyon, Marseille by arrondissement). Unsure? Call resolve_location first."
    • addedInput schema / properties / pieces_max
      Added value: +{
      +  "description": "Max pièces",
      +  "maximum": 20,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / pieces_min
      Added value: +{
      +  "description": "Min pièces (rooms, not bedrooms)",
      +  "maximum": 20,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / radius_m / description
      Previous value: -"Radius in meters for location search (default: 500). A radius above 1000 m is restricted to the latest 12 months of data."New value: +"Radius in meters (default: 500)"
  4. Changed1 schema field changed
    • changedInput schema / properties / commune / description
      Previous value: -"UPPERCASE as stored, e.g. \"LYON\", \"PARIS 11\" (Paris, Lyon and Marseille are stored by arrondissement). Unsure? Call resolve_location first."New value: +"UPPERCASE as stored, e.g. \"LYON\", \"PARIS 11\" (Paris, Lyon and Marseille are stored by arrondissement). A name shared by several departments (SAINT-DENIS) needs code_postal or code_departement too. Unsure? Call resolve_location first."
  5. Changed4 schema fields changed
    • changedInput schema / properties / commune / description
      Previous value: -"City/commune name (e.g., 'Paris', 'Lyon')"New value: +"UPPERCASE as stored, e.g. \"LYON\", \"PARIS 11\" (Paris, Lyon and Marseille are stored by arrondissement). Unsure? Call resolve_location first."
    • addedInput schema / properties / date_debut / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • addedInput schema / properties / date_fin / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • changedInput schema / properties / radius_m / description
      Previous value: -"Radius in meters for location search (default: 500)"New value: +"Radius in meters for location search (default: 500). A radius above 1000 m is restricted to the latest 12 months of data."
  6. Changed1 schema field changed
    • removedInput schema / properties / exclude_outliers
      Removed value: -{
      -  "default": true,
      -  "description": "Exclude price outliers (default: true for clean market data)",
      -  "type": "boolean"
      -}
  7. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare a safe read operation, and the description adds substantial behavior on top: outlier trimming of the top/bottom 1% €/m² with the 20+ sale threshold, the distinction between trimmed figures and the untrimmed count, backdating caps tied to radius and filter combination, and the window_unavailable outcome that is explicitly not charged. The 5-credit cost is also disclosed, which annotations cannot convey.

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 outputs and the required-filter constraint, and every line carries information (examples, caps, cost). Some phrasing is compressed to the point of opacity — 'Caps, back from data_as_of' and 'so is any radius' require re-reading — which costs a point on structure despite the high information density.

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 16-parameter, no-output-schema tool this covers everything an agent needs: which filter is mandatory, how each location mode is expressed, what is returned (substituting for the missing output schema), how date windows are silently capped and how to detect that via window.applied, and the credit cost. The MCP Apps chart rendering note also sets expectations about host behavior.

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 the baseline would be 3, but the description genuinely adds semantics the schema does not: the uppercase/arrondissement format rule for commune, the pieces_min=pieces_max pattern for targeting a T3, and the interaction where code_departement alone or commune without type_local shortens the effective window. Radius and date parameter implications are also spelled out, though the boolean flags (exclude_vefa, use_original_type, include_pouvoir_achat) are left entirely to the schema.

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?

The opening line specifies the resource and the exact statistics produced (average/median price, price per m², surface), and the return-value sentence enumerates count, price min/max/avg/median, surface and price_per_m2. It is clear what the tool computes, though it never names a sibling (e.g. analyze_price_trends or compare_locations) to distinguish it from adjacent analytical tools.

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?

Strong operational guidance: states 'REQUIRED: one location filter', lists the four acceptable location modes, gives a concrete invocation example, shows how to express a T3 via pieces_min/pieces_max, and explains the date capping rules with 'Read window.applied'. It lacks explicit when-to-use-vs-alternative routing (no mention of when to prefer compare_locations or analyze_price_trends), so it stops short of a 5.

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