Skip to main content
Glama
smart-gym-mcp
by sla1k

smartgym_apply_routine

Destructive

Rewrite an entire SmartGym routine in one call: reorder exercises, add new ones by name, move them between sections, and set days or goals. Pass only the sections you want changed; others stay intact.

Instructions

Rewrite a routine in one go (e.g. "week 2 of FB-A").

Each section you pass is the complete ordered list for that section: existing
exercises by exercise_id (optionally with new rest/note/sets), new ones by catalog
name (built-in or custom). An existing exercise listed under another section moves
there; one you leave out of a passed section is removed. Omitted sections stay as they
are.

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": {
      "routine": "<routine>"
    },
    "name": "smartgym_apply_routine"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoWeekdays, 1 = Sunday, 2 = Monday … 7 = Saturday (e.g. [2, 4, 6]); [] clears
goalNo
mainNo
nameNo
noteNo
warmupNo
dry_runNo
routineYes
cooldownNo

Output Schema

NameRequiredDescriptionDefault
noticeYes
changesYes
dry_runYes
routineYes
requestsYes
snapshotYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv0.1.0
    • changedInput schema / $defs / DesiredExercise / properties / rest_seconds / anyOf
      Previous value: -[
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Rest between sets, in seconds",
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / $defs / DesiredExercise / properties / sets / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "$ref": "#/$defs/SetSpec"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Template sets [{reps, weight_kg}], in order",
      +    "items": {
      +      "$ref": "#/$defs/SetSpec"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / $defs / DesiredExercise / properties / sets / description
      Added value: +"Omitted = kept (existing exercise) or one default set (new exercise)"
    • changedInput schema / $defs / SetSpec / properties / reps / description
      Previous value: -"Target reps for this set"New value: +"Target reps for this set; for a timed exercise (e.g. Plank, Dead Hang) the duration in seconds"
    • changedInput schema / properties / days / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "enum": [
      +        1,
      +        2,
      +        3,
      +        4,
      +        5,
      +        6,
      +        7
      +      ],
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / days / description
      Previous value: -"Days: comma-separated weekday numbers, 1 = Sunday, 2 = Monday … 7 = Saturday (e.g. \"2,4,6\"); \"\" clears"New value: +"Weekdays, 1 = Sunday, 2 = Monday … 7 = Saturday (e.g. [2, 4, 6]); [] clears"
    • changedInput schema / properties / goal / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Free text, e.g. \"Strength\"; must not be blank",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / $defs / AddedInOrder
      Added value: +{
      +  "description": "An added exercise's place in `ChangeSet.final_order`: `ChangeSet.added[index]`.",
      +  "properties": {
      +    "index": {
      +      "title": "Index",
      +      "type": "integer"
      +    },
      +    "kind": {
      +      "const": "added",
      +      "default": "added",
      +      "title": "Kind",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "index"
      +  ],
      +  "title": "AddedInOrder",
      +  "type": "object"
      +}
    • changedOutput schema / $defs / ChangeSet / properties / final_order / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "discriminator": {
      +        "mapping": {
      +          "added": "#/$defs/AddedInOrder",
      +          "kept": "#/$defs/KeptInOrder"
      +        },
      +        "propertyName": "kind"
      +      },
      +      "oneOf": [
      +        {
      +          "$ref": "#/$defs/KeptInOrder"
      +        },
      +        {
      +          "$ref": "#/$defs/AddedInOrder"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / $defs / ChangeSet / properties / order
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "title": "Order",
      -  "type": "array"
      -}
    • removedOutput schema / $defs / ChangeSet / properties / routine_identifier
      Removed value: -{
      -  "title": "Routine Identifier",
      -  "type": "integer"
      -}
    • removedOutput schema / $defs / ChangeSet / properties / routine_name
      Removed value: -{
      -  "title": "Routine Name",
      -  "type": "string"
      -}
    • changedOutput schema / $defs / ChangeSet / required
      Previous value: -[
      -  "routine_identifier",
      -  "routine_name",
      -  "routine_changes",
      -  "added",
      -  "removed",
      -  "updated",
      -  "order",
      -  "final_order",
      -  "warnings",
      -  "expected"
      -]New value: +[
      +  "routine_changes",
      +  "added",
      +  "removed",
      +  "updated",
      +  "final_order",
      +  "warnings",
      +  "expected"
      +]
    • addedOutput schema / $defs / KeptInOrder
      Added value: +{
      +  "description": "A kept exercise's place in `ChangeSet.final_order`.",
      +  "properties": {
      +    "exercise_id": {
      +      "title": "Exercise Id",
      +      "type": "integer"
      +    },
      +    "kind": {
      +      "const": "kept",
      +      "default": "kept",
      +      "title": "Kind",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "exercise_id"
      +  ],
      +  "title": "KeptInOrder",
      +  "type": "object"
      +}
    • changedOutput schema / $defs / SetSpec / properties / reps / description
      Previous value: -"Target reps for this set"New value: +"Target reps for this set; for a timed exercise (e.g. Plank, Dead Hang) the duration in seconds"
  2. First observedv0.2.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations declare destructive=true and non-idempotent, but the description adds genuinely non-obvious behavior: each passed section replaces the whole section, an exercise listed under another section moves, an omitted exercise is deleted, and omitted sections are untouched. That is exactly the destructive scope an agent needs. It loses a point for never disclosing that dry_run defaults to true, meaning the described destructive changes won't occur unless the agent flips it.

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?

Three tight, front-loaded sentences with no filler; the leading sentence states the operation and the rest spell out consequences. The parenthetical example ("week 2 of FB-A") is somewhat opaque without context but costs little.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

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

Return values are covered by an output schema, and the replacement/removal semantics are well covered. However, for a destructive 9-parameter tool, omitting the dry_run default and the metadata parameters (name, days, goal, note) leaves real gaps an agent must discover from the schema alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 11% across 9 parameters, so the description must carry the load. It explains the section arrays and the exercise_id-vs-catalog-name distinction, plus optional rest/note/sets, but is silent on name, days, goal, note, and dry_run, leaving half the top-level surface undocumented in both places.

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?

"Rewrite a routine in one go" is a specific verb+resource, and the body explains the replacement model precisely (full ordered list per section, moves and removals). It does not distinguish itself from close siblings like smartgym_update_routine or smartgym_reorder_routine, so an agent must infer which one to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by framing the tool as a whole-routine rewrite, but never states when to prefer it over smartgym_update_routine, smartgym_add_exercise, or smartgym_move_exercise. No prerequisites or when-not-to-use guidance is given, and the default dry_run=true (a safe-preview first call) is not mentioned.

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