Skip to main content
Glama
Loopback Training Server

Loopback Training Server

get_plan_context

Loads the active training plan with recent notes, units, and setbacks so an AI coach can maintain continuity before answering training questions.

Instructions

Load continuity context for the active training plan.

ALWAYS call this FIRST in any training-related conversation, before answering the user. It returns the active plan plus recent notes (decisions, preferences, constraints, life context, blockers, observations) ranked by importance and recency. This is how you maintain continuity across conversations.

The response includes a continuity_hint string — read it. It tells you whether continuity is fresh or stale and may instruct you to write notes aggressively this conversation.

Args: plan_id: UUID of a specific plan. Omit to use the active plan. since_days: Only return notes created within this window (default 60). limit: Maximum number of notes to return (default 40, max 200).

Returns: Object with: - plan: the resolved plan (or null if none active) - notes: list of PlanNote objects (id, kind, summary, body, importance, conversation_id, expires_at, created_at), ordered by importance desc then created_at desc - last_note_age_days: age of the most recent note (or null) - continuity_hint: a directive for how aggressively to save notes this conversation - units: "metric", "imperial" or null (the athlete has not chosen) - units_hint: how to talk and author workouts for this athlete's units. Follow it: an athlete on miles should never be handed kilometers. - setbacks: the athlete's open illnesses and injuries, plus those that ended in the last three weeks (kind, severity, startDate, endDate, days, checkins, and for open ones recovery: whether the recent data says it looks over). Empty when there are none or when the athlete does not share them. - setback_hint: what to do about them. Follow it when it is not empty: an open setback comes before the plan.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_plan_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
plan_idNo
since_daysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does well: it defines ordering (importance desc then created_at desc), default windows and caps, the meaning of a null plan, and that continuity_hint/setback_hint/units_hint are directives the caller must obey. It doesn't mention side effects, cost, or that the call is a pure read, which keeps it from a 5.

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 critical directive is front-loaded and the Args/Returns structure makes scanning easy. The Returns block is long but each field earns its place by carrying a behavioral instruction, with only minor redundancy around the hint fields.

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?

There is no output schema, so the description must define the return shape, and it enumerates every field including the derived ones (last_note_age_days, units_hint, recovery status on setbacks). For a zero-required-parameter read tool with no annotations, an agent has everything needed to call it and interpret the result.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely and it does: plan_id is documented as a UUID with the omit-for-active behavior, since_days as a note-recency window with default 60, and limit with default 40 and max 200. All three parameters gain semantics absent from the raw schema.

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?

The opening sentence names a specific verb and resource ('Load continuity context for the active training plan') and the following lines define the payload precisely: active plan, recent notes, continuity signal, units, setbacks. It is clearly separable from siblings like get_plan or list_plan_notes, which return plan structure or raw notes rather than the bundled continuity snapshot.

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?

It states an unusually strong when-to-use rule — 'ALWAYS call this FIRST in any training-related conversation, before answering the user' — and explains the plan_id omission default. What it lacks is any exclusion or explicit routing against alternatives (for example, whether get_plan is still needed), so it sits just under a full 5.

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