Servidor MCP somente leitura para dados clínicos do PEC
The server implements 13 read-only clinical data access tools with consistent patterns and reasonable schemas. All tools are documented with descriptions and input parameters, but several quality gaps limit the score: (1) Descriptions are generic and lack context about when/why to use each tool or what downstream operations they enable. (2) Most parameters lack formal constraints (enums, min/max) despite accepting restricted values (e.g., 'sex' should be an enum of valid gender values, 'cid_logic' and 'cid_ciap_logic' accept only 'OR'/'AND'). (3) Output schemas are partially documented (visible in test fixtures) but not explicitly declared in tool registration code. (4) Error handling is absent, no guidance for LLMs on failure recovery. (5) Parameter descriptions are minimal and do not explain dependencies or interaction patterns (e.g., how 'cid_codes' + 'cid_logic' work together). The server does show discipline in PII handling (test suite validates no sensitive data leaks) and consistent naming (verb_noun with 'listar_' and 'obter_' prefixes), but lacks LLM-optimization in descriptions and constraint documentation.
Captura dados de um paciente específico
Retorna a contagem de pacientes distintos de acordo com filtros
Lista condicoes de saude (CID/CIAP) registradas em pacientes
Lista gestantes ativas
Lista prescrições de medicamentos do paciente
Lista registros de antropometria (peso, altura, IMC) do paciente
Lista registros de glicemia capilar (HGT) do paciente
Lista registros de pressão arterial do paciente
Missing output schema documentation. All 13 tools have output structures inferred only from test fixtures (e.g., _LINHA_PACIENTE, _LINHA_CONDICAO, _MEDICAO_COMUM). Explicit output schemas should be declared in tool registration or docstrings so LLMs know what fields to extract and pass to downstream tools.
Enum parameters declared as free-form strings. 'source' (in obter_codigos_condicao_saude) accepts only 'cid' or 'ciap'; 'cid_logic' and 'cid_ciap_logic' (in listar_condicoes_pacientes, contar_pacientes) accept only 'OR' or 'AND'; 'sex' filters likely accept only 'MASCULINO'/'FEMININO'. These should be declared as enums in JSON Schema so LLMs pick valid values automatically and avoid hallucinated inputs.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 53 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 48 | - | v1 |
Lista o histórico de hemoglobina glicada (HbA1c) do paciente
Recupera últimos atendimentos SOAP do paciente (médicos e enfermeiros)
Lista unidades de saúde
Lista visitas de Agente Comunitário de Saúde (ACS) do paciente
Obtém códigos de condição de saúde (CID-10 ou CIAP)
Generic, context-free descriptions. Tool descriptions average ~45 chars and answer WHAT but not WHEN or WHY. Examples: 'Captura dados de um paciente específico' (does not say what fields, what they're used for, or whether this is the right entry point); 'Retorna a contagem de pacientes distintos' (does not explain distinct-by-what, or use cases like cohort sizing). LLM-optimized descriptions should include: (1) action + context, (2) when to use this vs. related tools, (3) what's returned and how it chains to other tools. Target 50 - 150 chars.
No error handling or recovery guidance. All 13 tools are read-only, but responses do not document failure modes or guide LLM recovery. Example: if a patient_id is invalid, what error is returned? Should the LLM search for the patient first, or is the error fatal? No mention of timeouts, rate limits, or partial result handling.
Parameter constraints not documented in descriptions. 'limite' parameters default to 50 but lack min/max stated in descriptions. Date parameters (data_inicio, data_fim) are ISO 8601 but constraints (e.g., 'data_fim must be >= data_inicio', 'max range 1 year') are not documented. Age filters (age_min, age_max) have no stated range (0 - 120?). These should be explicit in parameter descriptions to help LLMs construct valid calls.
Parameter dependencies undocumented. listar_condicoes_pacientes and contar_pacientes have 'cid_codes' + 'cid_logic' and 'ciap_codes' + 'ciap_ciap_logic'. Are these always used together? Can you pass 'cid_logic' without 'cid_codes'? What happens if you pass both 'cid_code' (singular) and 'cid_codes' (plural)? These relationships should be documented in both parameter descriptions and tool description.