Skip to main content
Glama

Recommend catalog training plans

recommend_training_plans
Read-onlyIdempotent

Rank existing NexRex catalog training plans for an athlete. Read-only and rule-based: matches each plan's distance, goal, length, weekly volume, level and days per week against the athlete's recent training, race prediction and primary race, and holds back every plan when injury or recovery signals say not to push. Returns candidates with reason_codes, reasons and gaps, missing_inputs that would sharpen the match, health_hold, and no_good_match when no catalog plan fits (create_training_plan drafts a custom plan).

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": {
      "athlete_id": "<athlete_id>"
    },
    "name": "recommend_training_plans"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoThe athlete's aim; omit to infer it from their goal.
top_kNoCandidates to return, 1-10.
distanceNoTarget distance: full (marathon), half (half marathon), hyrox, start (beginner) or none (base); spellings such as 'Half Marathon' or 42k work. Omit to use the athlete's primary race.
race_dateNoA calendar date, YYYY-MM-DD.
athlete_idYesThe athlete's user id: get_current_user's athlete_id for the connected account, or an id from get_coach_athletes or find_athlete.
target_timeNoGoal finish time, H:MM:SS or MM:SS; time_target goals use it.
days_per_weekNoDays per week the athlete can train, 1-7.

Output Schema

NameRequiredDescriptionDefault
errorNo
statusNo
messageNo
privacyNoPresent when the athlete's settings withhold data.
warningsNo
data_gapsNo
next_stepNoWhat can be done next, for example after a failure.
athlete_idNo
candidatesNo
health_holdNo
next_cursorNoReads the next page; null on the last page.
reason_codeNo
total_weeksNo
catalog_sizeNo
user_contentNoFields in this result that people wrote.
no_good_matchNo
missing_inputsNoInputs a good match still needs from the athlete.
weeks_returnedNo
athlete_summaryNo
truncated_fieldsNoLists cut to fit one response: rows returned and total.
generated_contentNoFields in this result that NexRex's AI wrote.
health_reason_codesNo
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.

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
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description still adds real behavioral context by disclosing the rule-based matching dimensions and, importantly, that it suppresses all candidates when injury or recovery signals indicate the athlete should not push. The only weakness is that the trailing list of return fields largely duplicates what the output schema already declares.

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?

It is front-loaded with the core verb and resource, and the safety floor (holding back plans on injury signals) is stated prominently. It is dense to the point of being a single long sentence-chain, and the enumeration of return fields could be trimmed given the 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.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, rule-driven recommendation tool with full schema coverage and an output schema, the definition supplies enough about matching logic, health gating and the no-match outcome for an agent to call it correctly. The remaining redundancy about return fields is a minor inefficiency rather than a completeness 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 description coverage is 100%, so every parameter is already fully documented in the schema, and the 3 baseline applies. The description adds only indirect meaning, explaining that parameters feed a match against the athlete's recent training, race prediction and primary race, without defining any per-parameter semantics beyond the 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?

"Rank existing NexRex catalog training plans for an athlete" gives a specific verb (rank) and a specific resource (catalog training plans), scoped to one athlete. It also names the contrasting sibling behavior (create_training_plan drafts a custom plan), so the agent can distinguish the two without opening either schema.

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?

The description makes the selection context clear: this is for ranking already-existing catalog plans, and when nothing fits, the no_good_match result points to create_training_plan as the alternative. It does not state explicit when-not-to-use cases beyond that fallback, nor any prerequisite steps beyond athlete_id resolution, so it falls short of a full 5.

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