Skip to main content
Glama

Plan draft

get_plan_draft
Read-onlyIdempotent

Poll a draft job created by this account and connection: queued/generating, allowance_limited with retry_at, failed or ready (pending draft) with goal, level, recommended start date, expiry, per-week summaries for the whole plan, and the workouts of whole weeks up to a response-size page; next_cursor from a draft result reads the following weeks. Read-only; drafts expire 24 hours after reservation and become unavailable once saved. A poll resumes an expired execution lease; after process loss progress may wait for the next poll. Only ready drafts can be edited or saved.

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

Input Schema

NameRequiredDescriptionDefault
cursorNonext_cursor from the previous page of this tool called with the same arguments; omit for the first page.
draft_idYesdraft_id from create_training_plan or a draft edit by this account (single-use, expires 24 hours after drafting).
athlete_idYesThe draft's owner: the athlete for an individual draft; for a group draft, the coach's own id from get_current_user.

Output Schema

NameRequiredDescriptionDefault
goalNo
draftNo
errorNo
levelNo
weeksNo
statusNo
messageNo
privacyNoPresent when the athlete's settings withhold data.
draft_idNo
group_idNo
retry_atNoEpoch milliseconds; an uncharged allowance-limited job resumes on a poll at or after this instant.
warningsNo
next_stepNoWhat can be done next, for example after a failure.
operationNo
plan_nameNo
athlete_idNo
created_atNo
expires_atNo
group_nameNo
next_stepsNo
assumptionsNo
athlete_pbsNo
goal_sourceNo
next_cursorNoReads the next page; null on the last page.
reason_codeNo
total_weeksNo
member_countNo
retry_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
subject_kindNo
user_contentNoFields in this result that people wrote.
changed_cellsNo
phase_outlineNo
created_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
expires_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
missing_inputsNo
weeks_returnedNo
content_previewNo
generation_stateNoqueued, generating, ready, failed or access_revoked; only ready content is editable/saveable.
truncated_fieldsNoLists cut to fit one response: rows returned and total.
weekly_summariesNo
allowance_chargedNoAudit of the stable Redis reservation; retries of this job do not charge again.
duration_in_weeksNo
generated_contentNoFields in this result that NexRex's AI wrote.
weekly_mileage_kmNo
workout_preferenceNo
preferences_appliedNo
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.
recommended_start_dateNo
training_principle_org_idNo
training_principle_sourceNo

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.4/5.0
Behavior5/5

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

Annotations only declare read-only, idempotent, non-destructive, closed-world; the description goes well beyond that with non-obvious behaviour: drafts expire 24 hours after reservation and are unavailable once saved, a poll resumes an expired execution lease, and after process loss progress may stall until the next poll. Those are exactly the operational traits an agent cannot derive from the annotations.

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 action and job states, then paging, then lifecycle constraints, so an agent gets the essentials first. The enumeration of payload fields (goal, level, recommended start date, expiry, per-week summaries) is somewhat redundant given an output schema exists, which adds bulk without new information.

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 polling read tool this is complete: it covers all terminal and intermediate job states, the allowance_limited retry_at case, pagination, draft lifetime, lease resumption, and the preconditions for acting on the draft afterwards. Return-value detail beyond this is handled by the output schema, so nothing an agent needs to call it correctly is missing.

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% and all three parameters are already documented in the schema, including cursor, draft_id provenance/expiry and athlete_id owner semantics. The description adds only a small amount — that next_cursor walks forward through whole weeks — which is marginal beyond the cursor field's own text, so the baseline 3 applies.

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 ('Poll a draft job created by this account and connection') and then enumerates exactly what the response contains: job states (queued/generating, allowance_limited with retry_at, failed, ready) and payload fields (goal, level, start date, expiry, per-week summaries, workouts). An agent can distinguish this read/poll tool from create_training_plan, edit_draft_workout and save_training_plan without opening any 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?

Usage is clear: call repeatedly to poll a draft, use next_cursor to page through later weeks, and note that only ready drafts can be edited or saved. It gives context but never names the concrete alternatives (save_training_plan, edit_draft_workout) as next steps, so the agent must infer routing from sibling names rather than being told explicitly.

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