Skip to main content
Glama

Approve and apply a plan revision

approve_plan_revision
DestructiveIdempotent

Approve a pending plan revision and apply it, once the coach has reviewed its operations. Side effects: every operation is applied in order to the live plan, so the changed workouts appear on the athlete's calendar (for a group plan, on every member's); no push notification is sent. Returns per-operation results with status 'applied', or 'partially_applied' when an operation failed, including a group change whose member cascade could not be delivered; operations after a failure are skipped and never retried automatically. Approving a revision that is no longer pending changes nothing.

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": {
      "revision_id": "<revision_id>"
    },
    "name": "approve_plan_revision"
  }
}

Input Schema

NameRequiredDescriptionDefault
revision_idYesrevision_id from propose_plan_revision or list_plan_revisions.

Output Schema

NameRequiredDescriptionDefault
idNo
kindNo
errorNo
notesNo
scopeNo
org_idNo
reasonNo
sourceNo
statusNo
messageNo
privacyNoPresent when the athlete's settings withhold data.
coach_idNo
warningsNo
next_stepNoWhat can be done next, for example after a failure.
applied_atNo
athlete_idNo
created_atNoEpoch milliseconds.
operationsNo
updated_atNo
apply_errorNo
next_cursorNoReads the next page; null on the last page.
reason_codeNo
reviewed_atNo
revision_idNo
total_weeksNo
user_contentNoFields in this result that people wrote.
applied_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
coach_feedbackNo
created_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
updated_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
weeks_returnedNo
reviewed_at_isoNoThe epoch field beside it as a UTC instant; the local day can differ.
plan_instance_idNo
truncated_fieldsNoLists cut to fit one response: rows returned and total.
generated_contentNoFields in this result that NexRex's AI wrote.
operation_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.

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 already declare destructiveHint=true, idempotentHint=true and openWorldHint=false, and the description adds real context beyond them: every operation is applied in order to the live plan, changes surface on the athlete's or every group member's calendar, no push notification is sent, and a partial group cascade yields 'partially_applied'. It also discloses failure semantics — later operations are skipped and never auto-retried — which annotations cannot express.

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?

Purpose is front-loaded in the first clause, then side effects, return statuses and the no-op edge case follow in a logical order with a 'Side effects:' marker. The sentences are dense and long, and the return-status detail slightly overlaps the output schema, but nothing 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 one-parameter destructive mutation with an output schema, the description covers what gets changed, where it becomes visible, notification behavior, and partial-failure outcomes. Nothing an agent needs in order to call it safely 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?

With a single parameter and 100% schema description coverage, the schema already documents revision_id and its provenance (propose_plan_revision or list_plan_revisions). The description adds no additional meaning about the parameter, 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 ('Approve a pending plan revision and apply it') and frames the precondition ('once the coach has reviewed its operations'). An agent can distinguish this from propose_plan_revision and reject_plan_revision purely on the verb and the 'pending' qualifier.

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 precondition (the coach has reviewed its operations) and an explicit no-op case ('approving a revision that is no longer pending changes nothing'), which tells the agent when not to expect an effect. It does not name the alternatives (propose/reject) or explain how a revision gets into the pending state, so it stops short of full when/when-not routing.

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