Skip to main content
Glama

update_lab_result

Idempotent

Update one or more fields on an existing lab result. Use when the user wants to correct a result already logged, most often its collection date. Only send the fields that need to change; omit all others.

SELECTOR, pass exactly one of id, date, date+marker, or draw_id:

  • id: addresses one marker's row. Any editable field may change.

  • draw_id: addresses every result sharing that draw_id at once, unambiguous by construction. Only new_date, panel_name_new, lab_name, fasting_status, and report_date may change this way — those are draw-level fields.

  • date (optionally narrowed by panel_name): addresses every result from that draw at once, but ONLY when exactly one draw exists on that date — see AMBIGUITY below. Same draw-level fields as draw_id.

  • date + marker (a marker-name substring, case-insensitive, optionally narrowed by panel_name): resolves to one marker's row, same as id. Errors with candidate IDs if more than one marker on that date matches.

AMBIGUITY: a bare date (optionally + panel_name) selector is rejected, with nothing changed, if it would match more than one physical draw — an explicit draw_id from one source plus legacy rows with none, two distinct draw_ids, or two differently-named legacy sources on the same day. The error names every draw found; retry with draw_id, marker, or a narrower panel_name.

FASTING: fasting_status only changes to 'fasting' or 'non_fasting' when the user explicitly states it for that draw — never infer from time of day or a notes mention. 'unknown' is a valid explicit value too, for undoing a mistaken confirmation.

NOTES: changing result_value, result_unit, or result_comparator by id or date+marker automatically regenerates the "Reported as <9 IU/mL"-style note from the new value/unit/comparator, replacing only a note it previously auto-generated — any other free text in notes survives. Pass notes yourself only to add or change unrelated free text; it is folded in alongside the regenerated line rather than overwriting it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoLab result ID. Selects a single marker row. Alternative to date/draw_id.
dateNoCollection date of the draw to update. Format: YYYY-MM-DD. Selects every result from that draw (see AMBIGUITY above), or (with marker) one row. Alternative to id/draw_id.
flagNoNew lab flag: "H", "L", "HH", "LL", or "A". Optional, omit if not changing. Only allowed when selecting by id or date+marker.
notesNoNew notes. Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above.
markerNoOptional with date: marker-name substring, case-insensitive (e.g. "LDL"), narrowing the date selector to a single marker row so per-marker fields can be edited without an id. Ignored when id or draw_id is given.
draw_idNoOpaque label of your choosing grouping a set of results from one visit, normalized server-side. Selects every result sharing that label, unambiguous by construction. Alternative to id/date. Ignored when id is given.
lab_nameNoNew lab name (e.g. "Quest Diagnostics", "LabCorp"). Optional, omit if not changing. Works with any selector.
new_dateNoNew collection date. Format: YYYY-MM-DD. Optional, omit if not changing. This is the main reason to call this tool, and it works with any selector.
panel_nameNoOptional, narrows a date (or date+marker) selector to one panel within that draw (e.g. "Lipid Panel"). Ignored when id is given.
marker_nameNoNew marker name. Optional, omit if not changing. Only allowed when selecting by id or date+marker.
report_dateNoNew report/result date, separate from the collection date. Format: YYYY-MM-DD. Optional, omit if not changing. Works with any selector.
result_unitNoNew unit of measurement (e.g. "mg/dL"). Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above.
result_valueNoNew numeric result value. Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above.
fasting_statusNoNew fasting status for the whole draw. See FASTING above. Optional, omit if not changing. Works with any selector.
panel_name_newNoNew panel name. Optional, omit if not changing. Works with any selector.
result_comparatorNoNew comparator for a reporting-limit result (e.g. "<9"), or "none" to clear it back to an exact value. Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / notes / description
      Previous value: -"New notes. Optional, omit if not changing. Only allowed when selecting by id or date+marker."New value: +"New notes. Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above."
    • addedInput schema / properties / result_comparator
      Added value: +{
      +  "description": "New comparator for a reporting-limit result (e.g. \"<9\"), or \"none\" to clear it back to an exact value. Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above.",
      +  "enum": [
      +    "<",
      +    ">",
      +    "<=",
      +    ">=",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / result_unit / description
      Previous value: -"New unit of measurement (e.g. \"mg/dL\"). Optional, omit if not changing. Only allowed when selecting by id or date+marker."New value: +"New unit of measurement (e.g. \"mg/dL\"). Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above."
    • changedInput schema / properties / result_value / description
      Previous value: -"New numeric result value. Optional, omit if not changing. Only allowed when selecting by id or date+marker."New value: +"New numeric result value. Optional, omit if not changing. Only allowed when selecting by id or date+marker. See NOTES above."
  2. Changed1 schema field changed
    • changedInput schema / properties / draw_id / description
      Previous value: -"Draw ID grouping a set of results from one visit. Selects every result in that draw, unambiguous by construction. Alternative to id/date. Ignored when id is given."New value: +"Opaque label of your choosing grouping a set of results from one visit, normalized server-side. Selects every result sharing that label, unambiguous by construction. Alternative to id/date. Ignored when id is given."
  3. Changed6 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"Collection date of the draw to update. Format: YYYY-MM-DD. Selects every result from that draw, or (with marker) one row. Alternative to id."New value: +"Collection date of the draw to update. Format: YYYY-MM-DD. Selects every result from that draw (see AMBIGUITY above), or (with marker) one row. Alternative to id/draw_id."
    • addedInput schema / properties / draw_id
      Added value: +{
      +  "description": "Draw ID grouping a set of results from one visit. Selects every result in that draw, unambiguous by construction. Alternative to id/date. Ignored when id is given.",
      +  "type": "string"
      +}
    • addedInput schema / properties / fasting_status
      Added value: +{
      +  "description": "New fasting status for the whole draw. See FASTING above. Optional, omit if not changing. Works with any selector.",
      +  "enum": [
      +    "fasting",
      +    "non_fasting",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / id / description
      Previous value: -"Lab result ID. Selects a single marker row. Alternative to date."New value: +"Lab result ID. Selects a single marker row. Alternative to date/draw_id."
    • changedInput schema / properties / marker / description
      Previous value: -"Optional with date: marker-name substring, case-insensitive (e.g. \"LDL\"), narrowing the date selector to a single marker row so per-marker fields can be edited without an id. Ignored when id is given."New value: +"Optional with date: marker-name substring, case-insensitive (e.g. \"LDL\"), narrowing the date selector to a single marker row so per-marker fields can be edited without an id. Ignored when id or draw_id is given."
    • addedInput schema / properties / report_date
      Added value: +{
      +  "description": "New report/result date, separate from the collection date. Format: YYYY-MM-DD. Optional, omit if not changing. Works with any selector.",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations by disclosing nuanced behaviors: ambiguous date selectors are 'rejected, with nothing changed,' fasting status must be explicitly stated and 'never infer from time of day,' and changing result values 'automatically regenerates' notes while preserving unrelated free text. These details materially shape how an agent invokes the tool and interprets outcomes.

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 long, but every section earns its place given 16 optional parameters and tricky selector semantics. It is front-loaded with the core purpose and use case, then organized with clear headers (SELECTOR, AMBIGUITY, FASTING, NOTES) and bullet lists that make the complex rules scannable.

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?

For a high-complexity mutation tool with 16 parameters, an output schema, and annotations already covering read-only/destructive/idempotent traits, the description is remarkably complete. It covers all selector modes, ambiguity handling, field-level restrictions, fasting inference rules, and note regeneration behavior. Nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

With 100% schema coverage, the schema already documents every parameter, but the description adds significant meaning: which fields are draw-level, how marker substrings work case-insensitively, the exact ambiguity failure modes, and the notes regeneration rule. It also explains the idempotent-like 'only send the fields that need to change' contract.

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: 'Update one or more fields on an existing lab result,' and immediately clarifies the main use case: 'correct a result already logged, most often its collection date.' This clearly separates it from sibling create/delete/list tools such as log_lab_results, delete_lab_result, and list_lab_results.

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?

Clearly says when to use the tool: when the user wants to correct an already-logged lab result. It also gives strong within-tool selector guidance (id, date, date+marker, draw_id) and warns when a selector will be rejected. However, it does not explicitly say 'do not use for new results' or name log_lab_results as the alternative.

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.