Skip to main content
Glama

log_lab_results

Log one or more blood test or biomarker results. use: requested logging/import of lab values or a concrete result to record. Review/interpretation alone: no write.

GLUCOSE ROUTING: glucose belongs here only when it is an actual lab/blood-draw result or part of a reported lab panel. Finger-stick, CGM, home meter, wearable, Apple Health or Health Connect glucose, including a manual correction to daily glucose, goes to log_wearable as blood_glucose_mg_dl, not here.

REQUIRED WORKFLOW: 1) call list_lab_markers for canonical names and LOINC codes. 2) per marker the user provides, find the best match and use its canonical marker_name and loinc_code. 3) no match -> the name as stated, omit loinc_code.

User has lab results but has not shared them -> prompt: "You can paste the text from your lab report PDF, or upload a photo of the results page, and I'll parse all the values at once."

collection_date: report or explicit user context; missing: ask, never substitute report_date or today. infer: panel_name from matched marker or context. extract: flag (H/L/HH/LL/A), ref_range_low/high and lab_name only when reported.

FASTING: fasting_status is 'fasting' or 'non_fasting' only when the user explicitly states it ("I fasted for this", "hadn't eaten"). Never infer it from time of day, a meal mention in notes, or a morning draw; omit the field (unknown) whenever it was not stated.

Submit all markers from a single lab visit in one call.

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": {
      "results": "<results>"
    },
    "name": "log_lab_results"
  }
}

Input Schema

NameRequiredDescriptionDefault
resultsYesEvery marker from the visit, in one call.

Output Schema

NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • changedInput schema / properties / results / description
      Previous value: -"Array of individual lab marker results. Required — submit all markers from the visit in a single call."New value: +"Every marker from the visit, in one call."
    • changedInput schema / properties / results / items / properties / date / description
      Previous value: -"Collection/draw date. Format: YYYY-MM-DD. Required."New value: +"Collection/draw date, YYYY-MM-DD."
    • changedInput schema / properties / results / items / properties / draw_id / description
      Previous value: -"Opaque label of your choosing to group this marker with others from the same draw, normalized server-side. See FASTING above. Optional."New value: +"Opaque label of your choosing that groups this marker with others from the same draw; normalized server-side. Only when adding a marker to a draw already logged in this conversation."
    • changedInput schema / properties / results / items / properties / fasting_status / description
      Previous value: -"See FASTING above. Optional, omit to leave unknown."New value: +"See FASTING; omit to leave unknown."
    • changedInput schema / properties / results / items / properties / flag / description
      Previous value: -"Lab flag: \"H\", \"L\", \"HH\", \"LL\", or \"A\". Optional."New value: +"Lab flag: \"H\", \"L\", \"HH\", \"LL\", or \"A\"."
    • changedInput schema / properties / results / items / properties / lab_name / description
      Previous value: -"Lab name (e.g. \"Quest Diagnostics\", \"LabCorp\"). Optional."New value: +"Lab name, e.g. \"Quest Diagnostics\", \"LabCorp\"."
    • changedInput schema / properties / results / items / properties / loinc_code / description
      Previous value: -"LOINC code from list_lab_markers. Include for all matched markers."New value: +"LOINC code from list_lab_markers; include for every matched marker."
    • changedInput schema / properties / results / items / properties / marker_name / description
      Previous value: -"Canonical name from list_lab_markers if matched; otherwise name as stated. Required."New value: +"Canonical name from list_lab_markers if matched, else the name as stated."
    • changedInput schema / properties / results / items / properties / notes / description
      Previous value: -"Additional notes. Optional."New value: +"Additional notes."
    • changedInput schema / properties / results / items / properties / panel_name / description
      Previous value: -"Panel name from list_lab_markers, or inferred. Required."New value: +"Panel name from list_lab_markers, or inferred."
    • changedInput schema / properties / results / items / properties / ref_range_high / description
      Previous value: -"Lab-reported reference range upper bound. Optional."New value: +"Lab-reported reference range upper bound."
    • changedInput schema / properties / results / items / properties / ref_range_low / description
      Previous value: -"Lab-reported reference range lower bound. Optional."New value: +"Lab-reported reference range lower bound."
    • changedInput schema / properties / results / items / properties / report_date / description
      Previous value: -"Report/result date, if stated separately from the collection date. Format: YYYY-MM-DD. See FASTING above. Optional."New value: +"Report/result date, YYYY-MM-DD, only when given separately from the collection date."
    • changedInput schema / properties / results / items / properties / result_comparator / description
      Previous value: -"For a result printed as an inequality such as \"<9\", give the number as result_value and the symbol here. Optional."New value: +"For a result printed as an inequality such as \"<9\": the number goes in result_value, the symbol here."
    • changedInput schema / properties / results / items / properties / result_unit / description
      Previous value: -"Unit of measurement (e.g. \"mg/dL\"). Optional but include if present."New value: +"Unit, e.g. \"mg/dL\"; include when present."
    • changedInput schema / properties / results / items / properties / result_value / description
      Previous value: -"Numeric result value. Required."New value: +"Numeric result value."
  2. Changed1 schema field changed
    • addedInput schema / properties / results / items / properties / result_comparator
      Added value: +{
      +  "description": "For a result printed as an inequality such as \"<9\", give the number as result_value and the symbol here. Optional.",
      +  "enum": [
      +    "<",
      +    ">",
      +    "<=",
      +    ">="
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / results / items / properties / draw_id / description
      Previous value: -"Groups this marker with others from the same draw. See FASTING above. Optional."New value: +"Opaque label of your choosing to group this marker with others from the same draw, normalized server-side. See FASTING above. Optional."
  4. Changed3 schema fields changed
    • addedInput schema / properties / results / items / properties / draw_id
      Added value: +{
      +  "description": "Groups this marker with others from the same draw. See FASTING above. Optional.",
      +  "type": "string"
      +}
    • addedInput schema / properties / results / items / properties / fasting_status
      Added value: +{
      +  "description": "See FASTING above. Optional, omit to leave unknown.",
      +  "enum": [
      +    "fasting",
      +    "non_fasting",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / results / items / properties / report_date
      Added value: +{
      +  "description": "Report/result date, if stated separately from the collection date. Format: YYYY-MM-DD. See FASTING above. Optional.",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent write scoped to a closed world, so the safety profile is covered. The description adds real behavioral context beyond that: a required two-step lookup workflow, a batching constraint (all markers from one visit in a single call), and strict data-integrity rules forbidding substituting report_date or today for collection_date and forbidding inferring fasting status. It stops short of describing duplicate handling or what happens if the same draw is logged twice.

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 purpose and routing before the workflow, and the labeled blocks (GLUCOSE ROUTING, REQUIRED WORKFLOW, FASTING) make it scannable despite its length. There is minor redundancy between "Submit all markers from a single lab visit in one call" and the schema's "Every marker from the visit, in one call," which is the only real waste.

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 nested write tool with an output schema, everything an agent needs to call it correctly is present: prerequisite lookup, match/no-match handling, date sourcing rules, fasting policy, unit and comparator handling, and batch submission. Return values are correctly omitted because an output schema exists.

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%, so the baseline is 3, but the description meaningfully exceeds it: it supplies the semantics behind the schema's "See FASTING" cross-reference, defines when collection_date versus report_date applies, specifies that panel_name may be inferred while flag/ref ranges/lab_name are extracted only when reported, and ties loinc_code and marker_name to list_lab_markers output.

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 ("Log one or more blood test or biomarker results") and immediately delimits scope against interpretation-only use and against log_wearable for glucose. An agent can distinguish this from siblings such as log_lab_results' neighbors 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 explicit positive conditions ("requested logging/import of lab values or a concrete result to record"), an explicit exclusion ("Review/interpretation alone: no write"), and a hard routing rule sending finger-stick/CGM/wearable glucose to log_wearable as blood_glucose_mg_dl. It also names the prerequisite tool, list_lab_markers, and prescribes a fallback when no marker matches.

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.