Skip to main content
Glama

edit_routine

Destructive

Use this when the user wants to change one of their saved Reps routines: swap, add or remove exercises, or change sets, targets, order or name. First call get_routines for its routine_id, current exercises and updated_at. This writes straight away: tell the user exactly what will change (what is added, removed or adjusted) and wait for an explicit yes in this conversation. Send the FULL end state in exercises, every exercise the routine should contain, in order; anything left out is removed. A timed hold or cardio takes target_duration_seconds instead of target_reps. Pass the updated_at you read as base_updated_at: if the routine changed in the Reps app since, nothing is saved and the result is routine_changed. The result lists the routine as it now stands. The change shows up in the Reps app after its next sync (up to 5 minutes) or when the app is reopened.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
exercisesYes
routine_idYes
base_updated_atYes
estimated_duration_minutesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
nameYes
exercisesYes
routine_idYes
updated_atYes
exercise_countYes
visible_in_appYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / exercises / items / properties / target_duration_seconds
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / exercises / items / properties / target_duration_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / exercises / items / required
      Previous value: -[
      -  "name",
      -  "slug",
      -  "sets",
      -  "target_reps",
      -  "target_weight_kg"
      -]New value: +[
      +  "name",
      +  "slug",
      +  "sets",
      +  "target_reps",
      +  "target_weight_kg",
      +  "target_duration_seconds"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=false, and the description goes well beyond them: it warns the write is immediate, defines the destructive replace-all semantics ('anything left out is removed'), explains the optimistic-concurrency guard and the routine_changed failure mode, and notes the change only appears after sync (up to 5 minutes). This is exactly the context an agent needs before a destructive write.

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 when-to-use clause, then prerequisites, then safety/confirmation, then data-shape rules, then return/sync behavior. Dense but every sentence carries operational weight; the only mild cost is length, which is justified for a destructive write.

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?

Despite an output schema existing, the description still surfaces the key result semantics the agent must react to (the routine as it now stands, and the routine_changed no-write outcome). Prerequisites, confirmation, data shape, failure mode and sync delay are all covered for a destructive, non-idempotent tool.

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?

With 0% schema description coverage the description carries the load, and it does so for the highest-risk fields: exercises must be the FULL end state in order, omission means removal, and timed holds/cardio take target_duration_seconds instead of target_reps. base_updated_at is explained via the concurrency rule. It does not explain estimated_duration_minutes or nested fields like rest_seconds/notes, so it falls short of full compensation.

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 ('change one of their saved Reps routines') and enumerates what can change (swap/add/remove exercises, sets, targets, order, name). It is clearly distinguished from the sibling read tool get_routines and from save_routine by the explicit 'change ... saved' framing.

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?

Names the trigger condition ('when the user wants to change ... a saved routine'), mandates a prior get_routines call for routine_id/exercises/updated_at, and prescribes a required confirmation step with an explicit 'yes in this conversation' before writing. Alternatives and prerequisites are both spelled out.

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