Skip to main content
Glama

data_freshness

Read-only

Retourne la fraîcheur des dumps de données ingérés côté serveur : FINESS / ANS (flux quotidien, ingéré le 1er et le 15 du mois), Annuaire Santé Ameli (hebdomadaire), RPPS / Annuaire Santé ANS (mensuel), Centres de Santé CNAM (hebdomadaire), IRIS INSEE (annuel). Pour chaque source : last_data_change_at + data_age_days (dernier run ayant RÉELLEMENT changé la donnée servie, et son âge en jours — C'EST LE CHAMP À LIRE), last_success_at + staleness_days (dernier run réussi, y compris un run court-circuité « fichier amont identique » — ne mesure PAS l'âge de la donnée), last_success_row_count, last_attempt_at, last_attempt_status, cadence_hint (cadence attendue).

Usage typique : avant un audit territorial ou une analyse temporelle, le caller appelle ce tool pour savoir si les données sont à jour. Juger sur data_age_days, JAMAIS sur staleness_days seul : en 2026 la source FINESS s'est tarie 4 mois pendant que staleness_days restait à quelques jours (runs « fichier identique » comptés comme succès). Règle d'alerte : data_age_days > expected_max_age_days (seuil par source, exposé dans chaque ligne — ne pas le recopier) ; data_age_days: null = jamais ingéré.

Les sources LIVE (DINUM Recherche Entreprises, INSEE SIRENE V3.11, ANS FHIR live) ne sont PAS listées ici puisqu'elles n'ont pas de cycle d'ingestion — leur fraîcheur est celle des API amont (live, ~secondes).

Cache serveur : 5 minutes. Coût : 1 SELECT sur ingest_log au pire (sinon hit cache).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourcesYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / sources / items / properties / data_age_days
      Added value: +{
      +  "description": "Âge de la donnée servie, en jours, depuis last_data_change_at. C'est CE champ qui dit si la donnée est périmée (post-mortem FINESS 2026-09 : staleness_days=4 pour une donnée de 113 jours).",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sources / items / properties / expected_max_age_days
      Added value: +{
      +  "description": "Âge maximal attendu de la donnée pour cette source, en jours. Règle d'alerte : data_age_days > expected_max_age_days.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / sources / items / properties / last_data_change_at
      Added value: +{
      +  "description": "ISO timestamp du dernier run ayant RÉELLEMENT changé la donnée servie (success/partial sans court-circuit). null si aucune ingestion réelle n'a jamais abouti.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / sources / items / properties / last_success_at / description
      Previous value: -"ISO timestamp dernière ingestion OK. null si aucun succès enregistré (1er déploiement)."New value: +"ISO timestamp du dernier run dont le swap a réussi — statut `success` OU `partial` (swap OK, couche secondaire matview/canary en échec : la donnée est servie). null si aucun succès enregistré (1er déploiement)."
    • changedOutput schema / properties / sources / items / properties / staleness_days / description
      Previous value: -"null si la source n'a jamais été synchronisée (signal alarmant à propager au caller)."New value: +"Jours depuis le dernier run réussi — y compris un run court-circuité « fichier amont identique ». NE mesure PAS l'âge de la donnée : utiliser data_age_days. null si la source n'a jamais été synchronisée (signal alarmant à propager au caller)."
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations mark the tool read-only and non-destructive, and the description goes much further: it clarifies the semantic difference between `data_age_days` and `staleness_days`, the meaning of `null`, the 5-minute server cache, and the worst-case SQL cost of 1 SELECT. 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.

Conciseness5/5

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

Although long, the description is dense and well-structured: purpose first, then source cadences, field definitions, a concrete alert rule, a historical caveat, exclusions, and cache/cost. Every sentence carries operational value and none is redundant.

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 zero-parameter tool, the description fully covers purpose, return-field semantics, the correct metric to judge freshness, the alert threshold rule, cavats from real incidents, excluded sources, and performance characteristics. The output schema exists and the description complements it with rich operational context.

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?

The tool has zero parameters, so the input schema is trivially fully covered and the baseline is 4. The description adds no parameter docs because none are needed, but compensates by thoroughly documenting the meaning of every returned field.

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?

The description opens with a precise verb and object: 'Retourne la fraîcheur des dumps de données ingérés côté serveur', then enumerates the exact data sources and fields returned. This clearly distinguishes the tool from all sibling data-lookup and geospatial tools by framing it as a metadata/freshness query.

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?

It explicitly states when to call the tool ('avant un audit territorial ou une analyse temporelle'), defines the alert rule, warns against misusing `staleness_days`, and explicitly lists which sources are excluded (LIVE APIs). This gives the agent both positive and negative usage guidance.

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.

TDQS

A4/5.0
Disambiguation3/5

While tools have distinct purposes, there is overlap among several similar tools (e.g., multiple professional and establishment search tools). The detailed descriptions help differentiate, but an agent may struggle to choose correctly among them.

Naming Consistency2/5

Naming mixes French and English, with no consistent pattern (e.g., 'enrichir_concurrents' vs 'inspect_site', 'etablissement_by_finess' vs 'etablissements_finess_in_radius'). This inconsistency makes the toolset harder to navigate.

Tool Count3/5

36 tools is high but justified given the broad domain. However, there are multiple tools for similar tasks (e.g., four professional search tools), suggesting some redundancy. The scope is borderline but acceptable.

Completeness4/5

The toolset covers a wide range of needs for French health data analysis: establishments, professionals, population, geocoding, demographics, and composite analyses. Few obvious gaps exist, though some specialized tasks might require additional integration.