Skip to main content
Glama
cturkieh

France Data MCP

by cturkieh

data_freshness

Read-only

Check whether ingested datasets are current by returning their last change date and data age in days, using per-source thresholds to flag stale information.

Instructions

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.

  1. Changed5 schema fields changedv0.30.0
    • 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. Addedv0.20.0
  3. Removedv0.12.2
  4. Changed1 schema field changedv0.10.4
    • addedInput schema / additionalProperties
      Added value: +false
  5. Addedv0.10.3
  6. Removedv0.10.0
  7. Addedv0.9.3
  8. Removedv0.9.2
  9. First observedv0.7.6

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses server-side caching behavior, approximate query cost, and read-only nature, which goes beyond the annotations. There is no contradiction with readOnlyHint or destructiveHint.

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?

The description is well-structured, front-loaded with the main purpose, and every sentence carries useful information. The caveats and alert rules are concise despite the domain complexity.

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?

The description is complete for a no-input tool: it explains key output fields, defines the alert threshold, notes null behavior, excludes live sources, and mentions cache/cost. An agent has enough context to use 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?

The tool has zero parameters and the input schema is empty, so parameter-level detail is not needed. The baseline of 4 applies because there are no parameters to describe.

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 clearly states that the tool returns the freshness of ingested data dumps, names the exact sources covered, and explicitly distinguishes which live sources are not included. It leaves no doubt about the tool's purpose.

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?

The description provides explicit when-to-use guidance, including a typical scenario, the correct field to judge on, an alert rule, and a warning against relying on staleness_days alone. It also clarifies that live sources are not covered, preventing misuse.

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