intervals-icu-mcp-server 0.1.6 → 0.1.8
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 +1 -0
- package/dist/format.js +1 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
package/dist/format.js
CHANGED
|
@@ -23,7 +23,7 @@ export function formatActivity(a) {
|
|
|
23
23
|
"Other:",
|
|
24
24
|
` Cadence: ${n(a.average_cadence, " rpm")} | Calories: ${n(a.calories)} | Speed: ${n(a.average_speed, " m/s")}`,
|
|
25
25
|
` Temp: ${n(a.average_temp, "°C")} | Trainer: ${a.trainer ? "Yes" : "No"}`,
|
|
26
|
-
` RPE: ${n(a.icu_rpe ?? a.perceived_exertion)}/10 | Feel: ${n(a.feel)}/
|
|
26
|
+
` RPE: ${n(a.icu_rpe ?? a.perceived_exertion)}/10 | Feel: ${n(a.feel)}/5`,
|
|
27
27
|
"",
|
|
28
28
|
"Fitness:",
|
|
29
29
|
` CTL: ${n(a.icu_ctl)} | ATL: ${n(a.icu_atl)} | TRIMP: ${n(a.trimp)}`,
|
package/dist/index.js
CHANGED
|
@@ -126,6 +126,7 @@ const TOOLS = [
|
|
|
126
126
|
type: { type: "string", description: "Activity type: Ride, Run, Swim, WeightTraining, etc." },
|
|
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
|
+
color: { type: "string", description: "Event color, e.g. '#1f77b4' (hex) or a named color like 'blue', 'green', 'sky'" },
|
|
129
130
|
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." },
|
|
130
131
|
athlete_id: { type: "string", description: "Athlete ID (defaults to ATHLETE_ID env var)" },
|
|
131
132
|
api_key: { type: "string", description: "API key (defaults to API_KEY env var)" },
|
|
@@ -148,6 +149,7 @@ const TOOLS = [
|
|
|
148
149
|
type: { type: "string", description: "New activity type" },
|
|
149
150
|
distance: { type: "number", description: "Distance in meters (e.g. 100000 for 100km)" },
|
|
150
151
|
sub_type: { type: "string", description: "Race category/sub-type (e.g. A, B, C)" },
|
|
152
|
+
color: { type: "string", description: "Event color, e.g. '#1f77b4' (hex) or a named color like 'blue', 'green', 'sky'" },
|
|
151
153
|
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." },
|
|
152
154
|
athlete_id: { type: "string", description: "Athlete ID (defaults to ATHLETE_ID env var)" },
|
|
153
155
|
api_key: { type: "string", description: "API key (defaults to API_KEY env var)" },
|
|
@@ -345,6 +347,7 @@ const TOOLS = [
|
|
|
345
347
|
description: { type: "string", description: "Use Workout Builder plain-text syntax for a structured workout — '-<duration> <intensity>' step lines, 'Nx' repeat blocks, optional 'power=Ns' smoothing suffix, HR targets ('z4 90% hr'), cadence suffix ('85-95rpm'). Example: \"- Warmup 10m 50%\\n\\n4x\\n- Hard 4m 105% power=10s\\n- Easy 2m 50%\\n\\n- Cooldown 5m 50%\\n\"" },
|
|
346
348
|
category: { type: "string" },
|
|
347
349
|
type: { type: "string" },
|
|
350
|
+
color: { type: "string", description: "Event color, e.g. '#1f77b4' (hex) or a named color like 'blue', 'green', 'sky'" },
|
|
348
351
|
workout_doc: { type: "object", description: "Pre-computed workout_doc to copy verbatim; prefer `description` with Workout Builder syntax instead" },
|
|
349
352
|
},
|
|
350
353
|
},
|
|
@@ -515,6 +518,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
515
518
|
type: args["type"],
|
|
516
519
|
distance: args["distance"],
|
|
517
520
|
sub_type: args["sub_type"],
|
|
521
|
+
color: args["color"],
|
|
518
522
|
workout_doc: args["workout_doc"],
|
|
519
523
|
});
|
|
520
524
|
return { content: [{ type: "text", text: `Created event:\n\n${formatEvent(event)}` }] };
|
|
@@ -523,7 +527,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
523
527
|
const eventId = z.string().parse(args["event_id"]);
|
|
524
528
|
const config = getConfig(args);
|
|
525
529
|
const input = {};
|
|
526
|
-
for (const key of ["name", "description", "start_date_local", "end_date_local", "category", "type", "distance", "sub_type", "workout_doc"]) {
|
|
530
|
+
for (const key of ["name", "description", "start_date_local", "end_date_local", "category", "type", "distance", "sub_type", "color", "workout_doc"]) {
|
|
527
531
|
if (args[key] !== undefined)
|
|
528
532
|
input[key] = args[key];
|
|
529
533
|
}
|