PodQuery
PodQuery gives Claude read-only clinical audit access to your synced Glooko / Omnipod 5 diabetes data, so you can ask plain-language questions and get summaries, trends, charts, and bolus/basal analysis on your own machine.
Overview summaries (
get_diabetes_summary) — TIR, GMI, CV, extremes, best/worst day and hour, insulin split, carbs, active settings over any uncapped window; also reveals the archive's full date range viareportRange.Bucketed trends (
get_trend) — day/week/month/quarter or fixed-length buckets, each computed independently from raw readings, with coverage/trustworthiness per bucket.Raw glucose readings (
get_glucose) — timestamped CGM points (capped to 21 days), filterable to hypos, hypers, in-range, or all.Interactive charts (
get_chart_html) — builds a clinical-report-style glucose chart, saves it and auto-opens it in your browser, with bolus markers, basal-state strip, day details, Chronological/Overlay toggle, and multi-windowrangescomparison.Plot-ready data (
get_chart_series) — downsampled points with min/max bands, bolus markers, and ready-made x-axis ticks/day segments for custom visualisations.Enriched bolus analysis (
get_enriched_bolus_log) — every bolus (capped 92 days) with CGM at delivery, active ISF/carb ratio/target/DIA, delivered vs programmed, calculator recommendations, and overrides.Circadian patterns (
get_hourly_trends) — TIR and average glucose pooled by clock-hour, plus time spent suspended/at max.Basal behaviour (
get_basal_delivery) — timeline of Omnipod 5 states (normal/suspend/max/limited) as intervals and summary percentages.Daily insulin totals (
get_daily_insulin) — Glooko's own basal/bolus/total per day, shown verbatim.Pump settings history (
get_settings_history) — every DIA, max basal, and time-segmented target/ISF/carb-ratio profile change in effect.Device events (
get_device_events) — pod and CGM sensor change timestamps as context.Meal window analysis (
get_meal_window_analysis) — 30 min before to 3 h after a bolus event, with glucose trace and related boluses.Per-call overrides — most tools accept optional
units,lower, andupperto override the configured display unit and target range for one question only.Built-in persona — a
clinical_auditorprompt ("Tough Love Endocrinologist") that frames the analysis.Constraints to note — all timestamps are plain wall-clock (non-UTC) despite the trailing "Z"; data is local-only; it is not medical advice.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PodQuery How was my time in range last month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PodQuery — Clinical Audit Tool for Claude Desktop
Connect your Glooko / Omnipod 5 diabetes data directly to Claude, and let it do the analysis.
Not medical advice. This tool is for understanding your data and helping you ask better questions of your diabetes care team. It is not a medical device and must never be used to make changes to your therapy. See the full disclaimer.
This is theMCPB (MCP Bundle) edition, built exclusively for Claude Desktop. It replaces the earlier Docker-based version of this project (which also supported Open WebUI and a raw web API) with a single .mcpb file you install with one click: no Docker, no terminal, no editing config files by hand. If you need the multi-platform Docker version instead, see the original web app or an earlier tag of this repository.
Early proof-of-concept (v0.2.2). PodQuery is under active development. The core tools and data pipeline are working end to end (this is my own real data behind the bundled sample set), but interfaces, defaults, and tool behaviour may still change between releases. Feedback and issues are very welcome.
Allergic to instructions? Let an AI do the talking. 🤖 Paste this conversational setup prompt into any AI assistant and it'll walk you through installing and configuring the extension at your own pace.
📖 Table of Contents
Related MCP server: Diabetes:M MCP Server
🌟 What is PodQuery?
PodQuery is a bridge between your diabetes data and Claude. It packages as an MCPB (MCP Bundle) — Claude Desktop's one-click local extension format — so installing it is a single double-click, and there is no separate server, container, or config file for you to manage. No copying and pasting data between a website and an AI, and no API costs.
You simply talk to Claude. Ask a question in plain language, and Claude reaches into your data through the tools this extension provides, pulls exactly what it needs, and analyses it for you, all within the conversation.
You ask things like:
"How was my time in range last month?"
"Why do I keep going high in the evenings?"
"Show me my worst day and tell me what happened."
🚀 What does it actually do?
PodQuery exposes your diabetes history as a set of analytical tools Claude can call:
Summaries and trends: time in range, GMI, variability, best and worst days and hours, basal/bolus balance, over any period you ask about.
High-fidelity CGM data: every 5-minute reading is captured, so no spike or dip is missed, but Claude is guided to pull aggregates first and only fetch raw readings when it genuinely needs them.
Ready-made visual charts: a clinical-report-style glucose chart, opened directly in your browser, with hoverable bolus markers and a per-day breakdown, not just numbers in a table.
Enriched bolus analysis: each bolus is matched with the glucose at the time and the pump settings (ISF, carb ratio, target) that were active, so Claude can judge whether a dose made sense.
Omnipod 5 behaviour: when the algorithm was suspending, running at max, or running blind after losing signal.
Claude does all of this itself, live, by calling these tools while it talks to you.
The "Aha!" Moment
This project started with a personal frustration. While trying to integrate my diabetes data into a Home Assistant dashboard, I discovered that the wealth of historical data stored in Glooko (especially from the Omnipod 5) is a goldmine. I realised that if I gave that data to an AI assistant and let it query the data directly, it could uncover patterns that months of manual logging never showed.
Why I Built This
I built this to put the power back into the hands of the patient. We often only get 15 minutes with a consultant every few months. This tool lets you:
Be Proactive: spot trends before your next appointment.
Be Private: your data and credentials stay on your own machine.
Be Instant: one click to install, no infrastructure to run.
👤 Who This Is For
This project is built for people who use the Omnipod 5 hybrid closed-loop insulin delivery system and sync their data to Glooko. If that is not you, you can still explore the project using the three months of built-in sample data (my data) — no Omnipod 5 or Glooko account required for that path.
Prerequisites
Claude Desktop — free download from claude.ai/download. This extension only runs inside Claude Desktop (macOS or Windows); it is not a standalone server and does not work with Claude on web or mobile.
To analyse your own data: an Omnipod 5 and a Glooko account with it synced. Not required to try the tool with the sample dataset.
Nothing else. No Docker, no Node.js install, no terminal.
🔒 Privacy & Security: Your Data, Your Control
Because this involves sensitive medical credentials and data, it is designed with a "local-first" architecture.
No Middle Man: your Glooko username and password never leave your machine. They are sent directly from this extension to Glooko's servers. No third-party server, and not Anthropic, ever sees them.
It runs on your computer: the extension process, the local database, and the analysis tools all run inside Claude Desktop, entirely on your machine.
Your credentials are stored by Claude Desktop's own secure settings storage (the password field is marked sensitive in the extension's configuration), not in a plain-text file.
Because you're talking to Claude (a cloud AI) about this data, most providers have a setting that allows them to "train" on your conversations. Before discussing your clinical data, consider turning off chat history / model training in Claude's privacy settings, so your medical history stays private.
Want to try it before connecting your own account? This extension ships with a smallbuilt-in sample database of real data (three months, mine) so you can explore everything offline, with no Glooko login and no network access at all, from the moment you install it.
🧐 The "Tough Love" AI Persona
The tool ships with a built-in AI persona: a "Tough Love" Endocrinologist.
Managing Type 1 Diabetes is hard, and placating a user doesn't improve Time in Range. The persona is direct, analytical, and uncompromising. It won't sugar-coat the data; it will tell you where your bolus timing is off, where you are over-correcting, or where your basal is failing to catch a drift. It is also built to work efficiently, pulling summaries first and only drilling into granular data when it needs to.
Once installed, this persona is available as a selectable prompt called "Clinical auditor persona" in Claude's prompt/attachment menu. Selecting it is what turns Claude into the endocrinologist.
Its directness is a deliberate style, not authority. Everything it says is to help you understand what is happening and ask better questions of your diabetes care team. It does not, and should not, tell you to change settings such as your DIA or carb ratios. Any change to your therapy is a conversation for you and your healthcare professional.
🛠️ Installing the Extension
Download the
.mcpbfile from this repository's Releases page (or build it yourself — see Building the .mcpb Yourself).Install it, using any of these (all equivalent):
Double-click the downloaded
.mcpbfile.Drag and drop the
.mcpbfile into the Claude Desktop window.In Claude Desktop: Settings → Extensions → Advanced settings → Install Extension…, then select the
.mcpbfile.
Claude Desktop shows an install screen listing what the extension can do and the permissions it needs. Review it, then confirm.
You'll land on the extension's settings screen next — see Configuring Your Settings below. You can also always get back here later from Settings → Extensions → PodQuery.
That's it — there is no separate build step, no container to start, and nothing to keep running in a terminal. Claude Desktop starts the extension's process on demand and stops it when it's not needed.
Exact menu wording in Claude Desktop can change between versions. If something doesn't match exactly, look for the nearest equivalent (an "Extensions" or "Connectors" area in Settings is the right place either way).
⚙️ Configuring Your Settings
Claude Desktop generates a settings form for this extension automatically — there is no .env file to create or edit by hand. Most fields arrive pre-filled with sensible defaults and marked required, so the form can't be saved empty; you can accept the defaults as-is and start using the extension immediately against the bundled sample data, or adjust any of them to match your own setup. Only the Glooko email and password are optional — leave both blank to stay in offline sample-data mode.
Setting | What it does |
Glooko email / Glooko password | Your Glooko login. The only two optional fields. Leave both blank to run in offline mode against the built-in 3-month sample dataset — no account needed, and Glooko is never contacted. Fill both in to download and keep your own data up to date. The password field is masked and stored securely by Claude Desktop. |
Glooko account's glucose unit | The unit your Glooko account delivers data in ( |
Display unit | How you want to see glucose: |
Low (hypo) boundary / High (hyper) boundary | Your target range, in the display unit above. Defaults to 3.9 / 10.0, which are mmol/L values. Every tool uses these by default; you (or Claude) can still ask about a different one-off threshold without changing this. |
History to load on first run | Only used once a Glooko login is set (ignored in sample-data mode). Defaults to |
Data folder | Where the extension keeps its local database of downloaded data. Defaults to your Documents folder (a small |
If you set Display unit to mgdl, update the Low/High boundaries too. They default to 3.9 / 10.0, which are mmol/L values, and are not automatically converted when you switch units. For mg/dL, the equivalent target range is typically around 70 / 180 — adjust to whatever your care team has set for you.
Trying it with the sample data (no Glooko account)
Just leave the Glooko email and password blank and save; the rest of the fields can stay on their defaults. The extension serves the built-in 3-month sample database (the author's own real data, shared on purpose) and never contacts Glooko or the network.
Using your own Glooko data
Fill in your Glooko email and password, set the Glooko account's glucose unit to match your actual Glooko account, and set your preferred display unit and target range. Your first question afterwards triggers a one-time download of your history (a few seconds to about a minute depending on how far back you asked it to go); after that, data is stored locally and answers are fast.
💬 Using It
Start a chat in Claude Desktop.
Make sure the PodQuery extension/connector is enabled for the conversation (Claude Desktop surfaces installed extensions in its tools/connector picker).
From the prompt menu, select the "Clinical auditor persona" prompt for the full tough-love audit experience — or just ask a question directly; the tools work either way.
Ask away. A good first question:
"Tell me about my diabetes data."
Claude pulls the data and gives its interpretation. You can then discuss the findings, ask follow-ups, drill into a specific day or excursion, or ask for a chart — PodQuery opens a real, interactive glucose chart directly in your browser rather than just describing numbers.
🔁 Switching from the Sample Data to Your Own
If you started with the sample data and now want to connect your real Glooko account:
Open Settings → Extensions → PodQuery.
Fill in your Glooko email and Glooko password, and set the other fields to match you (see Configuring Your Settings).
Delete the existing database so the sample data isn't mixed with yours: open the Data folder you configured (or its default, your Documents folder) and delete the
PodQuerysubfolder inside it.Ask a question. The extension downloads your own history into a fresh archive on that first query.
🛠️ Troubleshooting
This section will grow over time. If you hit something not covered here, please open an issue and I'll help.
The extension's tools don't show up in a chat. Check that the PodQuery extension is enabled for the current conversation in Claude Desktop's tools/connector picker, and that it's still enabled in Settings → Extensions.
I asked about a date and got nothing back.
If you're running against the sample data (Glooko fields left blank), only its date range is available. Ask Claude what date range it holds first, or ask for get_diabetes_summary over a very wide window and read reportRange.
Claude seems to be running old behaviour after I updated the extension.
Reinstall the newer .mcpb (Claude Desktop will offer to update in place); if a stale answer persists, start a fresh conversation so tool descriptions are re-read.
The extension won't start / shows an error. Open Settings → Extensions → PodQuery and check the configured Glooko credentials are correct (or both blank for offline mode), and that the configured Data folder is a location Claude Desktop can write to.
Wrong-looking glucose numbers after connecting my own account. Double-check "Glooko account's glucose unit" matches what your actual Glooko account is set to, not what you'd prefer to see (that's the separate "Display unit" field). A mismatch here corrupts how incoming readings are interpreted; if you already have data ingested under the wrong setting, clear the database (see Switching from the Sample Data to Your Own) and let it redownload correctly.
My Low/High boundaries look wrong after switching to mg/dL. The Low/High boundary fields don't auto-convert when you change Display unit — see the warning in Configuring Your Settings. Update them by hand to match your unit.
A chart didn't open in my browser. PodQuery tries to auto-open the chart file in your OS's default browser; if that fails (no recognised default-browser command on your machine), Claude will tell you the file path instead — open it manually. This is rare and typically only affects unusual system configurations.
📬 Get in Touch
Whether you're stuck on install or want to share how the audit improved your Time in Range, I'm happy to help.
Technical Help
If something isn't working, please Open an Issue so others can benefit from the solution too.
Personal & Professional
Privacy Reminder: if you send me a screenshot for support, please blur out any private medical information or Glooko credentials first.
🔌 Tool Reference
These are the MCP tools this extension registers with Claude. You never call them directly — Claude calls them for you while you chat — but this is useful if you want to understand exactly what Claude can (and can't) see, or why it asked a particular follow-up.
A note on timestamps
All timestamps these tools use are plain wall-clock time formatted as ISO 8601, e.g. 2026-01-01T00:00:00.000Z — despite the trailing "Z", these are NOT true UTC. Glooko records only the literal date/time your device displayed at the moment of each reading, with no timezone or offset attached, so a reading is stamped with wherever you physically were when it happened. This means no timezone conversion ever happens in either direction: Claude resolves your relative phrasing ("yesterday", "last 3 weeks") straight into matching wall-clock digits, and presents times in results exactly as returned, unconverted. The one tradeoff: if you travel across time zones, the archive has no record of which zone a given reading belongs to, so there's no way to reliably compute things like "how many hours ago" across a change of zone — the data is still exactly what your device showed, just without an attached zone.
A note on glucose units
Most tools accept optional units, lower, and upper parameters. If Claude omits them, the values you configured in the extension's settings (display unit and target range) are used. Claude only passes them to override the defaults for a single question — for example, to check time below a different threshold without changing your normal target.
Tools
Tool | Purpose |
| The best starting point for any overview question. Fixed-size aggregates over any window, so it's cheap even across months or years. A deliberately wide call is also how Claude discovers the full date range your archive holds ( |
| Splits a span into time buckets (day/week/month/quarter, or fixed-length) and computes each independently from raw readings, for "how have things changed month by month" style questions in one call. |
| Individual timestamped CGM readings for a window, capped to 21 days, optionally filtered to |
| The primary way to see a chart. Builds a full clinical-report-style glucose chart (colour-coded in-range/low/high trace, shaded target band, min/max spread, bolus markers hoverable in their own right, a colour-coded basal-state strip along the bottom showing when the algorithm was normal, suspended, at max or limited, header stats, legend, tooltips), saves it to a file, and opens it directly in your browser. Accepts a |
| Glucose downsampled to a target number of points for plotting, with a min/max band per point so spikes aren't lost, plus bolus event markers. Returns raw chart data rather than a rendered page — used when Claude needs to build a custom visualisation itself, rather than the ready-made chart |
| Every bolus in a window (capped to 92 days), enriched with the interpolated CGM value at delivery and the ISF/carb-ratio/target/DIA active at that moment, plus delivered-vs-programmed and calculator overrides. Filterable by bolus class. |
| Time in range and average glucose pooled by clock-hour across a window — useful for the dawn phenomenon, consistent evening highs, and other time-of-day patterns. Each hour also shows how much of that hour the Omnipod 5 algorithm spent suspended or at max. |
| What the Omnipod 5 algorithm was doing with basal delivery over time, as behavioural states ( |
| Glooko's own per-day basal/bolus/total insulin totals, shown verbatim, for a day-by-day table or total-daily-dose figures. |
| Every Omnipod 5 setting change in force during a window: DIA, max basal rate, and the time-segmented target/ISF/carb-ratio profiles. |
| Pod change and CGM sensor change timestamps — context only, never asserted as a cause of nearby glucose disruption. |
| A focused look at one meal or bolus event: 30 minutes before to 3 hours after, with the glucose trace and any boluses in that window. |
There's also one MCP prompt, clinical_auditor ("Clinical auditor persona" in Claude's UI) — see The "Tough Love" AI Persona.
How the code is organised
(For developers reading the source. If you just want to use the tool, you can ignore this.)
The data flows: Glooko → sync → store → range → analytics → tools → Claude.
manifest.json— the MCPB manifest: what Claude Desktop reads to install the extension, what settings it asks the user for, and how it launchessrc/server.js.src/env.js— sanitizes theuser_config-derived environment variables Claude Desktop injects, before anything else reads them. Must be the first import inserver.js; see the file's own header comment for the specific Claude Desktop quirk it works around.src/server.js— the MCP server and the tool definitions (what Claude Desktop launches over stdio). Thin wrappers around the analytics.src/analytics.js— the heart: all the clinical maths and data shaping, written as pure functions.src/chartHtml.js— renders the self-contained HTML pageget_chart_htmlwrites to disk: chart geometry, colour-coding, day segmentation, tooltips, and the Chronological/Overlay toggle all live here.src/store.js— the SQLite archive (normalised rows, not raw Glooko blobs), backed by sql.js — a pure WebAssembly build of SQLite. This was chosen deliberately over Node's built-innode:sqliteor a native addon likebetter-sqlite3: as an MCPB, this server can be launched on macOS or Windows by whatever Node runtime Claude Desktop bundles, with no build step and no way to know its exact version ahead of time. A pure-WASM engine behaves identically everywhere Node runs. The one tradeoff is that sql.js is in-memory only, sostore.jsre-serialises the archive to disk itself after each write batch, rather than relying on SQLite's own file-backed journal.src/paths.js— resolves where the archive lives (the user's configured "Data folder", defaulting to their Documents folder) and seeds the bundled sample database into place on a fresh, offline install.src/range.js— the layer the tools call; answers from the local archive and tops up from Glooko only when needed. Offline mode is gated here.src/sync.js— the engine that pulls Glooko data into the archive (cold start, top-up, startup warm-up).src/glooko.js— the Glooko API client (auth and fetching). Unchanged from the original project — all the Glooko download-and-store functionality remains exactly as before.src/prompt.js— the clinical-auditor persona.
A few invariants hold throughout: glucose is stored internally in one canonical unit (mmol/L) and only converted on output; bolus is summed from individual events while basal comes from Glooko's daily totals; all times are plain wall-clock time, not UTC (see "A note on timestamps" above); and per-day rates use the real observed span of data.
🏗️ Building the .mcpb Yourself
You don't need to do this to use the extension — download the released .mcpb instead. This is for anyone who wants to build from source, audit the code before installing, or make changes.
git clone https://github.com/rilhia/podquery-mcp.git
cd podquery-mcp
npm install --omit=dev # installs runtime dependencies, including sql.js, into node_modules
npm install -g @anthropic-ai/mcpb
mcpb pack # produces podquery-mcp.mcpb in this folderThe repo also ships an .mcpbignore that trims repo-only content (docs, the GitHub README banner, unused sql.js build variants, and similar) from the packed bundle — you shouldn't need to touch it, but it's worth a look if you're curious what mcpb pack includes and why.
Then install the resulting .mcpb file as described in Installing the Extension. See the MCPB specification for how the bundle format works.
📄 License
This project is released under the MIT License — you are free to use, modify, and distribute it, including for commercial purposes, provided the copyright notice and licence text are retained. See the LICENSE file for the full text.
The MIT licence covers the code. The bundled sample database is the author's own data, shared for exploration; please be considerate in how you use it.
Disclaimer
This tool is for informational and educational purposes only. It is not a medical device and is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions regarding a medical condition. Any analysis produced with the help of this tool, including AI-generated suggestions, must be reviewed with a qualified clinical professional before making any changes to your insulin therapy or medical regimen.
Available Tools
12 toolsget_basal_deliveryBasal delivery state timelineA
What the Omnipod 5 was doing with basal over time: delivering normally, pausing it (suspend), running at its ceiling (max), or running blind on a fixed preset because it lost CGM signal (limited).
IMPORTANT: these are STATES describing the algorithm's behaviour, NOT insulin amounts. "suspend" means paused, "max" means at the ceiling; neither is a number of units. (For basal units, use get_daily_insulin.)
Use it to investigate lows (was basal already suspended beforehand?), rebound patterns (max, then suspend, then a low), how hard the system is working, and whether excursions coincided with limited mode (algorithm not adjusting at all).
Times are plain wall clock time (device-local), not UTC. Capped to a generous span since it returns collapsed intervals, not raw points.
Returns: a summary of minutes and percentage per state (normal/suspend/max/limited) and, unless includeIntervals is false, an intervals array (state, start, end, minutes).
Inputs: end (required), start (required), includeIntervals.
get_chart_htmlOpen a clinical glucose chart in the browserA
Generates a clinical-report-style glucose chart for a window (or several separate windows via ranges) — line trace colour-coded in-range/low/high, a shaded target-range band, a min/max spread band, bolus markers (hoverable in their own right for that bolus's units/ carbs/type, in addition to the aligned CGM reading's own tooltip), a header stat row (time in range, average glucose, time low, time high), a colour-coded strip along the bottom of the chronological chart showing the Omnipod 5 basal state over time (normal, suspended, at max, limited; states, not insulin units; the hover tooltip and data table also name the state at each reading), a legend, and hover tooltips — saves it to a file, and opens it directly in the patient's default web browser. USE THIS instead of get_chart_series whenever the patient wants to SEE a chart.
Multi-day charts open with a Chronological/Overlay toggle: chronological is the usual continuous timeline; overlay re-plots every calendar day on a shared 0-24h axis (colour-coded per day, with a day legend) so days can be compared directly. Use ranges instead of start/end when the patient wants to compare specific, possibly non-contiguous dates together (e.g. "the 20th, 23rd and 30th") — every requested day gets equal width on the axis regardless of the calendar gap between them. The page also has a day-filter chip per day (in both views) so the patient can hide/show individual days themselves, with the header stats recalculating for whichever days are still visible — you never need a new call just to compare a subset of the days already shown.
The page also includes a "Day details" panel per calendar day (open by default for a single day, collapsed for multiple), with that day's full glucose control (average, GMI, TIR/low/high, std dev, CV), extremes (highest/lowest with times), best/worst hour, insulin (bolus units/count/ avg, basal units, bolus-basal split), basal delivery (minutes and share in each algorithm state, longest suspend and max runs), bolus type counts, carbs, and the settings in force — the SAME figures get_diabetes_summary would return for that single day, computed by the identical aggregator so the two never disagree. Hiding a day's filter chip hides its detail panel too.
DATA RESOLUTION: a routine call (no resolution/maxPoints given) already plots every single CGM reading with NO smoothing for a typical window (a day, a week, a full month) — the point budget only kicks in on wider windows, where it keeps each bucket's true min/max so no low or high excursion is ever smoothed away, only the moment-to-moment trace between them is thinned. When a call DOES get thinned this way, the result includes a downsample object naming the raw vs plotted reading counts — treat that as an invitation to offer the patient a choice, not as data that has become unavailable: mention it in plain terms ("I plotted a lightly smoothed version of this wide a window — want the full-detail version instead? It may take a little longer to load") and, if they want more detail, re-call with resolution set to how much of the real data to use — 1 for every single reading, 2 for every other one, 3 for every third, and so on. Never decide this smoothing tradeoff silently on the patient's behalf beyond the routine default.
CRITICAL — how to respond after calling this, this is what keeps it fast: this tool does the displaying itself. Do NOT copy, re-type, rebuild, or paste the chart as an artifact/code block/canvas yourself — reproducing a large HTML page as your own output is exactly the slow path this tool exists to avoid, and it is unnecessary work since the browser window is already open by the time you respond. If the JSON result has openAttempted: true, just tell the patient in one short sentence that the chart has opened in their browser — do not describe or restate its contents in detail, do not emit any HTML/code, and treat the tool call as already complete. If openAttempted: false, the auto-open could not be launched from this machine (e.g. no recognised default-browser command) — tell the patient to open the file at the returned filePath themselves; only in that fallback case, or if embedHtml was explicitly requested, does the response also include a full html field. Do NOT reach for a quick/built-in "auto-visualize this data" shortcut either — this tool already produces the real chart.
Times are plain wall clock time (device-local), not UTC.
Returns: ranges (the resolved windows actually used), dayCount, unit, pointCount, bolusCount, filePath (where the page was saved), openAttempted (whether the browser launch was attempted without an immediate error), downsample (only present when the plotted points were thinned from the raw CGM readings — see DATA RESOLUTION above), and — only as a fallback — html.
Inputs: end, lower, start, units, +5 more.
get_chart_seriesDownsampled series for plottingA
Glucose downsampled to a target number of points for drawing a chart, with a min/max band per point so spikes are not lost, plus bolus events as overlay markers.
Use this whenever the patient wants a GRAPH or CHART of glucose over a window, or when illustrating "what a good/bad day looked like" — a picture of the trace is far more useful here than a table of numbers. It returns a few hundred points instead of every 5-minute reading, so it is far cheaper than get_glucose and a chart cannot show more points than its pixel width anyway. Reserve get_glucose for close-up numeric inspection of a short window, not for wide charts.
IMPORTANT — this tool returns DATA, not a picture: after calling it, actually render the points as a visual line/area chart with time on the x-axis and glucose on the y-axis, shading the target range and marking boluses, rather than only describing the numbers in prose. Producing that chart is the point of calling this tool at all.
HOW TO RENDER IT — DO NOT use a quick/built-in auto-chart shortcut for this: any lightweight "visualize this data" feature that infers its own axis from a plain array almost always falls back to plotting by point POSITION (1, 2, 3, ...) because it never looks at the t field or the xAxis data below — this has been confirmed to happen and produces a meaningless, unlabelled time axis. Instead, BUILD A CUSTOM CHART YOURSELF (e.g. an HTML/SVG or JS-charting-library artifact you write) where you explicitly control the x-axis scale and can use the xAxis data below directly. If your environment offers both a quick chart shortcut and the ability to write custom HTML/code, always choose the custom option for this tool's output.
X-AXIS — READ THIS CAREFULLY, this is commonly gotten wrong: the x-axis MUST be a genuine TIME SCALE, NEVER a plain category/index axis showing point position (1, 2, 3, ... maxPoints, or "286"). Points are NOT evenly spaced in time (a sensor gap or the short-fidelity path below means the interval between consecutive points can vary), so an index axis silently distorts time and every tick is meaningless to the reader.
To make this hard to get wrong, the response includes a ready-made xAxis object — USE IT DIRECTLY instead of inventing your own tick scheme:
xAxis.ticks: an array of {t, label} already spaced sensibly for the window's span (every 3-4 hours for anything up to ~10 days, daily beyond that). Plot these as the x-axis tick marks, usinglabelas the tick text VERBATIM — do not recompute your own tick positions or labels.xAxis.days: one {startT, endT, label} entry per calendar day the window touches (e.g. "Wed 17 Jun"), present whenever the window spans more than a single day. For a multi-day chart, this is what makes it read correctly: divide the plot into these segments with a vertical divider at each boundary, and print each segment'slabelcentred underneath — e.g. three equal sections labelled "Wed 17 Jun", "Thu 18 Jun", "Fri 19 Jun" for a 3-day window, each showing that day's own hour ticks above it. This is exactly the "N equally spaced, dated sections" layout a multi-day glucose chart needs.daysis empty for a single-day window (nothing to divide) and for very long windows (too many days to label individually —ticksswitches to one date label per tick there instead).A gap in the data (missing points) must still show as a visual gap or interrupted line against this time scale — never compressed away.
Glucose values are in the configured unit; times are plain wall clock time (device-local), not UTC.
Returns: unit, a points array (t, avg, min, max, n per point), an events array of bolus markers for overlay, and xAxis (spanHours, ticks, days) as described above.
Inputs: end (required), start (required), maxPoints.
get_daily_insulinDaily insulin totals (Glooko per-day figures)A
Glooko's own per-day insulin totals shown verbatim: basal units, bolus units and the combined total for each day, plus a window aggregate.
Use this when you specifically want the device-reported daily totals (for example a day-by-day basal/bolus table, or "what was my total daily dose each day"). Note: the bolus here is Glooko's pre-aggregated daily figure. For bolus aggregated from individual events (the project-wide method used everywhere else), use get_diabetes_summary or get_trend. Basal is only available from Glooko, so this and those tools share the same basal source.
The most recent day may be flagged provisional if it is still today and not yet finalised.
Returns: source ("glooko-daily"), a days array (date, basalUnits, bolusUnits, totalUnits, provisional), and an aggregate (daysWithData, basalUnits, bolusUnits, totalUnits, basalUnitsPerDay, bolusUnitsPerDay, totalUnitsPerDay, basalPercent). All dates are wall-clock (device-local) days.
Inputs: end (required), start (required).
get_device_eventsPod and CGM sensor changesA
Pod changes (the Omnipod is replaced roughly every 3 days) and CGM sensor changes, as timestamped events, kept as two separate lists.
These are point-in-time markers, not amounts. They are most useful as CONTEXT for nearby glucose disruption: a fresh pod can run high for the first hours while the cannula settles, and a new sensor can read erratically while it warms up. Use them to check whether an unexplained high or a run of odd readings lines up with a recent change. Treat any such link as a possible contributing factor, never assert it as the cause.
Times are plain wall clock time (device-local), not UTC.
Returns: podChanges and sensorChanges arrays of wall-clock timestamps, plus a count for each.
Inputs: end (required), start (required).
get_diabetes_summaryDiabetes summary for a windowA
The single best starting point for any overview question ("how was my control yesterday / over the last 3 weeks / last 6 months"). Returns fixed-size aggregates no matter how long the span, so it is cheap to call over months and tolerates very long windows.
TIP: because this tool is uncapped, a deliberately wide call (e.g. start 2000-01-01T00:00:00.000Z, end tomorrow) is the quickest way to discover how much data the system actually holds: the returned reportRange.start and reportRange.end are the first and last readings present in the archive. Use it as an orientation call before drilling into a specific period.
Insulin uses the project-wide rule: bolus is summed from individual events; basal comes from Glooko's per-day totals. The basal/bolus split is reported as percentages on a per-day-rate basis (a useful balance metric for a closed-loop system). GMI and CV are computed from the CGM readings.
Best/worst day and hour are ranked decisively: Time In Range first, then closeness to the glucose target in force at each reading (median absolute deviation), then variability, and each carries those figures so the ranking is explainable.
Returns: reportRange (start, end, days, reflecting the actual data present), glucoseControl (averageBG, gmiEstimatedA1c, stdDev, coefficientOfVariation, variability flag, timeInRange/timeLow/timeHigh, cgmReadingCount); glucoseExtremes (highest and lowest readings, each with every timestamped instance); bestWorst (bestDay, worstDay, bestHour, worstHour, each with tir, medianAbsTargetDev, cv); insulin (observedDays, bolusUnits, bolusUnitsPerDay, bolusEventCount, avgUnitsPerBolus, and when Glooko daily data exists basalUnits, basalDayCount, averageBasalUnitsPerDay, basalPercent, bolusPercent); bolusArchitecture (counts by bolus type); carbs (carbsGrams, carbsPerDay, carbEntryCount); settings (the time-segmented profiles in force); and basalDelivery (how the Omnipod 5 algorithm spent the window: minutes and percent in each state normal/suspend/max/limited, the longest suspend and longest max run, and the hour of day where suspend and max are most common. These are STATES, not insulin units; use get_basal_delivery for the timeline). All timestamps are plain wall clock time (see start/end parameter notes), not UTC.
Inputs: end (required), start (required), lower, units, +1 more.
get_enriched_bolus_logEnriched bolus logA
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).
Inputs: end (required), start (required), classes.
get_glucoseGlucose readings for a window (filterable by band)A
Individual timestamped CGM readings for a window, optionally filtered to just the part of the range you care about.
The "band" option decides which readings come back: "low" (below the low boundary, i.e. hypos), "high" (above the high boundary), "target" (in range), or "all" (every reading, each tagged with its band). Use "low"/"high" to pull only excursions for a close look without dragging in thousands of normal readings; "all" gives the full trace.
This returns raw points, so it is capped to 21 days. For a wide chart use get_chart_series (downsampled); for aggregate stats use get_diabetes_summary or get_trend rather than computing over a raw array yourself.
Glucose values are in the configured unit; times are plain wall clock time (device-local), not UTC.
Returns: window, thresholdsUsed (lower, upper, unit), the band requested, count, and a readings array (time, value, velocity, plus band when band="all").
Inputs: end (required), start (required), band, lower, +2 more.
get_hourly_trendsHourly (circadian) trendsA
Time In Range and average glucose pooled by clock-hour across the whole window, so every reading that fell in the 07:00 hour on any day is combined into one 07:00 row, and so on for all 24 hours.
Use it for "why am I always high/low at a certain time" questions, recurring circadian patterns, the dawn phenomenon and evening highs.
Hours are the device's own wall-clock hour (not UTC) — this already IS the patient's local hour at the time each reading was taken, so present it as-is with no conversion.
Returns: a byHour array of up to 24 rows, each with hour (wall clock, "HH:00"), averageBG, timeInRange, timeLow, timeHigh and the reading count for that hour. When basal-state data exists, each row also has a "basal" object: the share of observed time in that hour spent in each Omnipod 5 algorithm state (normalPercent, suspendPercent, maxPercent, limitedPercent, plus observedMinutes). These are STATES, not insulin units, pooled across days like the glucose figures, so "suspendPercent 40 at 03:00" means basal was paused for 40% of the 03:00 hours observed. Glucose values are in the configured unit.
Inputs: end (required), start (required), lower, units, +1 more.
get_meal_window_analysisPost-meal target window analysisA
A focused look around a single event (typically a meal bolus): exactly 30 minutes before and 3 hours after the timestamp you pass.
Use it to judge a post-meal excursion and how well a dose worked, without pulling whole days. Find the event time first (e.g. from get_enriched_bolus_log), then pass it here.
Glucose values are in the configured unit; times are plain wall clock time (device-local), not UTC.
Returns: targetEvent (the timestamp you passed), unit, a glucoseTimeline array (time, value) across the window, and an associatedBoluses array of enriched bolus records that fall in the window.
Inputs: eventTimestamp (required), units.
get_settings_historyPump settings historyA
Every Omnipod 5 setting change that was in effect during the window, in chronological order: DIA, max basal rate, and the time-segmented target, ISF and carb-ratio profiles.
Use it to establish which settings were active at a given time (essential before judging a bolus or an excursion), or to see how settings have been adjusted over a long span.
Glucose-based values (target, ISF) are in the configured unit. Effective timestamps are plain wall clock time (device-local), not UTC; the per-segment "from" times are pump-schedule clock-hours.
Returns: a settings array, each entry with its effective timestamp, DIA_hours, maxBasalRate, and the targetBg, isf and carbRatio profiles (each a list of {from, value} time segments).
Inputs: end (required), start (required).
get_trendBucketed trend over any timeframeA
Glucose, insulin and carb aggregates split into time buckets across a span, for "how have things changed month by month over the last year" style questions.
Each bucket is computed independently from the raw readings (not by averaging averages), so a year split by month returns 12 correct rows in a single call without pulling raw data back to you. Prefer this over making many separate summary calls for a multi-period comparison.
Insulin per bucket follows the same rule as elsewhere: bolus is summed from individual events; basal comes from Glooko's per-day totals. Each bucket also reports observedDays (the real decimal span of data in it) and a coverage percentage, so you can judge which rows to trust.
Returns: bucketCount and a buckets array. Each row has: bucket (period key), start, end, observedDays; glucose (avg, timeInRange, timeLow, timeHigh, stdDev, coefficientOfVariation, gmiEstimatedA1c, cgmReadingCount); insulin (bolusUnits, bolusUnitsPerDay, bolusEventCount, avgUnitsPerBolus, and when Glooko daily data exists basalUnits, basalDayCount, averageBasalUnitsPerDay, basalPercent, bolusPercent); carbs (carbsGrams, carbsPerDay, carbEntryCount); and coverage (cgmReadingCount, expectedReadingCount, coveragePercent, trustworthy).
Inputs: end (required), start (required), mode, lower, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a largely distinct purpose, and the descriptions actively cross-reference one another (e.g. summary vs trend, glucose vs chart_series, daily_insulin vs event-summed bolus). The main risk is the pair get_chart_html (renders/displays a chart) vs get_chart_series (returns chart data), which both target charting and could be misselected, though the text strongly differentiates them.
All twelve tools follow a single consistent snake_case get_<noun> pattern (get_glucose, get_trend, get_basal_delivery, get_chart_series, etc.). There are no verb-style or case-style deviations anywhere.
Twelve tools sit squarely in the well-scoped 3-15 range and each covers a distinct resource or aggregation on the diabetes domain. Nothing appears redundant or bolted-on.
The surface comprehensively covers the domain: raw and aggregate glucose, bolus (enriched), basal states, per-day insulin totals, carbs, settings history, device events, meal-window drill-down, and both data and rendered chart outputs. Read-only scope is appropriate for a query server, so no meaningful lifecycle gaps exist.
Maintenance
Related MCP Connectors
Your lab results and health record in Claude: trends, retests, meds, conditions and symptoms.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Ask Claude, ChatGPT or Cursor about your Apple Health data: workouts, sleep, food. Read-only.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables access to FreeStyle Libre glucose data through Claude Desktop, providing current readings, historical data, statistics, and trend analysis from LibreLinkUp accounts with secure credential storage.101MIT
- AlicenseAqualityAmaintenanceIntegrates Diabetes:M data with Claude Desktop to access glucose readings, insulin data, food diary, and health metrics through natural language conversations.111MIT
- FlicenseNot gradedqualityDmaintenanceEnables reading real-time continuous glucose monitor data from Dexcom sensors via the Share API, allowing Claude to access glucose levels, trends, and statistics.-
- AlicenseAqualityDmaintenanceEnables Claude to access Abbott Freestyle Libre CGM data from multiple providers (LibreView, Terra, Thryve) to retrieve current glucose, history, and summaries via natural language.42MIT