Skip to main content
Glama

swap_workout_exercise

Destructive

Replace a single exercise in a workout plan by its order (confirm-gated) — the surgical alternative to update_workout_plan. exerciseOrder is the order of the slot to replace (see list_workout_plans). newExercise is one exercise in the create_workout_plan shape; carry over exerciseId from search_exercises when there's a catalog match.

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": {
      "planId": "<planId>",
      "exerciseOrder": "<exerciseOrder>",
      "newExercise": "<newExercise>"
    },
    "name": "swap_workout_exercise"
  }
}

Input Schema

NameRequiredDescriptionDefault
planIdYes
confirmNoMust be true to actually execute. If false/omitted, returns a preview only.
newExerciseYes
exerciseOrderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the agent knows this mutates state. The description adds that the operation is confirm-gated and scoped to a single slot, but the confirm/preview mechanics are actually documented in the schema's confirm parameter, not the description. It does not say what happens to the replaced exercise or whether the plan must be in a particular state.

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?

Two tightly packed sentences with no filler, and the core action plus the confirm gate are front-loaded. The density is high enough that the cross-references (three sibling tools, one object shape) require careful reading, which keeps it just below top marks.

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 mutation with a nested free-form object and no output schema, the definition supplies what an agent needs to call it correctly: where to get the order value, how to shape the new exercise, and how to actually execute versus preview. It omits only the failure modes and the shape of the returned plan.

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

Parameters4/5

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

Schema coverage is only 25%, yet the description compensates well: exerciseOrder is defined as the slot's `order` value with a pointer to list_workout_plans, and newExercise is described as matching the create_workout_plan shape with an exerciseId carried from search_exercises. Only planId is left to the schema, which is self-evident.

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 precise verb and resource ("Replace a single exercise in a workout plan by its order") plus its scope limit. It explicitly distances itself from the sibling update_workout_plan, so an agent can choose between them 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?

Gives clear routing guidance: this is the "surgical alternative to update_workout_plan," and it points to list_workout_plans for obtaining exerciseOrder. It also implies the confirm-gated preview path. It stops short of an explicit "use update_workout_plan when X" exclusion statement, but the context is unambiguous.

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.