Skip to main content
Glama

dietbox_patient_write_update

Create or update patients in Dietbox. Actions: create (Name required, uses POST), update (partial fields, uses PATCH — no need to send all fields). Gender: Masculino or Feminino (converted to boolean for the API). Observation field for notes. Endereço, dados civis e de acesso (Address, Number, Complement, Neighborhood, State, City, Cep, MaritalStatus, Occupancy, Expire) são suportados em create e update — use os mesmos nomes de campo retornados pelo dietbox_patient (get); o adapter mapeia internamente a divergência de nomes do endpoint de update.

Phone / MobilePhone são normalizados automaticamente para E.164 em create e update (o endpoint update/PATCH /patients rejeita HTTP 400 "'Body Mobile Phone Value' is not in format 'E.164'" quando recebe número sem prefixo internacional). Envie "67991234567", "(67) 99123-4567" ou "+5567991234567" indistintamente — o adapter ajusta para "+5567991234567" antes de chamar a API. Para números não-brasileiros, envie já com "+{código}".

For destructive removal use dietbox_patient_delete.

[Flattened action: update]

Bulk support: accepts patient_ids for batched execution.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "patient_id": "<patient_id>"
    },
    "name": "dietbox_patient_write_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
CepNo
CpfNo
CityNo
NameNo
EmailNo
PhoneNo
StateNo
ExpireNo
GenderNo
NumberNo
AddressNo
accountNo
BirthdayNo
IsActiveNo
OccupancyNo
ComplementNo
patient_idYes
MobilePhoneNo
ObservationNo
patient_idsNo
NeighborhoodNo
MaritalStatusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / required
      Added value: +[
      +  "patient_id"
      +]
  2. Changed10 schema fields changed
    • addedInput schema / properties / Address
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / Cep
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / City
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / Complement
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / Expire
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / MaritalStatus
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / Neighborhood
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / Number
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / Occupancy
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / State
      Added value: +{
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations only declare readOnly=false, destructive=false, idempotent=false and openWorld=false; the description adds genuinely non-derivable behavior: PATCH semantics for update, automatic E.164 normalization of Phone/MobilePhone, gender converted to boolean for the API, and an internal name-mapping adapter between the get and update endpoints. It stops short of saying what happens when the patient_id does not exist or how partial updates interact with omitted fields.

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 important constraints (update is partial PATCH, field-name mapping, phone normalization) are front-loaded and each sentence carries information. It is somewhat verbose in the E.164 parenthetical quoting the exact HTTP 400 message, and the leading create/then-update framing is confusing given the flattened update action.

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?

This is the weakest area relative to the tool's complexity: a 22-parameter mutation with zero schema descriptions, no output schema and only skeleton annotations. Roughly a third of the parameters (MaritalStatus numeric enum, Cpf, Birthday, IsActive, account) have no meaning supplied anywhere, which is not enough for an agent to call it confidently.

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?

Schema description coverage is 0% across 22 parameters, so the description must carry the burden and it only partly does: it lists the address/civil/access field names, pins Gender to Masculino/Feminino, explains Observation as notes and the accepted Phone formats. Cpf, Email, Birthday, IsActive, Occupancy, account and especially MaritalStatus (typed as a bare number, with no explanation of allowed codes) are left undocumented.

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

Purpose3/5

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

The opening line says "Create or update patients in Dietbox" with a specific verb and resource, but the definition is tagged "[Flattened action: update]" — so describing a POST create path conflicts with what the agent is actually exposed to. It also never distinguishes itself from the sibling dietbox_patient_write_create, which is the more likely competitor for a create call.

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?

It explicitly routes destructive removal to dietbox_patient_delete and explains that update is partial (PATCH, no need to send all fields), which is real usage guidance. However there is no statement of when to pick this over dietbox_patient_write_create, nor prerequisites such as account/auth scoping, so the when-to-use picture is only implied.

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.