Skip to main content
Glama

validar_nota_soap

Validate clinical notes in SOAP format for completeness and coherence, checking required fields, ICD codes, and red flags locally on your machine.

Instructions

Valida uma nota clínica no formato #TELEMEDICINA# (F/S/O/A/P).

Checa campos obrigatórios, CID, numeração do plano e rodapé por regras determinísticas, e usa o LLM local para conferir coerência entre queixa, exame e conduta, além de sinais de alarme não investigados. A parte do LLM é probabilística e vem marcada como tal; se ele estiver fora do ar, as regras respondem sozinhas.

O texto processado não sai da máquina nem é gravado em lugar nenhum.

Args: texto_nota: a nota completa, como seria colada no prontuário.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
texto_notaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
avisoNo
problemasYes
total_errosYes
total_avisosYes
motivo_semantica_puladaNo
checagem_semantica_feitaYesFalse quando o LLM local não respondeu; as regras valeram assim mesmo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the hybrid deterministic/LLM nature, that the LLM part is probabilistic and marked as such, that rules take over if the LLM is down, and that the text does not leave the machine or get stored. This goes beyond typical descriptions and addresses privacy and failure modes.

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 well-structured: it opens with the core purpose, then explains the validation logic and LLM behavior, includes a privacy note, and ends with the Args section. It is more than two sentences but every sentence carries relevant information; it is efficient without being verbose.

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?

Given that an output schema exists (not shown but indicated), the description need not explain return values. It covers the validation scope, the probabilistic LLM component, fallback behavior, and privacy. It does not mention prerequisites or limitations, but for a single-parameter validation tool, the information provided is sufficient 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.

Parameters4/5

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

The schema has a single parameter 'texto_nota' with no description coverage (0%). The tool description adds meaning by specifying it is 'a nota completa, como seria colada no prontuário', clarifying that the entire note is expected as it would be pasted in the medical record. This compensates for the schema's lack of description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool validates a clinical note in the #TELEMEDICINA# format (F/S/O/A/P), which is a specific verb and resource. It does not explicitly distinguish from the sibling tool 'sugerir_correcoes', but the purpose is unambiguous and distinct in function.

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 details what the tool checks (required fields, CID, plan numbering, footer, and LLM coherence) and mentions fallback behavior when the LLM is offline. However, it never explains when to use this tool versus the sibling 'sugerir_correcoes', nor does it state any conditions for when not to use it. Usage 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.

Deploy Server

Other Tools