Skip to main content
Glama

delete_lab_result

DestructiveIdempotent

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

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

  • id: deletes a single marker's row.

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

  • date (optionally narrowed by panel_name): deletes every result from that draw at once, but ONLY when exactly one draw exists on that date — see AMBIGUITY below. 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 (a marker-name substring, case-insensitive, optionally narrowed by panel_name): resolves to and deletes 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 deleted, 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoLab result ID. Deletes a single marker row. Alternative to date/draw_id.
dateNoCollection 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.
markerNoOptional 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.
draw_idNoOpaque 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.
panel_nameNoOptional, narrows a date (or date+marker) selector to one panel within that draw (e.g. "Lipid Panel"). Ignored when id is given.

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

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true and idempotentHint=true, but the description adds crucial behavioral context: deletion is irreversible, date-scoped deletes can remove many rows, and ambiguous dates are rejected with nothing deleted and candidate IDs returned. This fully discloses what gets destroyed and how failures behave.

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 block earns its place given the destructive and ambiguous nature of the operation. The core action and use condition are front-loaded, selector rules are organized, and the AMBIGUITY section handles the trickiest behavior clearly. No filler or repetition beyond what improves safe usage.

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 tool with five optional parameters and complex selector semantics, the description covers the key decision space: which selector to use, how ambiguity is resolved, what is irreversible, and when to confirm with the user. The output schema exists, so return-value details do not need to be repeated here. Nothing critical is missing for correct invocation.

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%, yet the description adds substantial meaning beyond the schema: pass exactly one selector, marker matching is a case-insensitive substring, draw_id deletes all rows sharing that label, and panel_name narrows date selectors. It also explains resolution and rejection behavior that the schema alone cannot convey.

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 opens with a specific verb and resource: 'Permanently delete one or more lab results.' It clearly distinguishes this destructive action from the sibling update_lab_result and the many list/log tools, and even states the triggering user intent. The selector breakdown reinforces exactly what the tool operates on.

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?

It explicitly says when to use the tool: when the user asks to remove or delete a logged lab result. It also provides strong exclusions and guardrails: 'Never guess a selector,' warns about ambiguity, and instructs confirming with the user before date-scoped deletes. This goes well beyond implied usage and actively prevents misuse.

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.