Skip to main content
Glama

DATASUS SIH/SUS — Brazil Hospital Admissions (AIH) MCP

Classificar CID-10 como CSAP

classify_as_csap
Read-onlyIdempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cid_codesYesCódigos CID-10 para classificar (ex: ['J18', 'A09', 'K35'])

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoSó quando houver código não classificado: quantos foram e para onde olhar
summaryNo
provenanceYesBloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença
attributionYesURLs canônicas das fontes desta resposta (lista de atribuição)
classificationsNoUma entrada por código, na ordem informada

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.