intervals-icu-mcp-server 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -202,6 +202,7 @@ export interface EventInput {
202
202
  race?: boolean;
203
203
  distance?: number;
204
204
  sub_type?: string;
205
+ workout_doc?: unknown;
205
206
  }
206
207
  export declare const AthleteSchema: z.ZodObject<{
207
208
  id: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -120,12 +120,13 @@ const TOOLS = [
120
120
  properties: {
121
121
  start_date_local: { type: "string", description: "Date/time in ISO 8601 format, e.g. 2024-06-01T08:00:00" },
122
122
  name: { type: "string", description: "Event name" },
123
- description: { type: "string", description: "Event description / workout notes" },
123
+ description: { type: "string", description: "Event description. To create a structured workout, write it in Intervals.icu's Workout Builder plain-text syntax, e.g. \"- Warmup 10m 50%\\n\\n4x\\n- Hard 4m 105%\\n- Easy 2m 50%\\n\\n- Cooldown 5m 50%\\n\" — Intervals.icu parses this into the workout structure (steps, duration, zones) automatically." },
124
124
  category: { type: "string", description: "Event category: WORKOUT, NOTE, RACE_A, RACE_B, RACE_C (race priority A/B/C)" },
125
125
  type: { type: "string", description: "Activity type: Ride, Run, Swim, WeightTraining, etc." },
126
126
  race: { type: "boolean", description: "Mark as a race event (default: false)" },
127
127
  distance: { type: "number", description: "Distance in meters (e.g. 100000 for 100km)" },
128
128
  sub_type: { type: "string", description: "Race category/sub-type (e.g. A, B, C)" },
129
+ workout_doc: { type: "object", description: "Pre-computed Intervals.icu workout_doc (as returned by get_event_by_id/list_workouts on an existing structured workout) to copy verbatim onto this event. Hand-written partial docs won't render correctly — prefer setting `description` with the Workout Builder syntax and omitting this field so Intervals.icu computes it." },
129
130
  athlete_id: { type: "string", description: "Athlete ID (defaults to ATHLETE_ID env var)" },
130
131
  api_key: { type: "string", description: "API key (defaults to API_KEY env var)" },
131
132
  },
@@ -141,12 +142,13 @@ const TOOLS = [
141
142
  event_id: { type: "string", description: "The event ID to update" },
142
143
  start_date_local: { type: "string", description: "New date/time (moves the event), e.g. 2024-06-05T08:00:00" },
143
144
  name: { type: "string", description: "New event name" },
144
- description: { type: "string", description: "New description" },
145
+ description: { type: "string", description: "New description. Use Intervals.icu's Workout Builder plain-text syntax (e.g. \"- Warmup 10m 50%\\n\\n4x\\n- Hard 4m 105%\\n- Easy 2m 50%\\n\\n- Cooldown 5m 50%\\n\") to have Intervals.icu recompute the workout structure." },
145
146
  category: { type: "string", description: "New category" },
146
147
  type: { type: "string", description: "New activity type" },
147
148
  race: { type: "boolean", description: "Toggle race flag" },
148
149
  distance: { type: "number", description: "Distance in meters (e.g. 100000 for 100km)" },
149
150
  sub_type: { type: "string", description: "Race category/sub-type (e.g. A, B, C)" },
151
+ workout_doc: { type: "object", description: "Pre-computed Intervals.icu workout_doc to copy verbatim. Hand-written partial docs won't render correctly — prefer updating `description` with Workout Builder syntax instead." },
150
152
  athlete_id: { type: "string", description: "Athlete ID (defaults to ATHLETE_ID env var)" },
151
153
  api_key: { type: "string", description: "API key (defaults to API_KEY env var)" },
152
154
  },
@@ -340,10 +342,11 @@ const TOOLS = [
340
342
  properties: {
341
343
  start_date_local: { type: "string", description: "ISO 8601 date/time" },
342
344
  name: { type: "string" },
343
- description: { type: "string" },
345
+ description: { type: "string", description: "Use Workout Builder plain-text syntax to get a structured workout (e.g. \"- Warmup 10m 50%\\n\\n4x\\n- Hard 4m 105%\\n- Easy 2m 50%\\n\\n- Cooldown 5m 50%\\n\")" },
344
346
  category: { type: "string" },
345
347
  type: { type: "string" },
346
348
  race: { type: "boolean" },
349
+ workout_doc: { type: "object", description: "Pre-computed workout_doc to copy verbatim; prefer `description` with Workout Builder syntax instead" },
347
350
  },
348
351
  },
349
352
  },
@@ -513,6 +516,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
513
516
  race: args["race"],
514
517
  distance: args["distance"],
515
518
  sub_type: args["sub_type"],
519
+ workout_doc: args["workout_doc"],
516
520
  });
517
521
  return { content: [{ type: "text", text: `Created event:\n\n${formatEvent(event)}` }] };
518
522
  }
@@ -520,7 +524,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
520
524
  const eventId = z.string().parse(args["event_id"]);
521
525
  const config = getConfig(args);
522
526
  const input = {};
523
- for (const key of ["name", "description", "start_date_local", "category", "type", "race", "distance", "sub_type"]) {
527
+ for (const key of ["name", "description", "start_date_local", "category", "type", "race", "distance", "sub_type", "workout_doc"]) {
524
528
  if (args[key] !== undefined)
525
529
  input[key] = args[key];
526
530
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intervals-icu-mcp-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server for Intervals.icu — 20 tools for activities, wellness, calendar events, workouts and more",
5
5
  "type": "module",
6
6
  "bin": {