Skip to main content
Glama

webdiet_preconsulta_write_link_to_patient

Vincular (link) a pre-consultation response to an existing patient in WebDiet. Action: link_to_patient — imports the response content into the patient's chart. WebDiet routes automatically based on the response's "origem": • origem=anamnese → response becomes a new anamnese (importarPreanamnese.php) • origem=questionario → response becomes a new diagnostico (criarDiagnosticoPre.php) This is the API-equivalent of the panel's "Vincular ao paciente" button on the Respostas dos questionários page. After linking, the response remains in the responses list — use webdiet_preconsulta_delete to remove it if desired. Tip: when the response's respondedor.nome differs from the patient's nome (e.g. "DALILA JULIAO MARTINS" vs "Dalila CG"), match by telefone or nascimento via webdiet_patient list before linking.

[Flattened action: link_to_patient]

Bulk support: accepts patient_ids, response_ids for batched execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNo
patient_idYes
patient_idsNo
response_idYes
response_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses that the action imports content into the patient's chart (write operation), that the response remains after linking (non-destructive), and that routing depends on 'origem'. This adds value beyond the annotations, which are minimal. There is no contradiction with annotations.

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?

The description is concise, well-structured with bullet points and a clear hierarchy. It is front-loaded with the main purpose, and every sentence contributes value: action explanation, routing, UI reference, tip, and bulk support. No redundant information.

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?

The description covers the tool's purpose, behavior, and usage tips adequately. It lacks details on error conditions or prerequisites (e.g., response existence), but given the surrounding tools and absence of output schema, it is sufficiently complete for an agent to use correctly.

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

Parameters3/5

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

With 0% schema coverage, the description adds meaning by mentioning bulk support via 'patient_ids' and 'response_ids'. However, it does not individually describe each parameter, leaving some ambiguity despite self-explanatory names. The description partially compensates but is not exhaustive.

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 links a pre-consultation response to an existing patient, with specific verb 'Vincular (link)' and resource 'pre-consultation response to patient'. It explains the routing based on 'origem' and provides context that distinguishes it from siblings like webdiet_preconsulta_delete.

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 clear context: it is the API-equivalent of the panel button and provides a tip for patient matching when names differ. However, it does not explicitly state when not to use it or mention alternatives, though the context implies that linking is appropriate after obtaining a response via list_responses.

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.