Skip to main content
Glama

Assign a group training plan

assign_group_plan
DestructiveIdempotent

Assign a saved Group Plan Template to a group, once the coach has confirmed the template, start date and member assignments. Side effects: creates a group plan, schedules its workouts on the calendar of every assigned member (by default every current member) and queues a Garmin workout sync for members with Garmin connected; members get no push notification. Needs a coach role and the group-training-plan feature. The result gives one enrollment outcome per member (accepted, refused with reason_code, unknown or not_attempted) and a create_command_id. Repeating the call with the same arguments or that create_command_id resumes the same group plan instead of creating a second one, so a retry after a timeout is safe.

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": {
      "group_id": "<group_id>",
      "training_plan_id": "<training_plan_id>",
      "start_date": "<start_date>"
    },
    "name": "assign_group_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
group_idYesA group id from get_team_overview or find_athlete results.
plan_nameNoName for the group plan; defaults to the template's.
start_dateYesA calendar date, YYYY-MM-DD.
sub_groupsNoPace sub-groups; omit to use the template's own.
assignmentsNoMember user_id -> sub-group name; required when there is more than one sub-group.
training_plan_idYesA Group Plan Template id: the training_plan_id from save_training_plan(group_id, save_mode='template_only').
create_command_idNocreate_command_id from an earlier call, to resume that assignment.

Output Schema

NameRequiredDescriptionDefault
nameNo
errorNo
statusNo
createdNo
messageNo
privacyNoPresent when the athlete's settings withhold data.
group_idNo
warningsNo
workoutsNo
next_stepNoWhat can be done next, for example after a failure.
athlete_idNo
next_stepsNo
start_dateNo
sub_groupsNo
next_cursorNoReads the next page; null on the last page.
reason_codeNo
total_weeksNo
member_countNo
user_contentNoFields in this result that people wrote.
workout_countNo
start_date_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
weeks_returnedNo
member_user_idsNo
training_plan_idNo
truncated_fieldsNoLists cut to fit one response: rows returned and total.
create_command_idNo
duration_in_weeksNo
generated_contentNoFields in this result that NexRex's AI wrote.
member_schedulingNo
enrollment_resultsNo
session_definitionsNoSessions that several rows of this result share by session_ref.
content_block_fieldsNoColumn names of every content_blocks row, nested blocks rows included.
group_plan_instance_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / $defs / Activity / properties / content_blocks / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "items": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "boolean"
      -          },
      -          {
      -            "items": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "boolean"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "$ref": "#/$defs/LocalizedText"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "type": "array"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "items": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "items": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "boolean"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "$ref": "#/$defs/LocalizedText"
      +          },
      +          {
      +            "items": {
      +              "type": "array"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "type": "array"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / $defs / Activity / properties / content_blocks / description
      Previous value: -"Interval rows; each row's values follow content_block_fields."New value: +"Workout steps as rows whose values follow content_block_fields; an interval's blocks value is its nested steps as rows in the same columns."
    • changedOutput schema / properties / content_block_fields / description
      Previous value: -"Column names of every content_blocks row."New value: +"Column names of every content_blocks row, nested blocks rows included."
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations: it enumerates concrete side effects (creates the plan, schedules workouts on every member's calendar, queues a Garmin sync, sends no push notification) and states the permission and feature-flag prerequisites. The idempotency contract is spelled out precisely — repeating with the same arguments or the same create_command_id resumes rather than duplicates — which is the key retry-safety fact an agent needs.

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, then side effects, then preconditions, then retry semantics — a sensible ordering. The prose is dense and the return-value sentence partly duplicates the existing output schema, but no sentence is wasted.

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?

For a destructive, multi-member mutating tool this covers everything an agent needs: authorization requirements, exact side effects, notification behavior, and idempotent retry handling. Return-shape detail is already backed by an output schema, so the description's version of it is a bonus rather than a gap.

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 coverage is 100%, so the description is not required to document parameters. It does add one useful semantic, that assigned members default to every current member, but leaves other fields (plan_name, sub_groups override behavior) to the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource pair ('Assign a saved Group Plan Template to a group') and scopes it to group-wide work, which implicitly separates it from individual enrollment tools. It never names the alternatives it should be chosen over, so differentiation requires inference from the sibling list.

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?

Gives a clear trigger condition ('once the coach has confirmed the template, start date and member assignments') and the default membership behavior when no assignments are supplied. It stops short of explicit when-not-to-use guidance or naming a sibling to prefer instead.

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.

Resources