DATASUS SIH/SUS — Brazil Hospital Admissions (AIH) MCP
Server Details
DATASUS SIH/SUS hospital admissions in Brazil (AIH, 1992-2025): ICD-10 causes, ICSAP, rates.
- Status
- Healthy
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- Repository
- SidneyBissoli/sih-br-mcp
- GitHub Stars
- 0
- Server Listing
- sih-br-mcp
TDQS
Scored across 12 tools
Most tools have clearly distinct purposes: raw hospitalizations, rates, trends, ICSAP queries, indicators, rankings, and lookup tables are all separately identifiable. Some overlap exists between compare_regions and compare_icsap_trends, and get_hospitalizations can also aggregate by year/month, but the detailed descriptions minimize confusion.
All tools consistently follow a verb_noun snake_case pattern (get_, list_, compare_, classify_, rank_). The only minor deviation is get_hospitalizations vs. get_hospitalization_rates, but this is negligible and does not break the predictable pattern.
12 tools is well-scoped for a specialized health data analytics server. Each tool addresses a distinct analytical need without redundancy, spanning metadata, querying, rates, trends, ICSAP, rankings, and classification.
The tool surface covers the main workflows: data discovery, hospitalization queries, rates, trends, ICSAP indicators, comparisons, rankings, and reference lookups. Minor gaps exist, such as the lack of general hospitalization rate trends and the municipality dimension not being available in the general query, but these do not prevent core analyses.
Available Tools
12 toolsclassify_as_csapClassificar CID-10 como CSAPARead-onlyIdempotentInspect
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 — J18.1 (OMS) e J181 (SIH) — com a mesma resposta. Código que NÃO é CID-10 não é classificado: volta com is_csap: null e error próprio, nunca false (que afirmaria que a condição existe e não é sensível). Só CID-10: os códigos CID-9 de 6 dígitos do SIH de 1992–1997 são classificados no build pela lista derivada (src/data/csap-groups-cid9.json), não por esta ferramenta.
| Name | Required | Description | Default |
|---|---|---|---|
| cid_codes | Yes | Códigos CID-10 para classificar (ex: ['J18', 'A09', 'K35']) |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | Só quando houver código não classificado: quantos foram e para onde olhar |
| summary | No | |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| classifications | No | Uma entrada por código, na ordem informada |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish readOnly/idempotent behavior, and the description adds valuable semantics beyond them: it discloses that non-ICD-10 input returns is_csap:null with a proper error rather than false, and that notation variants like J18.1 and J181 produce the same result. This prevents serious misinterpretation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, front-loaded with the core classification behavior, followed by notation handling, invalid-input semantics, and scope exclusion. Every sentence carries useful information and there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema, so return shape is already covered. The description compensates for the remaining usage risks: invalid inputs, notation equivalence, and ICD-9 exclusion. Nothing needed for correct invocation appears to be missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already documents cid_codes fully with examples, so the baseline is 3. The description adds actionable extra meaning by explaining that both OMS and SIH notations are accepted, which is not evident from the schema example alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Classifica') and resource ('códigos CID-10'), and clarifies the result: 'Retorna o grupo CSAP correspondente se aplicável'. This clearly distinguishes it from sibling listing/getting tools like list_csap_groups or get_icsap.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit exclusions: non-ICD-10 codes are not classified, and 6-digit ICD-9 SIH 1992–1997 codes are handled elsewhere ('não por esta ferramenta'). However, it does not name a specific sibling tool as the alternative, so the guidance is clear but not fully complete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compare_icsap_trendsTendências comparativas de ICSAPARead-onlyIdempotentInspect
Análise temporal comparativa de ICSAP entre UFs ou grupos CSAP. Calcula tendências, variação anual e identifica melhores/piores desempenhos. Para percentage e count valem todos os anos do SIH (desde 1992); rate_per_10k exige população e aceita só os anos de get_available_years.population_years. 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 uf é a UF do arquivo — ver as notes. Percentual no universo do pacote R csapAIH por padrão (universe): fora do numerador e do denominador as internações por procedimento obstétrico, parto e longa permanência.
| Name | Required | Description | Default |
|---|---|---|---|
| end_year | Yes | Ano final | |
| universe | No | Universo do % ICSAP: 'csapaih' (padrão) tira do numerador e do denominador as internações por procedimento obstétrico, com diagnóstico de parto (O80-O84) e as AIH de longa permanência, como o pacote R csapAIH (Nedel); 'all' conta todas as internações. | |
| indicator | No | Indicador: percentage (% ICSAP), count (número), rate_per_10k (taxa) | |
| compare_by | No | Comparar por UF ou grupo CSAP | |
| start_year | Yes | Ano inicial | |
| compare_values | No | Valores específicos para comparar (UFs ou grupos CSAP) | |
| include_trend_line | No | Incluir análise de tendência linear (default: true) |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Sempre vazio: só aparece no caminho de erro-mole do funil |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| period | No | |
| series | No | Pontos em ordem cronológica |
| trends | No | Tendência por valor comparado; só com `include_trend_line` e ao menos dois anos — ausente quando desligada |
| summary | No | |
| indicator | No | Indicador das séries |
| compare_by | No | Eixo comparado: uf, csap_group ou total (sem eixo) |
| provenance | Yes | Um bloco por procedência que contribuiu com esta resposta (SIH, lista CSAP, csapAIH, população…); licenças nunca se fundem |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| population_years | No | Cobertura populacional; só no erro-mole de `rate_per_10k` fora do intervalo |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only/idempotent; description adds valuable data provenance caveats (derived CID-9 list, uf from file, universe definition) that affect result interpretation. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense with multiple sentences, front-loaded with purpose but long due to caveats. Each sentence adds value, but it could be more concise; still well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter tool with output schema, the description covers purpose, parameter nuances, data reliability, and references notes. Missing return details are covered by output schema; complete enough for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers all parameters; description adds extra constraints like rate_per_10k requiring population years and universe behavior, plus early-year data limitations, enriching parameter meaning beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a comparative temporal analysis of ICSAP across UFs or CSAP groups, including calculation of trends, annual variation, and best/worst performance. It distinguishes from siblings like get_icsap or get_hospitalization_trends by focusing on ICSAP and comparison, though it doesn't explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides data constraints (e.g., rate_per_10k requires population years, 1992-1997 data caveats) but does not explicitly guide when to choose this tool over compare_regions or get_hospitalization_trends. Usage is implied from the purpose, but no exclusions or alternatives are named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compare_regionsComparação entre UFs e regiõesARead-onlyIdempotentInspect
Compara internações entre UFs ou regiões do Brasil. Gera rankings e identifica variações regionais. Em 1992–1997 uf é a UF do arquivo (estabelecimento), não de residência — ver get_available_years.uf_basis e as notes.
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Anos para consultar | |
| limit | No | Número de resultados (default: 10) | |
| metric | No | Métrica para ranking (default: n) | |
| is_csap | No | Filtrar apenas CSAP | |
| compare_by | No | Comparar por UF ou região (default: uf) | |
| cid_chapter | No | Capítulo CID-10 específico |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Sempre vazio: só aparece no caminho de erro-mole do funil |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| metric | No | Métrica que ordena o ranking |
| ranking | No | Ranking em ordem decrescente da métrica |
| compare_by | No | Eixo da comparação (hoje ambos agrupam por UF) |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| total_locations | No | Quantas localidades no ranking |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, non-destructive behavior. The description adds a useful non-obvious caveat: in 1992–1997, the UF dimension refers to the establishment/file UF rather than residence, and it points to get_available_years.uf_basis and the notes for further detail. It does not explain ranking order or limit behavior, but the output schema reduces the need for that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with no filler: the first states the action, the second states the output value, and the third delivers an important temporal caveat. Everything is front-loaded and earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only tool with 100% schema coverage, two enums, an output schema, and annotations, the description needs little else. It provides a clear purpose, the kind of results it generates, and the key historical data caveat, making it complete enough for an agent to select and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by clarifying that the uf/compare_by semantic changes in 1992–1997, which is not evident from the enum description alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: it 'compara internações entre UFs ou regiões do Brasil' and clarifies that it produces rankings and identifies regional variations. This is enough to distinguish it from siblings like compare_icsap_trends, which focus on ICSAP trends rather than general hospitalization comparisons by geography.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied: use it when comparing hospitalizations across UFs or regions and when rankings are desired. However, it does not explicitly state when not to use it or name sibling alternatives such as get_hospitalizations or compare_icsap_trends, so some routing decisions are left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_available_yearsAnos disponíveis e frescor dos cubosARead-onlyIdempotentInspect
Retorna os anos disponíveis nos dados do SIH-SUS carregados e o frescor dos cubos em relação ao espelho healthbr-data (freshness.status: current, stale, unknown, pending ou disabled; quando stale, lista por ano as partições reeditadas pelo MS, regeneradas, retiradas ou novas na janela). Por ano, o que muda entre as eras do SIH: race_available (raça/cor só de 2008), cid_revision (9 = CID-9 de 6 dígitos em 1992–1997, 10 = CID-10; 1997 tem as duas), icsap_list_revision (cid9-derivada, não oficial, em 1992–1997), uf_basis (arquivo em 1992–1997, residencia de 1998), municipality_available, currency e records_date_imputed.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| note | No | Aviso sobre o que `years` significa |
| error | No | Falha ao listar os anos |
| years | No | Anos com cubos Parquet presentes localmente |
| currency | No | Moeda de `value` — chave é o ano (string) |
| uf_basis | No | Base do eixo `uf` — chave é o ano (string) |
| freshness | No | Frescor dos cubos locais frente ao espelho healthbr-data |
| data_range | No | Intervalo dos anos locais |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| years_cid9 | No | Anos em que o cubo usa CID-9 (1992–1997) |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| cid_revision | No | Internações por revisão da CID — chave é o ano (string) |
| csap_universe | No | Universo do % ICSAP — chave é o ano (string) |
| cubes_channel | No | Canal público dos cubos e cache local |
| race_available | No | Raça/cor disponível — chave é o ano (string) |
| icsap_available | No | ICSAP disponível — chave é o ano (string) |
| population_years | No | Cobertura dos arquivos de população por UF: o que as ferramentas de taxa aceitam |
| years_uf_arquivo | No | Anos em que `uf` é a do estabelecimento (1992–1997) |
| years_without_race | No | Anos sem raça/cor (1998–2007) |
| icsap_list_revision | No | Lista ICSAP por revisão da CID — chave é o ano (string) |
| records_date_imputed | No | Datas imputadas — chave é o ano (string) |
| municipality_available | No | Município disponível — chave é o ano (string) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds meaningful behavioral context by enumerating freshness.status values and describing what happens when status is stale, including per-year listing of revised, regenerated, removed, or new partitions. This goes well beyond the annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core result is front-loaded in the first clause, and every later detail about freshness statuses and era-dependent fields is relevant to interpreting the returned data. However, the description is a dense single paragraph with many semicolons and parentheticals; bulleted structure would improve readability without adding length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, read-only, idempotent metadata tool with an output schema, the description is complete: it covers year availability, freshness states, stale-partition behavior, and per-year era differences. No additional facts about authentication, rate limits, side effects, or parameters are necessary for an agent to select and invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so there are no parameter semantics to document; the baseline for zero-parameter tools is 4. The description correctly focuses on output semantics and does not invent or omit parameter guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States the specific resource and scope: available years in the loaded SIH-SUS data plus cube freshness relative to the healthbr-data mirror. It is clearly distinct from sibling tools like get_hospitalizations or get_icsap, which retrieve data rather than metadata. The verb 'Retorna' makes the read-only retrieval intent explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (whenever year availability or cube freshness is needed) but gives no explicit guidance about when not to use it or which sibling alternative to prefer. There are no exclusions, preconditions, or alternative routing statements, so usage guidance is only inferred from the stated purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_hospitalization_ratesTaxas de internação por populaçãoARead-onlyIdempotentInspect
Calcula taxas de internação por população (por 100.000 habitantes, configurável). Denominador lido de dois arquivos, informados em get_available_years.population_years: projeções do IBGE por idade simples de 2000 em diante (pop_uf.parquet) e, de 1991 a 1999, população por faixa etária quinquenal somada dos municípios (pop_uf_agregado.parquet) — antes de 2000 o recorte por idade só vale nos limites das faixas (age_min múltiplo de 5, age_max terminado em 4 ou 9, ou 80+). A resposta diz qual arquivo serviu a cada ano (population_source) e avisa quando mistura os dois.
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | UFs para filtrar | |
| sex | No | Filtrar por sexo | |
| year | No | Anos para calcular | |
| age_max | No | Idade máxima | |
| age_min | No | Idade mínima | |
| is_csap | No | Filtrar apenas CSAP | |
| group_by | No | Dimensões para agrupamento | |
| rate_per | No | Taxa por X habitantes (default: 100000) | |
| rate_type | No | Tipo de taxa: crude (bruta) ou specific (específica por filtro) | |
| cid_chapter | No | Capítulos CID-10 (1-22) |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Um estrato por linha (vazio quando não há internação no recorte) |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| summary | No | |
| metadata | No | |
| truncated | No | Presente só quando `data` foi truncado no teto de linhas; os totais em `summary` são do conjunto inteiro |
| provenance | Yes | Um bloco por procedência que contribuiu com esta resposta (SIH, lista CSAP, csapAIH, população…); licenças nunca se fundem |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| population_years | No | Cobertura dos arquivos de população por UF: o que as ferramentas de taxa aceitam |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description goes well beyond the readOnly/idempotent annotations by disclosing the two denominator file sources, the year-dependent age granularity constraints, and the response behavior including population_source and the warning when files are mixed. This is rich contextual behavior not derivable from the annotations or schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core purpose is front-loaded, and all details about data sources and age constraints are relevant. However, the long parenthetical about the two deno minator files and pre-2000 age limits is dense and could be more cleanly structured without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 10-parameter tool with an output schema and safety annotations, the description supplies the most important missing context: where denominators come from, how age filtering behaves differently across years, and what output signals are included. There are no significant gaps for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds extra semantic value by clarifying rate_per configurability, the exact age_min/age_max constraints for pre-2000 years, and the relationship between year and denominator source. It does not need to re-explain each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific operation: 'Calcula taxas de internação por população (por 100.000 habitantes, configurável)', which distinguishes it from count-based sibling tools like get_hospitalizations. However, it does not explicitly name sibling alternatives, leaving some differentiation to inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives clear context about when this tool applies: it computes population-based rates and relies on denominator files selected via get_available_years.population_years. It also clarifies age-filter limitations before 2000, but stops short of explicitly stating when-not-to-use or naming alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_hospitalizationsInternações do SUS com filtrosARead-onlyIdempotentInspect
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 race é nulo (ver get_available_years.race_available). Série desde 1992: em 1992–1997 o diagnóstico é CID-9 decodificado por tabela (cid_group = categoria de 3 dígitos, cid_chapter = capítulo CID-10 equivalente; agrupar por cid_revision separa 9 e 10 — 1997 tem os dois), uf é a UF do ARQUIVO (estabelecimento), não de residência, e value é nominal na moeda da época — ver get_available_years (uf_basis, currency) e as notes da resposta. exclusion (agrupável) marca as internações fora do universo do % ICSAP do csapAIH (procedimento_obstetrico, parto, longa_permanencia; nula = dentro).
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | Lista de UFs (ex: ['SP', 'RJ']). Se omitido, todas. | |
| sex | No | Filtrar por sexo | |
| race | No | Raça/cor (branca, preta, parda, amarela, indigena, ignorado). Só existe de 2008 em diante: em 1998–2007 race é nulo e o filtro não alcança esses anos. | |
| year | No | Anos para consultar (ex: [2023, 2024]); série de 1992 em diante | |
| limit | No | Limitar número de resultados | |
| month | No | Meses (1-12). Se omitido, todos. | |
| age_max | No | Idade máxima em anos | |
| age_min | No | Idade mínima em anos | |
| is_csap | No | Filtrar apenas CSAP (true) ou não-CSAP (false) | |
| group_by | No | Dimensões para agrupamento | |
| cid_chapter | No | Capítulos CID-10 (1-22). Se omitido, todos. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Linhas agrupadas (vazio no caminho de erro-mole) |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| summary | No | Totais do recorte inteiro (não do trecho devolvido, quando truncado) |
| truncated | No | Presente só quando `data` foi truncado no teto de linhas; os totais em `summary` são do conjunto inteiro |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| filters_applied | No | Os argumentos recebidos, ecoados |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
As anotações já marcam readOnly/idempotent/não-destrutivo; a descrição adiciona advertências comportamentais substanciais: raça só existe de 2008 em diante, 1992–1997 usa CID-9 com semântica de cid_group/cid_revision, uf refere-se ao local do arquivo e não à residência, value é nominal e exclusion marca o universo não-CSAP. Não há contradição com as anotações.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A descrição é densa, mas cada frase cumpre função: propósito, dimensões de agregação e depois as ressalvas históricas/dos dados. As ressalvas são compactas e essenciais, sem padding, e a frase mais importante vem no início.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Dado o alto número de parâmetros e as peculiaridades históricas, a descrição cobre as ressalvas críticas, referencia get_available_years para metadados complementares e, como existe output schema, a documentação do retorno não é necessária. O agente tem o que precisa para chamar com segurança e interpretar os resultados.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
A cobertura do schema é 100%, então a linha de base já é forte. A descrição vai além ao explicar o comportamento nulo de race, o início da série em 1992, o significado de uf e a semântica de agrupamento por exclusion/cid_revision, o que ajuda materialmente o agente a escolher parâmetros corretos.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
A descrição abre com verbo e recurso específicos: 'Consulta dados de internações hospitalares do SUS com filtros flexíveis' e lista as dimensões de agregação (UF, CID, sexo, idade, raça, ano/mês). Isso distingue claramente a ferramenta dos siblings focados em taxas e tendências, posicionando-a como a consulta flexível de dados brutos.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
A descrição fornece contexto rico sobre quando os dados são válidos e referencia get_available_years para metadados, mas não afirma explicitamente quando usar esta ferramenta em vez de get_hospitalization_rates ou get_hospitalization_trends. O uso é implícito (agregar contagens brutas), sem exclusões claras.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_hospitalization_trendsSéries temporais de internaçõesARead-onlyIdempotentInspect
Retorna séries temporais de internações (mensal ou anual). Útil para análise de tendências e sazonalidade. Série desde 1992; em 1992–1997 uf é a UF do arquivo (estabelecimento) e as internações sem data na fonte (1992-01..04 e 1993-01) entram no mês de faturamento — ver get_available_years e as notes.
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | UFs para filtrar | |
| year_end | Yes | Ano final | |
| year_start | Yes | Ano inicial | |
| cid_chapter | No | Capítulo CID-10 específico | |
| granularity | No | Granularidade temporal (default: yearly) |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Sempre vazio: só aparece no caminho de erro-mole do funil |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| period | No | Intervalo pedido |
| series | No | Um ponto por ano ou por mês, em ordem cronológica |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| granularity | No | Grão da série |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Although annotations already mark this as read-only/idempotent, the description discloses important behavioral details: series start, UF semantics for 1992-1997, and how missing source dates are bucketed. It also routes to notes and get_available_years for further caveats.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact sentences put the core behavior and purpose up front, then add only essential historical caveats. There is no filler or repetition of schema content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex time-series tool with an output schema, it covers the main pitfalls: date range ambiguity, UF attribution, missing dates, and where to find authoritative notes. The references to get_available_years and notes close the remaining gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by explaining how uf behaves in the 1992-1997 window and linking the monthly/annual choice to the granularity parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a concrete verb-resource pair ('Retorna séries temporais de internações') and names the monthly/annual variants plus intended use ('análise de tendências e sazonalidade'). It is clear, though it does not explicitly contrast with sibling tools like get_hospitalizations or compare_icsap_trends.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states a use case ('útil para análise de tendências e sazonalidade') and points to get_available_years, but gives no when-to-use/when-not-to-use guidance or exclusions. The usage context is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_icsapInternações por condições sensíveis (ICSAP)ARead-onlyIdempotentInspect
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 race é nulo (ver get_available_years.race_available). Série desde 1992: em 1992–1997 a ICSAP vem de lista CID-9 DERIVADA e não oficial (g03 e g05 não comparáveis com 1998+), uf é a UF do arquivo e municipality_code é nulo — ver get_available_years (icsap_list_revision, uf_basis) e as notes. Percentual no universo do pacote R csapAIH por padrão (universe): fora do numerador e do denominador as internações por procedimento obstétrico, parto e longa permanência.
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | UFs para filtrar | |
| sex | No | Filtrar por sexo | |
| race | No | Raça/cor (branca, preta, parda, amarela, indigena, ignorado). Só existe de 2008 em diante: em 1998–2007 race é nulo e o filtro não alcança esses anos. | |
| year | No | Anos para consultar | |
| age_max | No | Idade máxima | |
| age_min | No | Idade mínima | |
| group_by | No | Dimensões para agrupamento | |
| universe | No | Universo do % ICSAP: 'csapaih' (padrão) tira do numerador e do denominador as internações por procedimento obstétrico, com diagnóstico de parto (O80-O84) e as AIH de longa permanência, como o pacote R csapAIH (Nedel); 'all' conta todas as internações. | |
| csap_group | No | Grupos CSAP (ex: ['g01', 'g05']) | |
| municipality_code | No | Código IBGE do município (6 dígitos) |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Linhas agrupadas (vazio no caminho de erro-mole) |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| summary | No | Totais do recorte inteiro, calculados sem agrupamento |
| truncated | No | Presente só quando `data` foi truncado no teto de linhas; os totais em `summary` são do conjunto inteiro |
| provenance | Yes | Um bloco por procedência que contribuiu com esta resposta (SIH, lista CSAP, csapAIH, população…); licenças nunca se fundem |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| filters_applied | No | Os argumentos recebidos, ecoados |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses notable data behaviors: race is null in 1998–2007 and the filter won't reach those years; ICSAP for 1992–1997 is derived from a non-official CID-9 list, making g03/g05 non-comparable; uf is the file's UF and municipality_code is null in that period; and the default universe excludes obstetric, delivery, and long-stay admissions. This is rich behavioral context that annotations cannot convey.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph, but it is tightly organized: purpose first, then filters, then critical data caveats, then the universe calculation. Each sentence carries distinct information and there is no filler or repetition. It remains readable despite the complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 10-parameter tool with historical data caveats, the description covers the major lifetime issues (race availability, ICD-9 revision change, municipality/UF basis) and the calculation universe. It points to get_available_years for additional notes, and an output schema exists so return format is not needed. Still, it could be slightly more explicit about the intended use case versus sibling tools like get_icsap_indicators, but overall it is near complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
While the schema already describes all 10 parameters (100% coverage), the description adds semantic caveats for parameters: it specifies the meaning of `race` null periods, the `uf` file-basis in 1992–1997, municipality_code null, and the `universe` exclusions. These nuances go beyond the schema's terse descriptions, particularly for uf and municipality_code.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Consulta internações por Condições Sensíveis à Atenção Primária (ICSAP)', a specific verb and resource, and enumerates the available filters. However, it does not explicitly distinguish this tool from siblings like get_icsap_indicators or get_hospitalizations, so it misses the top-tier sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for querying ICSAP hospitalizations with filters, and it refers to get_available_years for data-revision caveats. It does not state explicit when-to-use vs alternatives, nor when not to use it (e.g., if the user needs indicators or trends). The guidance is mostly implicit through the tool's name and filter list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_icsap_indicatorsIndicadores de ICSAPARead-onlyIdempotentInspect
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 race é nulo (ver get_available_years.race_available). 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 uf é a UF do arquivo — ver as notes. Percentual no universo do pacote R csapAIH por padrão (universe): fora do numerador e do denominador as internações por procedimento obstétrico, parto e longa permanência.
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | UFs para calcular | |
| sex | No | Filtrar por sexo | |
| year | No | Anos para calcular | |
| age_max | No | Idade máxima | |
| age_min | No | Idade mínima | |
| group_by | No | Dimensões para agrupamento | |
| universe | No | Universo do % ICSAP: 'csapaih' (padrão) tira do numerador e do denominador as internações por procedimento obstétrico, com diagnóstico de parto (O80-O84) e as AIH de longa permanência, como o pacote R csapAIH (Nedel); 'all' conta todas as internações. | |
| municipality_code | No | Código IBGE do município |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Um estrato por linha (vazio no caminho de erro-mole) |
| note | No | Fórmula do indicador — ou, no caminho de erro-mole, como obter o dado |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| truncated | No | Presente só quando `data` foi truncado no teto de linhas; os totais em `summary` são do conjunto inteiro |
| provenance | Yes | Um bloco por procedência que contribuiu com esta resposta (SIH, lista CSAP, csapAIH, população…); licenças nunca se fundem |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
| indicators_calculated | No | Indicadores presentes nas linhas (icsap_percentage) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description discloses significant behavioral nuances: the universe default that excludes obstetric/long-stay admissions, the fact that race is null before 2008, and that in 1992–1997 the CID-9 list is derived and non-official with uf referring to the file's UF. These are not captured by annotations and are crucial for correct interpretation of results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph that front-loads the main purpose and then packs caveats and specifics. It is efficient—every sentence contributes—but the structure could be improved with bullet points or shorter sentences for readability. Still, it avoids fluff and is appropriately sized for the complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a calculation tool with an output schema, the description covers all major pitfalls: data availability by year, race grouping constraints, the universe definition, and file-based uf semantics. It also references notes for further details. Nothing essential for an agent to call the tool correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so each parameter already has a description. The description adds extra semantics for group_by (race only valid from 2008) and uf (in 1992–1997 it's the file's UF), and clarifies the universe parameter's behavior in more detail than the schema, though the schema already explains the 'csapaih' vs 'all' distinction. It enriches the parameter understanding without redundancy.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool calculates ICSAP indicators as a percentage (ICSAP/Total×100), which is a specific verb+resource. It also provides context that these are key metrics for primary care, making the purpose unambiguous. While it doesn't name a sibling tool directly, the function is clearly distinct from raw-data retrieval tools like get_icsap.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context on when certain groupings are valid (race only from 2008 onward) and warns about non-comparable data in 1992–1997, plus the default universe. It points to get_available_years.race_available for verification, but it does not explicitly state 'use this tool for percentages and not for raw data' or mention alternatives like compare_icsap_trends. The context is strong but lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_cid_chaptersCapítulos da CID-10ARead-onlyIdempotentInspect
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 cid_chapter como o capítulo CID-10 equivalente (mapa por categoria em src/data/cid9-chapters.json).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| chapters | No | Os capítulos, na ordem da CID |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| total_chapters | No | Número de capítulos (22) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, covering the safety profile. The description adds value by specifying the exact content returned (22 chapters, codes, ranges) and the mapping file for CID-9 to CID-10, helping set expectations about the data. It does not conflict with any annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first states the primary action and result, the second adds a relevant edge-case about older cubes. Every sentence contributes useful information, and the main purpose is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, clear output schema), the description covers the essential usage context. The mention of the CID-9 mapping addresses a likely source of confusion for historical data. No critical information appears to be missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With zero parameters and 100% schema coverage, the description correctly omits parameter details. The baseline of 4 applies because there are no parameters to describe, and the description's focus on output content is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool lists the 22 ICD-10 chapters with codes and diagnostic ranges, naming the specific resource and scope. It distinguishes itself from siblings like list_csap_groups by focusing on a distinct resource, though it does not explicitly contrast with any sibling. The additional context about CID-9 mapping further clarifies its unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides contextual usage guidance by noting that 1992–1997 cubes with CID-9 diagnoses use `cid_chapter` as the equivalent ICD-10 chapter and referencing the mapping file. This implies when an agent might need this information, but it stops short of explicitly stating when to choose this tool over other list tools. No exclusions or alternative tool names are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_csap_groupsGrupos CSAP (Portaria 221/2008)ARead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| group_code | No | Código do grupo específico (ex: 'g01'). Se omitido, retorna todos. | |
| include_cid_codes | No | Se true, inclui lista de códigos CID-10 (default: false) |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | Grupo CSAP não encontrado |
| group | No | O grupo pedido por `group_code` |
| groups | No | Os 19 grupos, na ordem da Portaria |
| source | No | Norma que define a lista (Portaria MS/SAS 221/2008) |
| provenance | Yes | Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| total_groups | No | Número de grupos na lista (19) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds the fixed count of 19 groups and the ordinance reference, which is useful context but does not disclose additional traits such as default return behavior or performance. With annotations present, this is adequate but not exceptional.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, focused sentences with no filler. The verb 'Lista' is front-loaded, and the description efficiently conveys the core action and output without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with an output schema and fully documented parameters, the description is sufficient. It could add a note that this is a reference list and not an indicator tool, but the purpose is clear enough that an agent can call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and both parameters (group_code, include_cid_codes) are clearly documented in the input schema. The description adds no parameter-specific meaning beyond what the schema already provides, so it meets the baseline for full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists the 19 CSAP groups per Portaria MS/SAS 221/2008, with a specific verb ('Lista') and resource ('grupos CSAP'). It distinguishes itself from siblings like list_cid_chapters by naming the exact resource type and the legal basis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to use this tool versus alternatives like get_icsap, rank_csap_groups, or list_cid_chapters. The description only states what it does, leaving the decision entirely to the agent's inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rank_csap_groupsRanking dos grupos CSAPARead-onlyIdempotentInspect
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 value é nominal na moeda da época — ver as notes. Universo do pacote R csapAIH por padrão (universe): fora as internações por procedimento obstétrico, parto e longa permanência.
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | UFs para filtrar | |
| sex | No | Filtrar por sexo | |
| year | No | Anos para consultar | |
| limit | No | Número de grupos no ranking (default: 19) | |
| metric | No | Métrica para ranking (default: n) | |
| age_max | No | Idade máxima | |
| age_min | No | Idade mínima | |
| universe | No | Universo do % ICSAP: 'csapaih' (padrão) tira do numerador e do denominador as internações por procedimento obstétrico, com diagnóstico de parto (O80-O84) e as AIH de longa permanência, como o pacote R csapAIH (Nedel); 'all' conta todas as internações. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | Sempre vazio: só aparece no caminho de erro-mole do funil |
| note | No | Como obter o dado (por exemplo, consultar get_available_years) |
| error | No | Motivo pelo qual não há dados nesta resposta (ano sem dado, cobertura populacional, falha na consulta) |
| notes | No | Avisos que qualificam os números: era CID-9, raça/cor ausente, universo do % ICSAP, denominador populacional, truncamento |
| metric | No | Métrica que ordena |
| ranking | No | Ranking em ordem decrescente da métrica |
| provenance | Yes | Um bloco por procedência que contribuiu com esta resposta (SIH, lista CSAP, csapAIH, população…); licenças nunca se fundem |
| attribution | Yes | URLs canônicas das fontes desta resposta (lista de atribuição) |
| total_groups | No | Quantos grupos no ranking |
| concentration | No | |
| published_years | No | Anos que o canal de cubos publica — a verdade do canal, distinta do que esta instância tem em disco; só com o cache de cubos ligado |
| available_sih_years | No | Anos com dados SIH atendíveis por este servidor |
| years_not_available | No | Presente só quando parte dos anos pedidos não tem dado: os números cobrem apenas os anos atendidos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds valuable behavioral context beyond annotations: the caveat about CID-9 derived data for 1992–1997, the non-comparability of groups g03 and g05, the nominal currency of 'value', and the default universe (csapaih) that excludes obstetric procedures, childbirth, and long-stay admissions. These are important data behaviors an agent should know.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with the main purpose stated in the first sentence and caveats following. It is not overly verbose and front-loads the core function. The structure is logical: purpose, capability, then data caveats. It could be slightly more streamlined, but it is appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 8 optional parameters, an output schema, and the annotations cover safety, the description is fairly complete. It explains the ranking criteria, the data caveats, and the default universe. It does not explicitly mention the output format (e.g., a table), but the presence of an output schema likely covers that. The description is sufficient for an agent to call the tool correctly, though it could mention potential edge cases or the direction of ranking (e.g., descending).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description does add some context, such as the meaning of the 'value' metric being nominal and the explanation of the 'universe' parameter's default behavior. However, it does not delve into other parameters like 'uf', 'sex', 'year', or 'limit' beyond what the schema already states. The added value is marginal, keeping the score at baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb ('Gera ranking') and resource ('dos 19 grupos CSAP'), and specifies the ranking criteria (number of hospitalizations, days, or value). It also adds an additional capability ('Identifica principais causas evitáveis'). The purpose is unambiguous and distinct from sibling tools like list_csap_groups or get_icsap, which focus on listing or retrieving data rather than ranking.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives or when not to use it. It provides context about the default universe and data caveats, but these are behavioral notes, not usage guidance. An agent might infer the use case from the name, but the description lacks explicit direction on when to prefer this over get_icsap or compare_icsap_trends.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
12 tool updates
- First observed
classify_as_csap - First observed
compare_icsap_trends - First observed
compare_regions - First observed
get_available_years - First observed
get_hospitalization_rates - First observed
get_hospitalization_trends - First observed
get_hospitalizations - First observed
get_icsap - First observed
get_icsap_indicators - First observed
list_cid_chapters - First observed
list_csap_groups - First observed
rank_csap_groups
Related MCP Connectors
County and tract-level health outcomes, behaviors, and preventive services from CDC PLACES
Disease Twin — Brazil's rare-disease knowledge graph (10,468) over MCP. Source-grounded, PT-BR.
Brazilian Federal Transparency Portal: sanctions (CEIS, CNEP, CEPIM) and Politically Exposed Persons
Status of a CPF or CNPJ in the state treasury default registry (CADIN), by state. Platform-hosted, n
Related MCP Servers
- AlicenseAqualityFmaintenanceMCP server for Brazilian ICD-10 (CID-10) that enables search, lookup, hierarchy navigation, statistics, and validation of disease codes from official DATASUS data.61,182 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA RAG-based MCP server for natural language querying of Brazilian healthcare manuals (SIH/SUS, SIA/SUS) and official ordinances. It provides 16 tools for semantic search, regulatory critique analysis, and retrieving data from SIGTAP and CNES.1-
- AlicenseAqualityAmaintenanceMCP server for loading and querying public data from the Brazilian National Registry of Health Establishments (CNES). It enables natural language searches for health facilities by municipality, CNES code, or state, along with statistics and data loading.6MIT
- FlicenseNot gradedqualityCmaintenanceRead-only MCP server for querying Brazilian CNES health establishment data in PostgreSQL, enabling AI-assisted database exploration and analysis.-
Glama MCP Gateway
Add one secure layer between your agents and this server.