I fed an AI raw Garmin JSON. Same answers, over 20 times the bill.
I measured what my MCP server cuts from Garmin's raw JSON, then asked three Claude models 37 questions with each version of the data. The answers were the same. The bill was not.
- Own training data
- Code & method included
- AI-assisted, author-checked

Most of what Garmin sends never reaches the conversation. (AI-generated illustration)
I run, and I write software. Garmin MCP is my unofficial, open-source MCP server that lets an AI assistant answer questions about my Garmin Connect data: training load, sleep, workouts. I wrote earlier about what the tool list costs the model before it answers anything. This article is about the other side of a tool call: what comes back.
The server never hands Garmin's JSON to the model. It keeps the raw responses in a local SQLite database and returns its own answer: the fields a question needs, in readable units, with empty values dropped. I always assumed that was the right call. I had never measured how much it saves, or whether the cutting costs anything in the answers. So I did both.
Same data, both ends¶
Because the server stores every Garmin response as it arrived, I could measure the input and the output of a tool call on the same data. I ran the built server over stdio on a copy of my local database, with automatic downloads off and no sign-in, so nothing could reach Garmin. A small hook in the SQLite driver recorded every raw row the server read during each call. For 22 typical calls I kept two numbers: the raw JSON for the days or the activity the question asked about, which is what a server mirroring Garmin's endpoints would return, and the server's actual answer.
Bytes are easy. Tokens are what the model pays for, so I counted them with Claude Haiku 5.5: the usage of a claude -p call with the data in the prompt, minus the same call without it. Twenty-four endpoint types gave me tokens-per-byte ratios for the few payloads too big to count directly. Compact JSON came out at 1.6 to 2.4 bytes per token, below even the 2.5 bytes per token I measured for the tool list earlier, and far from the four bytes per token of the usual rule of thumb.

Seven of the 22 calls. The raw side is only the days or activity asked about.
What Garmin sends¶

Tokens per call, measured on my data from 21 November 2026.
The range is wider than I expected. Activities shrink the least. The laps of one run need 29 KB of raw JSON, about 15,000 tokens, and the server returns 3,307. An interval session with 32 laps goes from 42,000 to 12,000 tokens, only 3.4 times less, because the laps are the answer. My weigh-ins shrink by less than half.
Sleep is the other end. One night is 85 KB from Garmin, 46,000 tokens, and the server returns 915. Seven nights are 716 KB and about 379,000 tokens against 962. Twenty-eight days of resting heart rate, HRV, steps and stress are 217,000 tokens against 4,202. A month summary would need 3.5 MB of raw responses, most of it sleep, to say what the server says in 1,321 tokens.
Two cases do not fit any mirror. The second-by-second stream of one 45-minute run is 1.16 MB, about 553,000 tokens. My Claude Code refused it as "Prompt is too long" until I switched to the model's 1M-token variant. The server answers "how did my kilometres go" from the same stream in 2,456 tokens. And the analytics tools read history no conversation could hold: the morning readiness check read 9.5 MB of raw rows, every activity since July 2024 for the load model plus weeks of baselines, and returned 1,024 tokens. (Readiness is training information, not medical advice.)
What gets cut¶

One night of sleep, from Garmin to the model. Field names only.
To see what the bytes are, I classified every field of four raw answers by its name and type, never its value: sample series, ids and owner and device fields, GPS and place, flags, empty values, labels and timestamps, numbers.

What the raw responses are made of, by field category.
Each kind of data loses something different:
- Sleep is sample series. 95% of a night's record is per-minute and per-epoch arrays: movement, stages, heart rate, stress, Body Battery, HRV, respiration. The server keeps what a question asks about them: stage segments, awakenings, the lowest heart rate and the HRV range, each with its time.
- Activity lists are bookkeeping. In October's 26 activities, 38% of the bytes are ids, owner and device fields, repeated in every item: my full name, three sizes of profile picture URL, a list of more than 40 user roles. Another 11% are flags such as
isHidden,hasVideoandisDecoDive. - A single run is mostly numbers, 62%. Here the cut is choosing:
maxSpeed,bmrCalories,minElevationand dozens more stay in the database, speeds become a pace, seconds becomem:ss.
The code that does this is unremarkable. Each tool maps the raw fields it needs, converts the units, and passes the result through one helper:
/** Drop undefined, null, NaN, empty strings, empty arrays and empty objects recursively. */
export function compact<T>(value: T): T {
if (Array.isArray(value)) return value.map((v) => compact(v)).filter((v) => !isEmpty(v)) as T;
if (value && typeof value === 'object' && !(value instanceof Date)) {
const out: Record<string, unknown> = {};
for (const [k, v] of Object.entries(value)) {
const c = compact(v);
if (!isEmpty(c)) out[k] = c;
}
return out as T;
}
return value;
}
There is a side effect I like. The raw activity carries the GPS coordinates of the start and the end, the owner's name and the serial number of a paired sensor. None of them is in the server's answer.
Does cutting hurt the answers?¶
The worry with any summary is that it drops the one thing a question needs. So I wrote questions with exactly one right answer and gave a model the data in the prompt, with no tools: in condition A, Garmin's raw JSON for those days or that activity; in B, the server's answers for the same data. Seven bundles: one run, an interval session, one night, a week of sleep, 28 days of health, October's activities and Garmin's training status.
There were 28 lookups, such as the average heart rate of a run, time in zone 2, the slowest lap, the night with the longest sleep or the resting heart rate on a given day. When all of them came back right, I added 8 questions that need arithmetic over many values or a scan of a sample series: the lowest heart rate of a night, total REM over a week, the change in resting heart rate between two weeks, average pace over all October runs. Every expected answer was computed from the raw JSON and checked against the server's answer. Claude Haiku 5.5, Sonnet 5.5 and Opus 5.5 answered each question twice in both conditions, 432 calls in Claude Code 2.1.330, scored automatically with small tolerances. An earlier round of Haiku and Sonnet on an older Claude Code version had the same accuracy.

Every answer was right, in both conditions, for all three models.
All 432 were right. Even Haiku found the lowest heart rate among 159 samples of a night, added up REM over seven nights of raw JSON, and converted lap speeds in metres per second into a pace, as well as it read the same values from the server's answer. With 16 to 56 answers per bar the intervals are wide, but there is not a single difference to explain, for the smallest model or the largest.
The one question I kept apart shows where the raw data does run out. "What was my form (TSB) on 16 November?" needs the whole training history, which the server reads and the 28 days of raw status do not contain. With the server's answer, all six replies said 34.9. With the raw JSON, Sonnet said unknown both times. Haiku and Opus both times subtracted Garmin's acute load from its chronic load, got 237 and gave that as the answer. Opus put it in bold. The most capable model was the most confident about a number the data did not hold.
The bill¶

Cost of the answering model at list price, and median time per question.
Accuracy was not the difference. Everything else was. The 72 calls per model and condition took 9.9 million prompt tokens with raw JSON and about 426,000 with the server's answers. At list prices that is $79.18 against $3.72 for Opus, $39.57 against $1.80 for Sonnet and $8.44 against $0.10 for Haiku, whose price per token is five times higher above 100,000 tokens of prompt, a line three of the seven raw bundles crossed. One question about a week of sleep cost Opus $3.04 raw and 2 cents from the server. The median answer took 4.3 seconds instead of 1.7 with Sonnet and 4.8 instead of 2.3 with Haiku. Opus was the exception: 2.4 seconds against 2.2, so for the largest model the raw JSON cost money, not time.
The client added its own share. Claude Code sent most prompts a second time to Haiku 5.5 for a request of its own, which added about $4 per model on the raw side and a few cents on the server's.
In a real conversation the gap grows. A tool result stays in the context for every turn after it, so 379,000 tokens of sleep would be read again with each follow-up, cached or not, and the 553,000-token stream did not even fit in the default context window of the Claude Code version I started with.
What this does not show¶
- Data in the prompt, not tool calls. I measured the answer, not the choice of tools; a real session adds the tool list and several turns.
- One athlete, my questions. 36 scored questions on my own data, chosen by me, plus the derived one. Questions about things the server drops, such as a single minute of a sleep series, can only be answered from raw data.
- A ceiling. All three models got everything right, so this cannot tell whether raw JSON makes errors more likely on harder questions. It can only say I did not find any.
- One tokenizer, list prices. Tokens are Haiku 5.5's; Sonnet's and Opus's prompts measured the same within 0.1%. Costs are computed from usage at published list prices. Claude Code marks the prompt for caching with a one-hour lifetime, so every prompt was billed as a cache write at twice the input price; the cost it reports for the answering model matched mine.
If you are building an MCP server over a big API¶
- Measure what one tool call returns, in tokens, on real data. Mine ranged from 1.7 to 1,417 times less than the raw responses.
- Look for sample series first. They were 95% of a night of sleep and none of the questions needed them raw.
- Drop repeated bookkeeping: ids, owner fields, image URLs, flags and nulls in every list item.
- Do the arithmetic in code where it needs history the model will never see, like a load model or a baseline. Given only part of it, two of three models produced a number anyway.
- Keep the raw responses on your side, so you can answer a new question later without asking the API again.
- Do not expect accuracy to be the reason. All three models read raw JSON just fine, lookups and arithmetic alike. The reasons are cost, time and room in the context.
The scripts, the questions and the counts are a small experiment beside the repository; the server is at https://github.com/endurancetools/garmin-mcp, and the documentation, including how it works, is at https://endurancetools.github.io/garmin-mcp/. It talks to Garmin Connect's web endpoints, which Garmin can change at any time.
Unofficial; not affiliated with or endorsed by Garmin.
Some illustrations in this article were generated with ChatGPT.