sih-br-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SIH_DATA_DIR | No | Directory containing pre-built cubes, instead of the cache. | |
| SIH_CACHE_DIR | No | Cache directory for downloaded cubes and tables. | |
| SIH_CUBES_CACHE | No | Set to 'off' to disable caching of cubes (for tests). | |
| SIH_CUBES_BASE_URL | No | Base URL for the cube data channel. | |
| SIH_FRESHNESS_CHECK | No | Set to 'off' to disable freshness checks. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Brazilian hospital admissions from DATASUS SIH/SUS (AIH records, 1992-2025), read from pre-aggregated public cubes of the healthbr-data Parquet mirror, never from the FTP or TabNet: causes by ICD-10 chapter and group (ICD-9 before 1998), monthly series, ambulatory care sensitive conditions (ICSAP, the Brazilian list) and crude, age-specific or age-standardized rates per 100,000 by state and municipality. Every stratum carries admissions, length of stay, amount paid by SUS and deaths; every response carries a provenance block with the data vintage and the citation. Years and months are those of the ADMISSION date (DT_INTER), read from the billing months of that year plus the following ones — not the billing month; the most recent year is incomplete until its window closes and grows as hospitals bill late, and DATASUS re-edits files of past billing months, so every number is the version of the mirror's download (the provenance extraction date), not a final count. Typical flow: get_available_years first (which years each cube covers), then get_hospitalizations for counts by cause, place, age, sex and race, get_hospitalization_trends for monthly or annual series, get_hospitalization_rates and compare_regions for rates; get_icsap, get_icsap_indicators, rank_csap_groups and compare_icsap_trends for ICSAP; list_cid_chapters, list_csap_groups and classify_as_csap resolve codes and groups before querying. Do not use this server for individual AIH records, for variables the cubes do not carry (procedure performed, facility CNES, secondary diagnosis) or for other DATASUS systems (SIM, SINASC, SIA, SINAN): use microdatasus, PySUS or the healthbr-data mirror for those.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_csap_groupsA | Lista os 19 grupos de Condições Sensíveis à Atenção Primária (CSAP) conforme Portaria MS/SAS 221/2008. Retorna código, nome e códigos CID-10 de cada grupo. |
| list_cid_chaptersA | Lista os 22 capítulos da CID-10 com seus códigos e faixas de diagnóstico. Os cubos de 1992–1997 (diagnóstico em CID-9) trazem |
| get_available_yearsA | Retorna os anos disponíveis nos dados do SIH-SUS carregados e o frescor dos cubos em relação ao espelho healthbr-data ( |
| get_hospitalizationsA | Consulta dados de internações hospitalares do SUS com filtros flexíveis. Permite agregar por múltiplas dimensões (UF, CID, sexo, idade, raça, ano/mês). Raça/cor só existe de 2008 em diante: em 1998–2007 |
| get_hospitalization_trendsA | Retorna séries temporais de internações (mensal ou anual). Útil para análise de tendências e sazonalidade. O ano e o mês são os da INTERNAÇÃO (DT_INTER), não a competência de faturamento; o ano mais recente cresce até a janela dele fechar (AIH faturada com atraso), e o DATASUS reedita arquivos de competências passadas — cada número é a versão do download do espelho. Série desde 1992; em 1992–1997 |
| compare_regionsA | Compara internações entre UFs ou regiões do Brasil. Gera rankings e identifica variações regionais. Em 1992–1997 |
| get_icsapA | Consulta internações por Condições Sensíveis à Atenção Primária (ICSAP). Permite filtros por grupo CSAP, UF, município, sexo, idade e raça. Raça/cor só existe de 2008 em diante: em 1998–2007 |
| get_icsap_indicatorsA | Calcula indicadores de ICSAP: percentual (ICSAP/Total×100). Métricas-chave para avaliar a Atenção Primária. Agrupar por raça só faz sentido de 2008 em diante: em 1998–2007 |
| rank_csap_groupsA | Gera ranking dos 19 grupos CSAP por número de internações, dias de internação ou valor. Identifica principais causas evitáveis. Em 1992–1997 a ICSAP vem de lista CID-9 DERIVADA e não oficial (g03 e g05 não comparáveis com 1998+) e |
| classify_as_csapA | Classifica um ou mais códigos CID-10 como CSAP ou não. Retorna o grupo CSAP correspondente se aplicável. Aceita as duas notações do mesmo código — |
| get_hospitalization_ratesA | Calcula taxas de internação por população. A taxa sai em |
| compare_icsap_trendsA | Análise temporal comparativa de ICSAP entre UFs ou grupos CSAP. Calcula tendências, variação anual e identifica melhores/piores desempenhos. Para |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 12 tools
The CSAP-vs-general split is mostly clear (get_icsap vs get_hospitalizations, get_icsap_indicators vs get_hospitalization_rates), but the analysis family overlaps heavily: compare_icsap_trends, compare_regions and get_hospitalization_trends all produce cross-UF/time comparisons, and rank_csap_groups largely duplicates a grouped get_icsap call. Descriptions are unusually detailed and do help, but an agent must read them carefully to pick the right comparison tool.
All 12 tools follow a consistent snake_case verb_noun pattern (get_, list_, compare_, rank_, classify_) with no case or style mixing. Names are predictable and readable, with the only variation being domain terminology (csap/icsap/hospitalization) rather than naming convention.
12 tools sits comfortably in the well-scoped range, covering query, aggregation, trends, rates, indicators, ranking, comparison, classification and metadata without obvious redundancy padding. Each tool corresponds to a recognizable analytical need for this dataset.
The surface covers the full analytical lifecycle for SIH-SUS/CSAP data: raw queries, aggregation, rates, indicators, trends, rankings, comparisons, CSAP classification and year/chapter/group metadata. Minor gaps remain — no geography lookup (UF/municipality codes and names) and no general CID-10 code description lookup beyond chapters, which agents will need for filter construction.