Skip to main content
Glama
csikosaron98

Intervals.icu MCP Server

by csikosaron98

add_or_update_event

Create or update a training event on Intervals.icu by providing workout type, name, date, and structured steps—use event_id to modify an existing event.

Instructions

Post event for an athlete to Intervals.icu this follows the event api from intervals.icu If event_id is provided, the event will be updated instead of created.

Many arguments are required as this MCP tool function maps directly to the Intervals.icu API parameters.

Args: athlete_id: The Intervals.icu athlete ID (optional, will use ATHLETE_ID from .env if not provided) api_key: The Intervals.icu API key (optional, will use API_KEY from .env if not provided) event_id: The Intervals.icu event ID (optional, will use event_id from .env if not provided) start_date: Start date in YYYY-MM-DD format (optional, defaults to today) name: Name of the activity workout_doc: steps as a list of Step objects (optional, but necessary to define workout steps) workout_type: Workout type (e.g. Ride, Run, Swim, Walk, Row) moving_time: Total expected moving time of the workout in seconds (optional) distance: Total expected distance of the workout in meters (optional)

Example: "workout_doc": { "description": "High-intensity workout for increasing VO2 max", "steps": [ {"power": {"value": 80, "units": "%ftp"}, "duration": 900, "warmup": true}, {"reps": 2, "text": "High-intensity intervals", "steps": [ {"power": {"value": 110, "units": "%ftp"}, "distance": 500, "text": "High-intensity"}, {"power": {"value": 80, "units": "%ftp"}, "duration": 90, "text": "Recovery"} ]}, {"power": {"value": 80, "units": "%ftp"}, "duration": 600, "cooldown": true}, {"text": ""} ] }

Step properties: distance: Distance of step in meters {"distance": 5000} duration: Duration of step in seconds {"duration": 1800} power/hr/pace/cadence: Define step intensity Percentage of FTP: {"power": {"value": 80, "units": "%ftp"}} Absolute power: {"power": {"value": 200, "units": "w"}} Heart rate: {"hr": {"value": 75, "units": "%hr"}} Heart rate (LTHR): {"hr": {"value": 85, "units": "%lthr"}} Cadence: {"cadence": {"value": 90, "units": "cadence"}} Pace by ftp: {"pace": {"value": 80, "units": "%pace"}} Pace by zone: {"pace": {"value": 2, "units": "pace_zone"}} Zone by power: {"power": {"value": 2, "units": "power_zone"}} Zone by heart rate: {"hr": {"value": 2, "units": "hr_zone"}} Ranges: Specify ranges for power, heart rate, or cadence: {"power": {"start": 80, "end": 90, "units": "%ftp"}} Ramps: Instead of a range, indicate a gradual change in intensity (useful for ERG workouts): {"ramp": true, "power": {"start": 80, "end": 90, "units": "%ftp"}} Repeats: include the reps property and add nested steps {"reps": 3, "steps": [ {"power": {"value": 110, "units": "%ftp"}, "distance": 500, "text": "High-intensity"}, {"power": {"value": 80, "units": "%ftp"}, "duration": 90, "text": "Recovery"} ]} Free Ride: Include freeride to indicate a segment without ERG control, optionally with a suggested power range: {"freeride": true, "power": {"value": 80, "units": "%ftp"}} Comments and Labels: Add descriptive text to label steps: {"text": "Warmup"}

How to use steps:

  • Set distance or duration as appropriate for step

  • Use "reps" with nested steps to define repeat intervals (as in example above)

  • Define one of "power", "hr" or "pace" to define step intensity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
api_keyNo
distanceNo
event_idNo
athlete_idNo
start_dateNo
moving_timeNo
workout_docNo
workout_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Without annotations, this carries the full burden. It explains that the tool creates or updates an event depending on event_id, that auth falls back to .env values, and covers workout step behavior in detail. However, it does not say whether an update replaces fields partially or fully, what side effects an update has, or what response to expect, so transparency is incomplete.

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?

The content is long, but the tool's nested step structure justifies most of it; the opening is front-loaded and the sections (Args, Example, Step properties, How to use) are clearly organized. Some repetition exists in the Step examples, but it does not obscure the essential information.

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?

For high complexity and an output schema, this is close to complete: it gives a full example, enumerates step construction patterns, and explains defaults. It falls short on the ambiguous event_id/.env update behavior and the misleading 'many arguments are required' statement, and it leaves some WorkoutDoc fields undocumented, so a few edge cases could trip up an agent.

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?

Input schema has 0% coverage, so the description must compensate, and it does: top-level args get units, defaults, and env fallbacks, and Step properties get examples for power/hr/pace/cadence, ranges, ramps, repeats, and freeride. It is not exhaustive—several WorkoutDoc fields (ftp, lthr, target, locales, options) are absent and 'many arguments are required' conflicts with the schema's two required fields—but it adds substantial meaning.

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 first sentence names the action ('Post event'), the target resource (Intervals.icu), and the audience ('for an athlete'), then clarifies the create-vs-update behavior when event_id is present. This is enough for an agent to distinguish it from sibling event tools like get_events or delete_event.

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?

The description explicitly gives the create/update branch: if event_id is provided, update instead of create, and notes that many arguments map directly to the API. It does not enumerate when to prefer siblings such as delete_event or get_events, but the main decision point is covered.

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