Skip to main content
Glama

get_hospitalization_rates

Calculate hospitalization rates per 100,000 inhabitants using configurable filters for year, state, sex, age, and CID chapter. Supports crude or specific rates with grouping options.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoUFs para filtrar
sexNoFiltrar por sexo
yearNoAnos para calcular
age_maxNoIdade máxima
age_minNoIdade mínima
is_csapNoFiltrar apenas CSAP
group_byNoDimensões para agrupamento
rate_perNoTaxa por X habitantes (default: 100000)
rate_typeNoTipo de taxa: crude (bruta) ou specific (específica por filtro)
cid_chapterNoCapítulos CID-10 (1-22)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.1

TDQS

A4.3/5.0
Behavior5/5

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

The description discloses important behavioral details: the denominator is sourced from two different files depending on the year, and age filtering before 2000 only works within specific ranges. It also states that the response indicates the source file per year and warns when mixing, providing full transparency about the tool's behavior and potential pitfalls.

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 sentence that packs a lot of information, but it remains coherent and readable. It is not overly verbose, but the complexity of the caveat makes it slightly long. The structure is logical, moving from the main function to the denominator logic and finally to the response details.

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?

There is no output schema, but the description mentions what the response includes (population_source and a warning), which helps an agent understand the expected output. Combined with the parameter descriptions, this provides a fairly complete picture for using the tool. Some details like the exact format of the warning are omitted, but overall it is sufficiently complete for a complex tool.

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

Parameters4/5

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

The schema already has 100% coverage with descriptions for all 10 parameters. The description adds meaningful clarification about the age_min and age_max parameters (the pre-2000 caveat), enhancing understanding beyond the schema. It also clarifies the rate_per default and rate_type, though these are already in the schema. The added context justifies a score above the baseline of 3.

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 purpose: calculating hospitalization rates per population (taxas de internação por população). It specifies the denominator source and the age filter caveat, making the intent unambiguous. While it doesn't explicitly differentiate from siblings, the core function is distinct and well-defined.

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 context on the calculation logic (denominator from two files) and the age filter limitation, but does not explicitly state when to use this tool versus alternatives like get_hospitalizations or get_hospitalization_trends. The guidance is implicit rather than explicit, leaving some ambiguity for an agent deciding between tools.

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