Skip to main content
Glama

write_routine

Destructive

Create a new workout routine or update an existing one by ID, configuring exercises, sets, reps, progression, and supersets for an openGym training plan.

Instructions

Create a routine (no id) or change one (id). exercises, when given, is the new list in that order, in the format read_routine returns: for an exercise the routine already has, every field left out keeps its value and null removes it; a new exercise starts from the app's defaults (3 × 10, timed 3 × 45 s, cardio 1 × 20 min at 8 km/h). Fields openGym keeps that leap does not know are kept. Weights in the profile unit. progression is the routine default: off, linear (default), greyskull, double, triple (reps climb to the top of the range, then a set is added up to setsMax, then the weight goes up). Also per exercise: last set to failure, back-off sets, pyramids (reps, rest and weight per set), what a dumbbell weight means, and a superset's name and rest.

Input Schema

NameRequiredDescriptionDefault
idNo
nameNo
emojiNoThe app's icon key, e.g. figureStrength; unknown keys show the default icon; empty removes it
exercisesNo
progressionNo
excludeFromProgressionNoSessions of this routine (e.g. a deload) do not count for progression

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true; the description adds substantial merge semantics beyond that: omitted fields keep their value, null removes them, new exercises start from app defaults, and unknown openGym fields are kept. It conveys that providing exercises replaces the list but doesn't spell out auth or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information-dense and front-loaded with the create/change condition, but it is a single unbroken paragraph with no structure, mixing routine-level and exercise-level detail. Most sentences earn their place, yet the wall-of-text format hurts scanability for such a complex tool.

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 complex destructive mutation tool with no output schema and 33% schema coverage, the description is unusually complete on exercise semantics and progression. Gaps remain around the name/emoji/excludeFromProgression parameters and any return/confirmation behavior.

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 33%, so the description carries extra weight, and it does: it explains exercise-merge semantics, the 3 x 10 / timed / cardio defaults, progression meanings (off, linear, greyskull, double, triple), and per-exercise options like failure sets, back-off, pyramids and supersets. It leaves top-level name, emoji and excludeFromProgression unaddressed.

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?

The opening sentence gives a specific verb+resource and, crucially, resolves the create-vs-update ambiguity by id presence: 'Create a routine (no id) or change one (id).' This distinguishes it clearly from siblings like read_routine, read_routines, write_copy_routine and delete_routine.

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?

It clearly states the context that selects behavior (no id = create, id = change) and points to read_routine for the exercises format and read_exercises for exercise ids. It does not name alternative sibling tools such as write_copy_routine or exercise exclusions, so it stops short of full when-not guidance.

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