Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_get_pathology_prevalence

Retrieve prevalence rates and patient counts for pathologies in La Réunion, filtered by disease keyword, age, sex, and year. Sorted descending by patient count.

Instructions

Patient counts and prevalence rates by pathology, sex and age group in La Réunion, from the CNAM Cartographie des pathologies (built on Sniiram-DCIR claims data). Pathologies are organized in a 3-level taxonomy (e.g. Cardio-vasculaire > Maladies coronaires > Syndrome coronarien aigu). Returns: year, pathology levels 1/2/3, age class, sex, patient count (ntop), reference population (npop), prevalence rate. Sorted by patient count descending.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathologyNoSubstring search across pathology levels 1/2/3 labels (in French). Examples: "diabète", "cancer", "cardiovasculaire", "psychiatrique", "Maladies du foie"
age_labelNoAge-group label as published by CNAM. Examples: "Tous âges", "0-19 ans", "20-39 ans", "40-59 ans", "60-74 ans", "75 ans et +"
sex_labelNoSex label (lowercase): "hommes", "femmes", or "tous sexes"
yearNoYear to filter on, 4 digits e.g. "2021". Data typically available 2015-2022
limitNoMax rows to return (1-500, default 50)

Implementation Reference

  • Handler function that queries the CNAM pathology prevalence dataset (DATASET_PATHOLOGIES) via the OpenDataSoft API with optional filters (pathology substring, age, sex, year, limit), maps response fields to English-named output, and returns JSON result.
    server.tool(
      'reunion_get_pathology_prevalence',
      'Patient counts and prevalence rates by pathology, sex and age group in La Réunion, from the CNAM Cartographie des pathologies (built on Sniiram-DCIR claims data). Pathologies are organized in a 3-level taxonomy (e.g. Cardio-vasculaire > Maladies coronaires > Syndrome coronarien aigu). Returns: year, pathology levels 1/2/3, age class, sex, patient count (ntop), reference population (npop), prevalence rate. Sorted by patient count descending.',
      {
        pathology: z.string().optional().describe('Substring search across pathology levels 1/2/3 labels (in French). Examples: "diabète", "cancer", "cardiovasculaire", "psychiatrique", "Maladies du foie"'),
        age_label: z.string().optional().describe('Age-group label as published by CNAM. Examples: "Tous âges", "0-19 ans", "20-39 ans", "40-59 ans", "60-74 ans", "75 ans et +"'),
        sex_label: z.string().optional().describe('Sex label (lowercase): "hommes", "femmes", or "tous sexes"'),
        year: z.string().optional().describe('Year to filter on, 4 digits e.g. "2021". Data typically available 2015-2022'),
        limit: z.number().int().min(1).max(500).default(50).describe('Max rows to return (1-500, default 50)'),
      },
      async ({ pathology, age_label, sex_label, year, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_PATHOLOGIES, {
            where: buildWhere([
              pathology
                ? `(patho_niv1 LIKE ${quote(`%${pathology}%`)} OR patho_niv2 LIKE ${quote(`%${pathology}%`)} OR patho_niv3 LIKE ${quote(`%${pathology}%`)})`
                : undefined,
              age_label ? `libelle_classe_age = ${quote(age_label)}` : undefined,
              sex_label ? `libelle_sexe = ${quote(sex_label)}` : undefined,
              year ? `annee = date${quote(`${year}-01-01`)}` : undefined,
            ]),
            order_by: 'ntop DESC',
            limit,
          });
          return jsonResult({
            total_rows: data.total_count,
            rows: data.results.map((row) => ({
              year: pickString(row, ['annee']),
              pathology_l1: pickString(row, ['patho_niv1']),
              pathology_l2: pickString(row, ['patho_niv2']),
              pathology_l3: pickString(row, ['patho_niv3']),
              age: pickString(row, ['libelle_classe_age']),
              sex: pickString(row, ['libelle_sexe']),
              patient_count: pickNumber(row, ['ntop']),
              population: pickNumber(row, ['npop']),
              prevalence: pickNumber(row, ['prev']),
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to fetch pathology prevalence');
        }
      }
    );
  • Zod schema defining the tool's input parameters: pathology (optional string), age_label (optional string), sex_label (optional string), year (optional string), limit (number, default 50, min 1 max 500).
    {
      pathology: z.string().optional().describe('Substring search across pathology levels 1/2/3 labels (in French). Examples: "diabète", "cancer", "cardiovasculaire", "psychiatrique", "Maladies du foie"'),
      age_label: z.string().optional().describe('Age-group label as published by CNAM. Examples: "Tous âges", "0-19 ans", "20-39 ans", "40-59 ans", "60-74 ans", "75 ans et +"'),
      sex_label: z.string().optional().describe('Sex label (lowercase): "hommes", "femmes", or "tous sexes"'),
      year: z.string().optional().describe('Year to filter on, 4 digits e.g. "2021". Data typically available 2015-2022'),
      limit: z.number().int().min(1).max(500).default(50).describe('Max rows to return (1-500, default 50)'),
    },
  • Tool registered with the MCP server via server.tool() in the registerHealthTools function, called from src/modules/index.ts registerAllTools -> registerHealthTools(server).
    server.tool(
      'reunion_get_pathology_prevalence',
      'Patient counts and prevalence rates by pathology, sex and age group in La Réunion, from the CNAM Cartographie des pathologies (built on Sniiram-DCIR claims data). Pathologies are organized in a 3-level taxonomy (e.g. Cardio-vasculaire > Maladies coronaires > Syndrome coronarien aigu). Returns: year, pathology levels 1/2/3, age class, sex, patient count (ntop), reference population (npop), prevalence rate. Sorted by patient count descending.',
      {
        pathology: z.string().optional().describe('Substring search across pathology levels 1/2/3 labels (in French). Examples: "diabète", "cancer", "cardiovasculaire", "psychiatrique", "Maladies du foie"'),
        age_label: z.string().optional().describe('Age-group label as published by CNAM. Examples: "Tous âges", "0-19 ans", "20-39 ans", "40-59 ans", "60-74 ans", "75 ans et +"'),
        sex_label: z.string().optional().describe('Sex label (lowercase): "hommes", "femmes", or "tous sexes"'),
        year: z.string().optional().describe('Year to filter on, 4 digits e.g. "2021". Data typically available 2015-2022'),
        limit: z.number().int().min(1).max(500).default(50).describe('Max rows to return (1-500, default 50)'),
      },
      async ({ pathology, age_label, sex_label, year, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_PATHOLOGIES, {
            where: buildWhere([
              pathology
                ? `(patho_niv1 LIKE ${quote(`%${pathology}%`)} OR patho_niv2 LIKE ${quote(`%${pathology}%`)} OR patho_niv3 LIKE ${quote(`%${pathology}%`)})`
                : undefined,
              age_label ? `libelle_classe_age = ${quote(age_label)}` : undefined,
              sex_label ? `libelle_sexe = ${quote(sex_label)}` : undefined,
              year ? `annee = date${quote(`${year}-01-01`)}` : undefined,
            ]),
            order_by: 'ntop DESC',
            limit,
          });
          return jsonResult({
            total_rows: data.total_count,
            rows: data.results.map((row) => ({
              year: pickString(row, ['annee']),
              pathology_l1: pickString(row, ['patho_niv1']),
              pathology_l2: pickString(row, ['patho_niv2']),
              pathology_l3: pickString(row, ['patho_niv3']),
              age: pickString(row, ['libelle_classe_age']),
              sex: pickString(row, ['libelle_sexe']),
              patient_count: pickNumber(row, ['ntop']),
              population: pickNumber(row, ['npop']),
              prevalence: pickNumber(row, ['prev']),
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to fetch pathology prevalence');
        }
      }
    );
  • Dataset ID constant for the pathology prevalence data source on data.regionreunion.com.
    const DATASET_PATHOLOGIES = 'effectif-de-patients-par-pathologie-sexe-classe-d-age-a-la-reunion';
    const DATASET_FINESS = 'etablissements-du-domaine-sanitaire-et-social-a-la-reunion';
Behavior4/5

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

With no annotations provided, the description bears full burden. It explains the return fields, sorting order (by patient count descending), and data taxonomy. However, it does not disclose whether the tool is read-only, any authentication needs, or rate limits. Still, it provides substantial behavioral context.

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 (3 sentences) and front-loaded: first sentence states purpose, second explains taxonomy, third lists return fields. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description reasonably covers all return fields and ordering. It lacks details on pagination (though limit param exists) and error handling, but for a data retrieval tool this is mostly complete.

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

Parameters3/5

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

Input schema has 100% description coverage with examples and constraints. The description adds no new meaning beyond the schema's parameter descriptions, so baseline score of 3 applies.

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?

Description clearly states it returns patient counts and prevalence rates by pathology, sex, and age group, specifying data source (CNAM Cartographie des pathologies) and a 3-level taxonomy. This distinguishes it from sibling tools which focus on other domains like commune profiles, air quality, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides examples for parameter values (e.g., "diabète", "Tous âges") but does not explicitly state when to use this tool over alternatives like reunion_inspect_dataset or reunion_query_dataset. Usage context is implied but not clarified with when-not or comparisons.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hug0x0/mcp-reunion'

If you have feedback or need assistance with the MCP directory API, please join our Discord server