Skip to main content
Glama

Swap an exercise

swap_exercise
DestructiveIdempotent

Use this when the person asks to swap the exercise in a session. Give the sessionId and slot, and the exerciseKey they chose, or a same-movement one from list_alternatives when they leave it to you. The new exercise brings its own rules, and loads never carry over between exercises. untilWeek null swaps that session only; a week keeps the swap for that day through that program week. Comes back with an Undo. Do not use to move a session; use move_session.

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": {
      "sessionId": "<sessionId>",
      "slot": "<slot>",
      "exerciseKey": "<exerciseKey>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "swap_exercise"
  }
}

Input Schema

NameRequiredDescriptionDefault
slotYesThe exercise's slot in that session, from get_today or get_session.
sessionIdYesThe session's id, from get_today or get_schedule.
untilWeekNoKeep the swap for that day through this program week (the plan keeps going past week 26); null swaps this session only.
exerciseKeyYesThe exercise to put in the slot: its key from list_alternatives or get_session.
idempotencyKeyYesA new random id for this change (a UUID). Send the same one again only to retry this exact change.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / exerciseKey / description
      Added value: +"The exercise to put in the slot: its key from list_alternatives or get_session."
    • addedInput schema / properties / sessionId / description
      Added value: +"The session's id, from get_today or get_schedule."
    • addedInput schema / properties / slot / description
      Added value: +"The exercise's slot in that session, from get_today or get_session."
    • addedInput schema / properties / untilWeek / description
      Added value: +"Keep the swap for that day through this program week (the plan keeps going past week 26); null swaps this session only."
    • changedInput schema / properties / untilWeek / maximum
      Previous value: -26New value: +520
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Goes well past the annotations by disclosing consequences: the new exercise 'brings its own rules,' loads 'never carry over,' the swap scope depends on untilWeek, and the result 'Comes back with an Undo' – which softens the destructiveHint. It stops short of saying what happens to already-logged sets in the replaced slot, which is the main remaining behavioral question for a destructive tool.

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 usage condition, then scope semantics, then the exclusion – a sensible order with no filler. The telegraphic phrasing ('a week keeps the swap for that day through that program week') is dense but still parseable.

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?

With annotations, an output schema, and full parameter documentation, the description supplies what structured fields can't: the alternate source for exerciseKey, non-portability of loads, and the Undo affordance. Only the fate of previously logged data in the swapped slot is left implicit.

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 the schema already explains slot, sessionId, exerciseKey, and the untilWeek null-vs-week semantics. The description mainly restates untilWeek and points at list_alternatives as a key source, adding only marginal meaning 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?

States a specific verb and resource ('swap the exercise in a session') and explicitly separates it from the nearest sibling with 'Do not use to move a session; use move_session.' An agent can pick the right tool 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 Guidelines5/5

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

Gives the triggering situation ('when the person asks to swap the exercise'), names the fallback source for the replacement ('a same-movement one from list_alternatives when they leave it to you'), and states an explicit exclusion with the alternative that handles it.

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.