Skip to main content
Glama

get_hospitalizations

Query Brazilian hospital admission data, filtering by state, diagnosis (ICD), sex, age, race, and period, with aggregation options.

Instructions

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoLista de UFs (ex: ['SP', 'RJ']). Se omitido, todas.
sexNoFiltrar por sexo
raceNoRaç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.
yearNoAnos para consultar (ex: [2023, 2024]); série de 1992 em diante
limitNoLimitar número de resultados
monthNoMeses (1-12). Se omitido, todos.
age_maxNoIdade máxima em anos
age_minNoIdade mínima em anos
is_csapNoFiltrar apenas CSAP (true) ou não-CSAP (false)
group_byNoDimensões para agrupamento
cid_chapterNoCapítulos CID-10 (1-22). Se omitido, todos.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.1

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It uses the verb 'Consulta' (query), which implies a read-only operation, and does not mention any side effects or data modifications. However, it does not explicitly state that no changes are made or address potential rate limits or other behavioral aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph that packs many essential caveats. While it is long, the information is necessary and not redundant. It is structured logically, starting with the core purpose and then detailing specific data limitations, making it efficient for the complexity it covers.

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 tool's complexity (11 parameters, many historical nuances), the description is complete. It covers all parameters, explains edge cases (race, CID revisions, UF interpretation), and directs users to get_available_years for further details. No output schema is present, but that is not required for completeness.

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?

The schema provides 100% coverage of parameter descriptions, but the description adds significant meaning beyond the schema. It clarifies important nuances: race only exists from 2008 onward, CID-9 vs CID-10 distinction, UF refers to establishment not residence, and value is nominal in the local currency. These details are critical for correct usage.

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 function: querying SUS hospital admission data with flexible filters and aggregation across multiple dimensions. It specifies the resource (hospitalizations) and the main capabilities, making it distinct from other tools like trends or comparisons.

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

Usage Guidelines2/5

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 the sibling tools. It references get_available_years for more details but does not clarify the selection criteria among the many related functions (e.g., when to use get_hospitalization_trends instead). Lacks explicit 'when not to use' guidance.

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