Skip to main content
Glama

delete_lab_result

DestructiveIdempotent

Permanently delete one or more lab results. use: the user explicitly asks to remove or delete a logged lab result. Never guess a selector.

SELECTOR, exactly one of id | date | date+marker | draw_id:

  • id: one marker's row.

  • draw_id: every result sharing that draw_id at once, unambiguous by construction. Irreversible.

  • date (optionally narrowed by panel_name): every result from that draw at once, but ONLY when exactly one draw exists on that date (see AMBIGUITY). Irreversible and can remove many rows in one call: confirm with the user before a date-scoped delete, especially one not narrowed by panel_name or marker.

  • date + marker (marker-name substring, case-insensitive, optionally narrowed by panel_name): one marker's row, same as id. More than one marker matching on that date -> error with candidate IDs.

AMBIGUITY: a bare date (optionally + panel_name) selector that would match more than one physical draw is rejected with nothing deleted: 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "delete_lab_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoLab result ID: one marker row.
dateNoCollection date of the draw, YYYY-MM-DD. See SELECTOR.
markerNoWith date: case-insensitive marker-name substring (e.g. "LDL") narrowing to one marker row instead of the whole draw. Ignored with id or draw_id.
draw_idNoOpaque label grouping one visit's results, normalized server-side. See SELECTOR. Ignored when id is given.
panel_nameNoNarrows a date (or date+marker) selector to one panel in that draw, e.g. "Lipid Panel". Ignored with id.

Output Schema

NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"Collection date of the draw to delete. Format: YYYY-MM-DD. Deletes every result from that draw (see AMBIGUITY above), or (with marker) one row. Alternative to id/draw_id."New value: +"Collection date of the draw, YYYY-MM-DD. See SELECTOR."
    • changedInput schema / properties / draw_id / description
      Previous value: -"Opaque label of your choosing grouping a set of results from one visit, normalized server-side. Deletes every result sharing that label, unambiguous by construction. Alternative to id/date. Ignored when id is given."New value: +"Opaque label grouping one visit's results, normalized server-side. See SELECTOR. Ignored when id is given."
    • changedInput schema / properties / id / description
      Previous value: -"Lab result ID. Deletes a single marker row. Alternative to date/draw_id."New value: +"Lab result ID: one marker row."
    • changedInput schema / properties / marker / description
      Previous value: -"Optional with date: marker-name substring, case-insensitive (e.g. \"LDL\"), narrowing the date selector to delete a single marker row instead of the whole draw. Ignored when id or draw_id is given."New value: +"With date: case-insensitive marker-name substring (e.g. \"LDL\") narrowing to one marker row instead of the whole draw. Ignored with id or draw_id."
    • changedInput schema / properties / panel_name / description
      Previous value: -"Optional, narrows a date (or date+marker) selector to one panel within that draw (e.g. \"Lipid Panel\"). Ignored when id is given."New value: +"Narrows a date (or date+marker) selector to one panel in that draw, e.g. \"Lipid Panel\". Ignored with id."
  2. Changed1 schema field changed
    • changedInput schema / properties / draw_id / description
      Previous value: -"Draw ID grouping a set of results from one visit. Deletes 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. Deletes every result sharing that label, unambiguous by construction. Alternative to id/date. Ignored when id is given."
  3. Changed4 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"Collection date of the draw to delete. Format: YYYY-MM-DD. Deletes every result from that draw, or (with marker) one row. Alternative to id."New value: +"Collection date of the draw to delete. Format: YYYY-MM-DD. Deletes 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. Deletes every result in that draw, unambiguous by construction. Alternative to id/date. Ignored when id is given.",
      +  "type": "string"
      +}
    • changedInput schema / properties / id / description
      Previous value: -"Lab result ID. Deletes a single marker row. Alternative to date."New value: +"Lab result ID. Deletes 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 delete a single marker row instead of the whole draw. Ignored when id is given."New value: +"Optional with date: marker-name substring, case-insensitive (e.g. \"LDL\"), narrowing the date selector to delete a single marker row instead of the whole draw. Ignored when id or draw_id is given."
  4. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds material context beyond them: which selectors are irreversible, that a date-scoped delete can remove many rows in one call and warrants user confirmation, and that an ambiguous selector deletes nothing and returns an error enumerating every draw found. That last point is a genuine behavioral guarantee not visible in any structured field.

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 action and trigger, then organized into SELECTOR and AMBIGUITY blocks that an agent can scan. It is dense but nearly every clause carries decision-relevant detail; minor repetition of the irreversibility warning and the caps-heavy formatting keep it just short of a 5.

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 destructive, multi-selector tool, all the gaps an agent could fall into are covered: wrong selector choice, silent bulk deletion, ambiguous matches, and recovery after an error. The presence of an output schema means return shape need not be restated, so nothing essential 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?

If schema coverage is already 100%, so the baseline would be 3, but the description contributes real semantics the schema cannot express: the exclusive-one-of constraint across id/date/date+marker/draw_id, the case-insensitive substring matching of marker, the panel_name narrowing interaction, and the documented ignore rules (marker ignored with id or draw_id). This is meaning beyond the per-property descriptions.

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 with scope ("Permanently delete one or more lab results"), and the explicit trigger phrase distinguishes it from the sibling mutators like update_lab_result and log_lab_results. An agent can tell this apart from any other lab-result tool without opening the 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 an explicit use condition ("the user explicitly asks to remove or delete a logged lab result"), an explicit anti-pattern ("Never guess a selector"), and per-selector guidance on which of id/draw_id/date/date+marker to prefer. It even names the recovery path when a selector is rejected (retry with draw_id, marker, or a narrower panel_name).

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.