Skip to main content
Glama
Loopback Training Server

Loopback Training Server

get_workout_context

Retrieves a recorded workout's linked queued session, training plan, and missed-workout feedback so you can compare what was planned with what actually happened.

Instructions

Get the server-held plan linkage for a recorded workout: the queued session it fulfilled, the training plan behind that session, and any missed-workout feedback filed against it.

Args: workout_id: UUID of the workout (same id as get_recent_runs / get_workout_detail return).

Returns: Object with workout_id, plan_workout_id, plan_link_manual, and three nullable keys: - queue_item: title, description, activity_type, live status (e.g. "completed", "skipped"), scheduled_date, plan_id, the workout_data composition that was planned, completed_at. - plan: id, name, activity_type, status, start_date, end_date. - feedback: reason, reason_note, action (move/adjust/skip), new_date, scheduled_date, dismissed, created_at. Survives queue-item deletion.

All three null (with plan_workout_id null) means an unplanned run —
that's normal, not an error.

plan_link_manual true means the athlete linked this workout to the
session by hand afterwards (or unlinked it). They are saying it counts
for that session, not that they followed it: it may be from another
day, another activity, or a different kind of run than prescribed.
The session is completed either way; read the workout itself for what
was actually done.

Useful when reviewing a completed workout: compare what was planned (queue_item.workout_data) against what happened, and see what the athlete said about the session.

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": {
      "workout_id": "<workout_id>"
    },
    "name": "get_workout_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
workout_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it explains null semantics ('all three null means an unplanned run — that's normal, not an error'), interprets plan_link_manual correctly (linked by hand, not that the plan was followed), and notes feedback survives queue-item deletion. These are non-obvious behaviors an agent would otherwise miss.

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?

Front-loaded with the core purpose, then structured into Args/Returns/interpretation, so it is easy to scan. It is somewhat long for a one-parameter retrieval tool — the workout_data detail is heavy — but nearly every line contributes to correct interpretation of the null/nested returns.

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?

No output schema exists, so the description must explain returns, and it fully documents all three nullable objects with their fields and the top-level keys. Combined with the unplanned-run interpretation and manual-link caveat, an agent has everything needed to call and read the result correctly.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry the single param, and it does: 'workout_id: UUID of the workout (same id as get_recent_runs / get_workout_detail return)' adds both type and provenance beyond the bare schema. That is meaningful added value over the empty schema description.

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 precise verb and resource: 'Get the server-held plan linkage for a recorded workout,' then enumerates the three things returned (queued session, training plan, missed-workout feedback). This clearly distinguishes it from get_workout_detail (the workout itself) and get_workout_feedback (feedback alone).

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?

'Useful when reviewing a completed workout: compare what was planned against what happened' gives a clear use context, and 'read the workout itself for what was actually done' implicitly routes to get_workout_detail. It lacks an explicit when-not-to-use or a direct naming of alternate siblings for the plan/feedback portions.

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