Skip to main content
Glama
health-os

health-os

update_medication

Idempotent

Correct a recorded medication the user says is wrong or incomplete: a typo in the name, a missing or mistyped dose, unit, times_per_day or route, the wrong start date.

Instructions

Correct a recorded medication the user says is wrong or incomplete: a typo in the name, a missing or mistyped dose, unit, times_per_day or route, the wrong start date. medication_id comes from get_medications; pass only the fields to change (empty = keep). The previous version is kept in the change history. Not for a dose the doctor changed — then call stop_medication (stop_reason "dose changed") and record_medication with the new dose from that date, so the timeline shows the change. Never suggest dose changes yourself.

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": {
      "medication_id": "<medication_id>"
    },
    "name": "update_medication"
  }
}

Input Schema

NameRequiredDescriptionDefault
routeNo
atc_codeNo
dose_unitNo
start_dateNo
dose_amountNo
product_typeNo
medication_idYes
times_per_dayNo
prescribed_forNo
medication_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (idempotent, non-destructive), the description discloses that partial updates are supported ('pass only the fields to change (empty = keep)') and that the prior version is retained in change history — material context for a mutation tool. It also adds a safety guardrail against suggesting dose changes. It stops short of stating permissions or confirmation needs, keeping it at 4 rather than 5.

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?

Front-loaded with the core action, then source-of-id, then the routing rule. Every sentence is load-bearing, though the final 'Never suggest dose changes yourself' reads as a policy instruction folded into a tool description, and the block is dense with no visual separation of the routing rule.

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?

An output schema exists, so return shape need not be described, and the annotations cover the mutation safety profile. The description supplies the partial-update contract, history retention, id provenance and sibling routing. The only real gap is the three undocumented optional fields (atc_code, product_type, prescribed_for), which an agent may leave unset for lack of guidance.

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 10 parameters, so the description carries the burden; it covers medication_name, dose_amount, dose_unit, times_per_day, route and start_date, and explains the empty-string/null default semantics as 'keep'. It leaves atc_code, product_type and prescribed_for entirely unexplained, so the compensation is only partial.

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?

States a specific verb and resource ('Correct a recorded medication') and immediately enumerates the kind of correction (name typo, dose, unit, times_per_day, route, start date). It explicitly distinguishes itself from stop_medication and record_medication, so an agent can route between the three without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives the trigger condition ('the user says is wrong or incomplete'), an explicit exclusion ('Not for a dose the doctor changed'), and the exact alternative workflow with tool names and the stop_reason argument value. Nothing about when to pick this tool is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.