Skip to main content
Glama
Quantified Self MCP Server

Quantified Self MCP Server

Log a workout session

log_workout_session

Log a single exercise event with activity type, timing, intensity, and heart-rate response so workouts are captured separately from daily workout-minute totals.

Instructions

Record one workout as a structured event — activity, timing, intensity, and heart-rate response — rather than folding it into the day's workout_minutes total. Use this alongside (not instead of) log_daily_metric/log_measurement for workout_minutes: this is what lets explain_metric_change say what the workout was, not just how long it ran. A day can have more than one session; each call adds a new row.

Use this tool when:

  • the user describes an actual workout/exercise session (e.g. "I went running for 40 minutes", "log today's strength workout").

Do not use this tool when:

  • the user only wants to record the day's total exercise minutes as a single number, with no activity type/timing/intensity -> use log_daily_metric (workout_minutes) or log_measurement instead.

Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.

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": {
      "date": "<date>",
      "activity_type": "<activity_type>",
      "duration_minutes": "<duration_minutes>"
    },
    "name": "log_workout_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesThe day the workout happened, YYYY-MM-DD.
notesNoFree-text notes, e.g. route or how it felt. Optional.
sourceNoWhere this came from, e.g. "Apple Watch", "manual". Optional.
intensityNoOne of "low", "moderate", "high". Optional.
start_timeNoWhen it started, HH:MM (24-hour) or a full ISO timestamp. Optional.
activity_typeYesWhat kind of workout, e.g. "running", "cycling", "strength". Free-form.
avg_heart_rateNoAverage heart rate during the workout, bpm. Optional.
max_heart_rateNoPeak heart rate during the workout, bpm. Optional.
duration_minutesYesHow long it lasted, in minutes.

Output Schema

NameRequiredDescriptionDefault
sessionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.36
    • addedOutput schema / properties / session / properties / duration_minutes / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / session / properties / duration_minutes / type
      Removed value: -"integer"
  2. Addedv1.0.16
  3. Removedv1.0.15
  4. Addedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false; the description adds the meaningful consequence that a day can hold multiple sessions and each call appends a new row, which explains the non-idempotent behavior. The privacy note about the local SQLite file versus data flowing into the calling client's model context is genuinely useful operational context. It stops short of saying what happens on duplicate/retried submissions, so it is not exhaustive.

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?

The core purpose is front-loaded, and the when/when-not bullets are scannable with zero filler. The three-sentence privacy paragraph is longer than the rest of the guidance and only tangentially about invoking the tool, which slightly dilutes focus, but it is still structured and earns most of its space.

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?

An output schema exists, so return values need not be described, and all parameters are covered by the schema. For a 9-parameter append-style logging tool, the definition supplies purpose, routing rules, append semantics, and privacy implications — everything an agent needs to call it correctly.

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%, so all nine parameters, including the intensity vocabulary and date/time formats, are already documented in the schema. The description only summarizes the field groups (activity, timing, intensity, heart-rate) without adding formats, ranges, or validation rules. Baseline 3 is correct when the schema carries the semantics.

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?

Opens with a specific verb+resource ("Record one workout as a structured event") and enumerates the dimensions captured (activity, timing, intensity, heart-rate response). It explicitly contrasts itself with log_daily_metric/log_measurement for workout_minutes, so an agent can separate it from the closest siblings without opening a 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?

Provides an explicit "Use this tool when" list with concrete user utterances ("I went running for 40 minutes") and a "Do not use this tool when" block naming the exact fallback tools for total-minutes-only logging. Both the positive and negative routing conditions are stated, leaving nothing to inference.

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