Skip to main content
Glama

Enriched bolus log

get_enriched_bolus_log
Read-only

Retrieve bolus records enriched with CGM, active settings, delivered vs programmed units, and calculator recommendations to investigate insulin stacking, dosing accuracy, interruptions, and overrides.

Instructions

Every bolus in the window, each enriched with the context needed to judge whether it was the right dose: the interpolated CGM value at the moment of delivery, and the ISF, carb ratio, target and DIA in force at that time.

Each record also carries delivered vs programmed units (delivered < programmed means the bolus was interrupted, flagged interrupted=true); the calculator recommendation broken into recCorrection, recCarbs and recTotal; whether the user overrode it (override: "above" or "below"); the bloodGlucoseInput and its source the calculator used; the bolus class; and isManual.

Use it to investigate insulin stacking, bolus-calculator accuracy, interrupted deliveries and user overrides. Filter with "classes" to pull only the bolus types you care about and keep the response small.

Capped to 92 days per call. All glucose values are in the configured unit; times are plain wall clock time (device-local), not UTC.

Returns: count, the classes filter applied, and a boluses array of enriched records (each with time, units, delivered, programmed, interrupted, recCorrection, recCarbs, recTotal, override, bgInput, bgSource, cgm_val, class, isManual, and a context object of the settings in force).

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": {
      "start": "<start>",
      "end": "<end>"
    },
    "name": "get_enriched_bolus_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesRequired. Window end as an ISO 8601 timestamp, e.g. 2026-06-20T00:00:00.000Z — plain wall clock time, same caveat as start (the "Z" is a format artifact, not a UTC claim). Treated as inclusive and must be after start. All timestamps returned by this API are likewise plain wall clock time, unconverted.
startYesRequired. Window start as an ISO 8601 timestamp, e.g. 2026-06-19T00:00:00.000Z. IMPORTANT: despite the trailing "Z", this is plain WALL CLOCK time, not true UTC — Glooko records only the literal date/time the patient's device showed, with no timezone attached. Use the patient's own wall-clock digits directly (no conversion): resolve "yesterday" or "last 3 weeks" straight into the matching wall-clock date and time. Treated as inclusive.
classesNoOptional filter. Array of bolus classes to include. Valid values (use these exact strings): "Meal Bolus" (carb-only dose), "Manual Correction Bolus" (user-initiated correction for a high), "System Correction Bolus" (algorithm-initiated correction), "Meal With Correction Bolus" (combined carb + correction dose), "Manual Meal Bolus" (user-entered carbs with a hand-set dose, not a calculator suggestion). Provide one or more to combine, e.g. ["Manual Correction Bolus", "System Correction Bolus"]. Omit or leave empty to return all classes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • changedInput schema / properties / classes / description
      Previous value: -"Optional filter. Array of bolus classes to include. Valid values (use these exact strings): \"Meal Bolus\" (carb-only dose), \"Manual Correction Bolus\" (user-initiated correction for a high), \"System Correction Bolus\" (algorithm-initiated correction), \"Meal With Correction Bolus\" (combined carb + correction dose). Provide one or more to combine, e.g. [\"Manual Correction Bolus\", \"System Correction Bolus\"]. Omit or leave empty to return all classes."New value: +"Optional filter. Array of bolus classes to include. Valid values (use these exact strings): \"Meal Bolus\" (carb-only dose), \"Manual Correction Bolus\" (user-initiated correction for a high), \"System Correction Bolus\" (algorithm-initiated correction), \"Meal With Correction Bolus\" (combined carb + correction dose), \"Manual Meal Bolus\" (user-entered carbs with a hand-set dose, not a calculator suggestion). Provide one or more to combine, e.g. [\"Manual Correction Bolus\", \"System Correction Bolus\"]. Omit or leave empty to return all classes."
    • changedInput schema / properties / classes / items / enum
      Previous value: -[
      -  "Meal Bolus",
      -  "Manual Correction Bolus",
      -  "System Correction Bolus",
      -  "Meal With Correction Bolus"
      -]New value: +[
      +  "Meal Bolus",
      +  "Manual Correction Bolus",
      +  "System Correction Bolus",
      +  "Meal With Correction Bolus",
      +  "Manual Meal Bolus"
      +]
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety needs no restating; the description instead adds real value with the 92-day per-call cap, the wall-clock (non-UTC) time convention, the delivered<programmed interruption semantics, and the override enumeration. However it does not say what happens at the cap (truncation vs error) or whether results are paginated, so mutation-free read behavior is only partly covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and well organized with short titled sections, but the record fields are effectively enumerated twice — once in prose ("recCorrection, recCarbs and recTotal") and again verbatim in the Returns block — plus a second restatement of the wall-clock caveat already in the schema. Some sentences could be cut without information loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description properly carries the return shape: count, applied classes filter, and a fully named boluses array with a context sub-object. An agent could call and interpret it correctly; the only looseness is the unspecified behavior at the 92-day cap.

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

Parameters3/5

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

Schema description coverage is 100% and the start/end wall-clock caveat and the classes enum are already fully documented in the schema, so the description correctly defers. It adds only the practical note that filtering by classes keeps the response small, which is marginal over the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a concrete verb+resource and scope ("Every bolus in the window") and immediately specifies the enrichment payload (CGM at delivery, ISF, carb ratio, target, DIA). It is unmistakably a bolus-detail tool rather than a summary, trend, or basal tool, but it never names the closest sibling (get_split_bolus_log) to draw the boundary explicitly.

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 states the investigative use cases — insulin stacking, calculator accuracy, interrupted deliveries, user overrides — and advises using the classes filter to shrink responses. It stops short of explicit "do not use this for X, use sibling Y instead" routing, so an agent still has to infer the split-bolus alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.