Skip to main content
Glama
Loopback Training Server

Loopback Training Server

create_plan

Build a dated training plan with activity type, goals, guardrails, and phases, then return its plan_id so queued workouts link to one schedule.

Instructions

Create a new training plan.

Call this before batch_create_workouts to get a plan_id that links all queued workouts together.

Args: name: Plan name (e.g. "Slow Burn 8-Week Return"). activity_type: Primary activity (e.g. "running", "cycling"). start_date: Plan start date (YYYY-MM-DD). end_date: Plan end date (YYYY-MM-DD), or null if open-ended. description: High-level what and why. metadata: Flexible JSON object for goals, guardrails, phases, athlete context, etc. No required keys. Example: { "goals": [{"type": "weekly_volume", "target": 32, "unit": "km", "by_week": 8}], "guardrails": ["Miss a run: don't make it up"], "phases": [{"name": "Base", "weeks": [1, 2], "volume_target_km": 18}], "athlete_context": {"fitness_level": "Detrained"} } status: Defaults to "active" — the block being run right now. Pass "upcoming" for a plan built ahead of its start date: it stays out of "which plan am I on" answers, while its sessions still appear in the calendar and schedule checks so the new block can be validated before it starts. Only one plan per activity should be active at a time; if one is already running, the next block is "upcoming" until the athlete starts it.

Returns: The created plan with its id.

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": {
      "name": "<name>",
      "activity_type": "<activity_type>",
      "start_date": "<start_date>"
    },
    "name": "create_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
statusNo
end_dateNo
metadataNo
start_dateYes
descriptionNo
activity_typeYes

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 burden and does well: it discloses the "active" default, the non-obvious side effect that an "upcoming" plan is excluded from "which plan am I on" answers while its sessions still appear in calendar and schedule checks, and the one-active-plan-per-activity invariant. It stops short of describing failure behavior (e.g. what happens when an active plan already exists for that activity) or validation errors.

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-loads purpose and the batch_create_workouts ordering before the Args block, and the Args/Returns structure is easy to scan. The multi-line JSON example for metadata is the one place it runs long, though it earns most of its space by pinning down an otherwise unconstrained object.

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?

No output schema exists, so the "Returns: The created plan with its id" line meaningfully closes the loop on the plan_id handoff. For a 7-parameter creation tool with no annotations, the description covers intent, sequencing, status semantics, and return value well; only error/permission behavior and the remaining enum values are unaddressed.

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 compensate, and it documents all seven parameters including date format (YYYY-MM-DD), null semantics for end_date, and a worked example for the free-form metadata object. The only gap is the status enum: it explains "active" and "upcoming" but leaves completed/archived/abandoned, which appear in the schema, undefined.

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 ("Create a new training plan") and immediately positions it in a workflow by naming the sibling batch_create_workouts and the plan_id handoff. An agent can distinguish this from create_workout or update_plan without opening another 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 sequencing guidance ("Call this before batch_create_workouts") tells the agent when this tool is required rather than optional. It also gives a concrete selection rule for the status choice — use "upcoming" for plans built ahead of their start date, and only one plan per activity should be active — which is real decision guidance, not just context.

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