Skip to main content
Glama

etablissement_by_finess

Read-onlyIdempotent

Récupère le détail complet d'un établissement de santé par son numéro FINESS (9 chiffres) : raison sociale, catégorie + famille, adresse complète (voie + CP + ville + code INSEE + département), coordonnées GPS, téléphone. Retourne un objet LookupResult discriminé par found. found: true → champs FINESS à plat. found: false → { found: false, key, lookupStatus: 'not_found', message } (numéro inexistant, établissement fermé, ou trop récent pour le flux). Source : FINESS / ANS (flux quotidien, ingéré le 1ᵉʳ et le 15 ; établissements EN SERVICE uniquement). Chaque résultat porte geo_precision: "adresse" dès que coords est présent (point WGS84 ANS ou point BAN de l'adresse, jamais un centroïde ; un établissement sans coords n'a pas de point connu et est invisible des recherches par rayon) et siret_ans (SIRET déclaré par l'ANS, fait brut non vérifié SIRENE — pour le verdict : reconcilier_finess_sirene / verifier_site_actif). Note : champ email toujours null (non exposé par FINESS public).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
num_finessYesNuméro FINESS exact (9 chiffres).
include_freshnessNoSi true, ajoute un champ `data_freshness` au payload (dans `query_metadata` si présent, sinon à la racine) listant, par source (FINESS, Ameli, RPPS, CDS, IRIS), la dernière ingestion réussie (`last_success_at`, `staleness_days`) ET la dernière fois que la donnée a réellement changé (`last_data_change_at`, `data_age_days` — un run court-circuité « fichier amont identique » compte comme succès mais ne rajeunit pas la donnée ; c'est `data_age_days` qui dit l'âge réel de ce qui est servi). Opt-in pour ne pas alourdir les payloads par défaut. Cache 5min côté serveur — coût négligeable.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoClé recherchée (SIREN, num_finess, code INSEE, …).
foundYes
messageNoExplication actionnable quand `found=false` (cause probable + remédiation).
lookupStatusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include_freshness / description
      Previous value: -"Si true, ajoute un champ `data_freshness` au payload (dans `query_metadata` si présent, sinon à la racine) listant la dernière ingestion réussie par source (FINESS, Ameli, RPPS, CDS) avec `staleness_days`. Opt-in pour ne pas alourdir les payloads par défaut. Cache 5min côté serveur — coût négligeable."New value: +"Si true, ajoute un champ `data_freshness` au payload (dans `query_metadata` si présent, sinon à la racine) listant, par source (FINESS, Ameli, RPPS, CDS, IRIS), la dernière ingestion réussie (`last_success_at`, `staleness_days`) ET la dernière fois que la donnée a réellement changé (`last_data_change_at`, `data_age_days` — un run court-circuité « fichier amont identique » compte comme succès mais ne rajeunit pas la donnée ; c'est `data_age_days` qui dit l'âge réel de ce qui est servi). Opt-in pour ne pas alourdir les payloads par défaut. Cache 5min côté serveur — coût négligeable."
  2. Changed1 schema field changed
    • changedInput schema / properties / include_freshness / description
      Previous value: -"Si true, ajoute un champ `data_freshness` au payload (dans `query_metadata` si présent, sinon à la racine) listant la dernière ingestion réussie par source (FINESS, Ameli, RPPS) avec `staleness_days`. Opt-in pour ne pas alourdir les payloads par défaut. Cache 5min côté serveur — coût négligeable."New value: +"Si true, ajoute un champ `data_freshness` au payload (dans `query_metadata` si présent, sinon à la racine) listant la dernière ingestion réussie par source (FINESS, Ameli, RPPS, CDS) avec `staleness_days`. Opt-in pour ne pas alourdir les payloads par défaut. Cache 5min côté serveur — coût négligeable."
  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 (read-only, idempotent), the description discloses several key behaviors: it only returns active establishments (EN SERVICE), it returns a discriminated union for found/not found, geo_precision is always 'adresse' when coords exist, siret_ans is unverified, and email is always null. This is unusually transparent for a lookup tool.

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 concise for the complexity it covers, using a logical flow: purpose, return format, source, field details, notes. Each sentence adds meaningful information without redundancy. The structure with semicolons and bullets (though not actual bullets) keeps it readable.

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?

Given the complexity of the tool, the description covers all necessary aspects: input parameters, output shape (including error case), data source and freshness, field semantics (geo_precision, siret_ans), and known limitations (email null). It even points to related tools for verification steps. The description is self-sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters in the schema have detailed descriptions. num_finess specifies the exact format (9 digits), and include_freshness explains the data_freshness field, including staleness vs data age. The description also explains how the parameters are used in the response, so the agent knows exactly what to pass.

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 the tool's action (récupère) and resource (détail complet d'un établissement de santé) and identifies the key parameter (numéro FINESS). It also lists the returned fields, making the purpose unmistakable. While it doesn't explicitly name sibling alternatives, the scope is well-defined by the exact FINESS lookup.

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?

The description gives clear context on when to use the tool: when you have an exact FINESS number and need full establishment details. It explains the return shape and edge cases (not found, email null, freshness opt-in), which helps decide if this tool is appropriate. However, it does not explicitly state alternatives for different lookup patterns (e.g., by radius or category), so it's a 4 rather than 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.