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), permis de construire Sit@del / SDES (mensuel, cron le 10). 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.

  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.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, openWorldHint=true), the description explains the semantic difference between data_age_days and staleness_days, including the concrete 2026 FINESS failure mode where staleness remained low despite a 4-month data gap. It also discloses null semantics, cache behavior, and cost, all of which help the agent interpret results safely.

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?

The description is dense and well-structured: purpose, field glossary, typical usage, alert rule, exclusions, and operational notes are clearly separated. Every sentence adds value, including the emphasized 'C'EST LE CHAMP À LIRE'. It is longer than minimal, but the complexity of the field semantics justifies the length.

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 no-parameter, read-only tool with an output schema, the description supplies all necessary context: when to call, how to interpret fields, alert thresholds, what sources are excluded, and operational behavior (cache, cost). Nothing an agent needs to invoke it correctly is missing.

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 there is no schema detail to compensate for; the baseline for 0 params is 4. The description adds no parameter-level meaning, but none is required since the input surface is empty.

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 clear verb-resource statement: 'Retourne la fraîcheur des dumps de données ingérés côté serveur' and enumerates the exact data sources and cadences. It also distinguishes itself by explicitly listing which kinds of sources are NOT included (LIVE APIs), preventing confusion with the many sibling lookup tools.

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 provides an explicit 'Usage typique' instruction: call this before a territorial audit or temporal analysis to check data freshness. It also gives precise alert logic (data_age_days > expected_max_age_days), warns not to rely on staleness_days alone, and explicitly notes that LIVE sources have no ingestion cycle and are not covered here.

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.