Skip to main content
Glama

Log workout session

log_session
Destructive

Log a completed workout session (exercises → sets, cardio, wearable metrics) at once. Returns the stored session including any auto-created exercise catalog entries. The server adds coaching_setup {intake_complete, active_program, missing, the app features that use the intake or a program} to at most one response a week, for a user who has not finished the coaching intake or has no active program. Planning data is in get_coaching_context; this tool stores completed workouts. A workout run in the AIm app is saved by the app itself, so it is already stored: it is read with get_sessions / get_session and changed with update_session / update_set. duration_sec is shown as the session's length in the app; without it the duration is blank in the history and session views.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / session / properties / date / description
      Previous value: -"The calendar date the workout happened, in the USER's timezone. Today only when the conversation is plainly about the session they just did. For anything logged after the fact, take the date from what the user said ('last Tuesday') and ask when that is unclear — never derive one from the server's clock. Everything time-based (weekly volume, the muscle load model, the consistency level) is anchored on it."New value: +"The calendar date the workout happened, in the USER's timezone: the day they did it, which for a session logged after the fact ('last Tuesday') is not today, and which the server's UTC clock does not know. Everything time-based (weekly volume, the muscle load model, the consistency level) is anchored on it."
    • changedInput schema / properties / session / properties / entries / items / properties / exercise_id / description
      Previous value: -"Catalog id of the exercise performed. Reuse an id the user already has (`exercise_catalog` in the coaching context, or list_exercises), otherwise a `slug` from search_exercise_pool verbatim. Minting a synonym for a movement that already has an id splits that movement's history in two."New value: +"Catalog id of the exercise performed: an id from the user's catalog (`exercise_catalog` in the coaching context, or list_exercises) or a `slug` from search_exercise_pool, character for character. A new id for a movement that already has one splits that movement's history in two."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / distance_m / description
      Previous value: -"Metres covered, for a carry or an interval the user measured that way ('farmer's walk, 30 metres'). Use it instead of duration_sec when what they said was a distance, not a time; fill both only when they gave both."New value: +"Metres covered, for a carry or an interval the user measured that way ('farmer's walk, 30 metres'). Both distance_m and duration_sec are present only when both were measured."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / duration_sec / description
      Previous value: -"Seconds under load for a hold or carry (plank, dead hang, farmer's walk), or the duration of a timed interval. Isometric work is dosed in seconds, not reps. Use it when the user gave a time; when they gave a distance instead, use distance_m."New value: +"Seconds under load for a hold or carry (plank, dead hang, farmer's walk), or the duration of a timed interval. Isometric work is dosed in seconds, not reps. A distance-measured carry or interval is distance_m instead."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / is_per_side / description
      Previous value: -"True when the set was done one side at a time. Log it as ONE set whose `reps` holds ONE side's count — never doubled, never split into two sets — and set this flag so the number is read the way it was meant. A timed one-sided hold or carry is per-side too: fill duration_sec, leave reps empty. Logging the same exercise both ways stops it comparing to itself."New value: +"True when the set was done one side at a time. Such a set is ONE record whose `reps` (or duration_sec, for a one-sided hold or carry) is ONE side's count, neither doubled nor split into two sets. An exercise recorded both ways does not compare with itself."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / reps / description
      Previous value: -"Reps actually completed. On a per-side set give ONE side's count and set is_per_side — never the doubled total, never two sets. Leave empty for a timed hold or carry and use duration_sec instead."New value: +"Reps actually completed. On a per-side set (is_per_side) this is ONE side's count: not the doubled total, and not split into two sets. Empty for a timed hold or carry, whose dose is duration_sec."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / rir / description
      Previous value: -"Reps left in the tank at the end of the set; 0 means taken to failure. Fill it only when the user says how close to failure they got ('had two left', 'went to failure'); a bare 'that was hard' or 'felt easy' is not a number — leave it empty rather than guessing one. It is what tells the model the set's load fades slower."New value: +"Reps left in the tank at the end of the set as the user stated it ('had two left', 'went to failure' = 0); a bare 'that was hard' or 'felt easy' states no number, and then the field is empty. It is what tells the model the set's load fades slower."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / rpe / description
      Previous value: -"Perceived effort 0-10 — the same question as rir on the other scale (RPE 10 = RIR 0). Use it when the user talks in RPE; rir wins when both are given."New value: +"Perceived effort 0-10 — the same question as rir on the other scale (RPE 10 = RIR 0). It holds a value the user gave in RPE; when both are present, rir takes precedence."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / set_id / description
      Previous value: -"The client's own stable id for this set, if it has one. Only the AIm app sends this: it lets a later correction be traced to the set that moved, because set_number is renumbered when a set is removed. Other clients have none and leave it out."New value: +"The client's own stable id for this set, if it has one. Only the AIm app sends this: it lets a later correction be traced to the set that moved, because set_number is renumbered when a set is removed. Absent from other clients."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / type / description
      Previous value: -"`working` for real sets. Mark ramp-up sets `warmup`: they are excluded from volume, weekly set counts and the muscle load model, so logging them as working inflates every number the coach reads back. A drop set is not one set: log each weight stage as its own entry in the order performed, the lighter stages `dropset`."New value: +"`working` for real sets, `warmup` for ramp-up sets: warm-ups are excluded from volume, weekly set counts and the muscle load model, and counted as working they inflate every number read back. A drop set is several records, one per weight stage in the order performed, the lighter stages typed `dropset`."
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / weight_kg / description
      Previous value: -"Load in kilograms: the whole bar for barbell work, ONE dumbbell or kettlebell for dumbbell work. Omit for unloaded bodyweight sets; give only the added weight when the user hangs a plate off a belt."New value: +"Load in kilograms: the whole bar for barbell work, ONE dumbbell or kettlebell for dumbbell work. Absent for unloaded bodyweight sets; for weighted bodyweight work (a plate on a belt) it is the added weight only."
    • changedInput schema / properties / session / properties / start_time / description
      Previous value: -"When the session started, with timezone offset, if the user actually said. Omit it rather than inventing a plausible time."New value: +"When the session started, with timezone offset, as the user stated it; absent when they did not say."
  2. Changed1 schema field changed
    • changedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / set_id / description
      Previous value: -"The client's own stable id for this set, if it has one. Only the AIm app sends this: it lets a later correction be traced to the set that moved, because set_number is renumbered when a set is removed. Never invent one — omit it."New value: +"The client's own stable id for this set, if it has one. Only the AIm app sends this: it lets a later correction be traced to the set that moved, because set_number is renumbered when a set is removed. Other clients have none and leave it out."
  3. Changed1 schema field changed
    • addedInput schema / properties / session / properties / entries / items / properties / sets / items / properties / set_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 128,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The client's own stable id for this set, if it has one. Only the AIm app sends this: it lets a later correction be traced to the set that moved, because set_number is renumbered when a set is removed. Never invent one — omit it."
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=true, idempotent=false. The description goes beyond them by disclosing that the response returns the stored session plus any auto-created exercise catalog entries, and by describing the conditional, rate-limited `coaching_setup` injection (at most once a week, only for users without a completed intake or active program). It does not address the destructiveHint=true or the non-idempotency (duplicate-log risk), which are the remaining behavioral gaps.

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?

Purpose is front-loaded in the first sentence and every paragraph carries information (return shape, coaching_setup injection, sibling routing, duration_sec display). It is somewhat long, and the coaching_setup aside is verbose for a behavior that affects at most one response per week, but there is no filler.

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?

An output schema exists, yet the description still usefully explains the dynamic `coaching_setup` block and the auto-created catalog entries, which structured fields alone would not convey. Given the highly nested schema this is close to complete, but it never warns that the call is non-idempotent (repeated logging can create duplicates), which an agent writing a mutation needs to know.

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?

Top-level schema coverage is 0% for the single `session` parameter, so the description must compensate. It does sketch the payload structure (exercises → sets, cardio, wearable metrics) and explains the user-visible effect of `duration_sec` (blank duration in history and session views). However, the deep nested schema carries its own rich field descriptions, so the description adds only moderate value at the top level.

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 a completed workout session') and enumerates the payload shape (exercises → sets, cardio, wearable metrics). It also explicitly distinguishes itself from siblings by name (get_coaching_context for planning, get_sessions/get_session for reading, update_session/update_set for changing), so an agent can place it 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?

Explicit when-not guidance: a workout run in the AIm app is already stored by the app, so it is read via get_sessions/get_session and changed via update_session/update_set — not logged here. It also routes planning data to get_coaching_context and states this tool stores completed workouts. This is textbook when/when-not/alternatives.

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.