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.

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.
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.
result_valueNoNew numeric result value. Optional, omit if not changing. Only allowed when selecting by id or date+marker.
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.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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"
      +}
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing selector ambiguity behavior, rejection with no changes when multiple draws match, draw-level vs marker-level field restrictions, and the rule to never infer fasting status from time of day. These are important behavioral traits an agent could not infer from annotations or schema alone. 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?

Though long, the description is tightly structured with SELECTOR, AMBIGUITY, and FASTING sections, and every sentence carries operational meaning. The most important guidance is front-loaded, and the organization makes the complexity navigable rather than overwhelming.

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?

Given the tool's 15 optional parameters, four selector modes, ambiguity risk, and field-level restrictions, the description is comprehensive: it tells the agent how to select, what each selector can change, how ambiguity is handled, and how fasting changes are constrained. The presence of an output schema means the description does not need to explain return values.

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?

Schema coverage is 100%, but the description adds substantial cross-parameter meaning: which selectors permit which fields, how draw_id groups results, how date+marker resolves to a single row, when panel_name narrows the selection, and the exact fasting_status allowed values. This is far beyond what the schema provides.

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 states a specific verb and resource: 'Update one or more fields on an existing lab result.' It positions the tool as the correction path for already-logged results, most often the collection date, which clearly sets it apart from logging, deleting, or listing lab results among the sibling tools.

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?

It explicitly says to use this tool when the user wants to correct an already logged result, gives detailed selector guidance, and instructs the agent to send only changed fields. It does not explicitly name log_lab_results or delete_lab_result as alternatives, but the 'correct a result already logged' framing makes the intended use clear.

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.