@burdenoff/mcp-libs 2026.1101.2 → 2026.1101.4
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/{chunk-WYCRYHHY.js → chunk-22WYCMVS.js} +3 -3
- package/dist/chunk-22WYCMVS.js.map +1 -0
- package/dist/{chunk-LUXDBCVJ.js → chunk-M5LRGPF7.js} +3 -3
- package/dist/{chunk-LUXDBCVJ.js.map → chunk-M5LRGPF7.js.map} +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/atheletebridge/index.js +1 -1
- package/dist/modules/auth/index.js +3 -3
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/fluidgrids/index.js +1 -1
- package/dist/modules/ggnomad/index.cjs +58 -25
- package/dist/modules/ggnomad/index.cjs.map +1 -1
- package/dist/modules/ggnomad/index.js +59 -26
- package/dist/modules/ggnomad/index.js.map +1 -1
- package/dist/modules/ggnomad/operations.d.ts +8 -8
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/headshotmarketing/index.js +1 -1
- package/dist/modules/health/index.js +1 -1
- package/dist/modules/healthybowl/index.js +1 -1
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/movethewheels/index.js +1 -1
- package/dist/modules/mybodyshield/index.cjs +344 -28
- package/dist/modules/mybodyshield/index.cjs.map +1 -1
- package/dist/modules/mybodyshield/index.js +345 -29
- package/dist/modules/mybodyshield/index.js.map +1 -1
- package/dist/modules/mybodyshield/operations.d.ts +29 -10
- package/dist/modules/mybodyshield/tools/capabilities.d.ts +3 -0
- package/dist/modules/mybodyshield/tools/continuations.d.ts +3 -0
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/timecampus/index.js +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.js +2 -2
- package/dist/modules/workspaces/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-WYCRYHHY.js.map +0 -1
|
@@ -119,8 +119,8 @@ var GET_PROGRAM = `
|
|
|
119
119
|
mybProgram(id: $id) {
|
|
120
120
|
${PROGRAM_FIELDS}
|
|
121
121
|
workouts {
|
|
122
|
-
${WORKOUT_FIELDS}
|
|
123
|
-
|
|
122
|
+
items { ${WORKOUT_FIELDS} exercises { items { ${EXERCISE_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } } }
|
|
123
|
+
pageInfo { ${PAGE_INFO_FIELDS} }
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -158,10 +158,10 @@ var ARCHIVE_PROGRAM = `
|
|
|
158
158
|
}
|
|
159
159
|
`;
|
|
160
160
|
var LIST_PROGRAM_WORKOUTS = `
|
|
161
|
-
query MybodyshieldListProgramWorkouts($programId: ID
|
|
162
|
-
mybProgramWorkouts(programId: $programId) {
|
|
163
|
-
${WORKOUT_FIELDS}
|
|
164
|
-
|
|
161
|
+
query MybodyshieldListProgramWorkouts($programId: ID!, $pagination: PaginationInput) {
|
|
162
|
+
mybProgramWorkouts(programId: $programId, pagination: $pagination) {
|
|
163
|
+
items { ${WORKOUT_FIELDS} exercises { items { ${EXERCISE_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } } }
|
|
164
|
+
pageInfo { ${PAGE_INFO_FIELDS} }
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
`;
|
|
@@ -179,7 +179,7 @@ var GET_SESSION = `
|
|
|
179
179
|
query MybodyshieldGetSession($id: ID!) {
|
|
180
180
|
mybSession(id: $id) {
|
|
181
181
|
${SESSION_FIELDS}
|
|
182
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
182
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
`;
|
|
@@ -192,7 +192,7 @@ var LIST_SESSIONS = `
|
|
|
192
192
|
mybListSessions(programId: $programId, status: $status, pagination: $pagination) {
|
|
193
193
|
items {
|
|
194
194
|
${SESSION_FIELDS}
|
|
195
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
195
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
196
196
|
}
|
|
197
197
|
pageInfo { ${PAGE_INFO_FIELDS} }
|
|
198
198
|
}
|
|
@@ -202,7 +202,7 @@ var START_SESSION = `
|
|
|
202
202
|
mutation MybodyshieldStartSession($input: MybStartSessionInput!) {
|
|
203
203
|
mybStartSession(input: $input) {
|
|
204
204
|
${SESSION_FIELDS}
|
|
205
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
205
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
`;
|
|
@@ -210,7 +210,7 @@ var COMPLETE_SESSION = `
|
|
|
210
210
|
mutation MybodyshieldCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
|
|
211
211
|
mybCompleteSession(id: $id, input: $input) {
|
|
212
212
|
${SESSION_FIELDS}
|
|
213
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
213
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
`;
|
|
@@ -223,7 +223,7 @@ var GET_NUTRITION_PLAN = `
|
|
|
223
223
|
query MybodyshieldGetNutritionPlan($id: ID!) {
|
|
224
224
|
mybNutritionPlan(id: $id) {
|
|
225
225
|
${NUTRITION_PLAN_FIELDS}
|
|
226
|
-
meals { ${MEAL_FIELDS} }
|
|
226
|
+
meals { items { ${MEAL_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
`;
|
|
@@ -231,7 +231,7 @@ var ACTIVE_NUTRITION_PLAN = `
|
|
|
231
231
|
query MybodyshieldActiveNutritionPlan($memberId: ID) {
|
|
232
232
|
mybActiveNutritionPlan(memberId: $memberId) {
|
|
233
233
|
${NUTRITION_PLAN_FIELDS}
|
|
234
|
-
meals { ${MEAL_FIELDS} }
|
|
234
|
+
meals { items { ${MEAL_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
`;
|
|
@@ -330,8 +330,8 @@ var RECORD_BODY_METRIC = `
|
|
|
330
330
|
}
|
|
331
331
|
`;
|
|
332
332
|
var LIST_RECOVERY_LOGS = `
|
|
333
|
-
query MybodyshieldListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric) {
|
|
334
|
-
mybListRecoveryLogs(memberId: $memberId, metric: $metric) { ${RECOVERY_FIELDS} }
|
|
333
|
+
query MybodyshieldListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric, $pagination: PaginationInput) {
|
|
334
|
+
mybListRecoveryLogs(memberId: $memberId, metric: $metric, pagination: $pagination) { items { ${RECOVERY_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
335
335
|
}
|
|
336
336
|
`;
|
|
337
337
|
var LOG_RECOVERY = `
|
|
@@ -340,8 +340,8 @@ var LOG_RECOVERY = `
|
|
|
340
340
|
}
|
|
341
341
|
`;
|
|
342
342
|
var LIST_COACHING = `
|
|
343
|
-
query MybodyshieldListCoaching($memberId: ID, $status: MybCoachingStatus) {
|
|
344
|
-
mybListCoaching(memberId: $memberId, status: $status) { ${COACHING_FIELDS} }
|
|
343
|
+
query MybodyshieldListCoaching($memberId: ID, $status: MybCoachingStatus, $pagination: PaginationInput) {
|
|
344
|
+
mybListCoaching(memberId: $memberId, status: $status, pagination: $pagination) { items { ${COACHING_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
345
345
|
}
|
|
346
346
|
`;
|
|
347
347
|
var CREATE_COACHING = `
|
|
@@ -359,6 +359,37 @@ var HEALTH = `
|
|
|
359
359
|
mybHealth
|
|
360
360
|
}
|
|
361
361
|
`;
|
|
362
|
+
var LIST_WORKOUT_EXERCISES = `
|
|
363
|
+
query MybodyshieldListWorkoutExercises($workoutId: ID!, $pagination: PaginationInput) {
|
|
364
|
+
mybWorkoutExercises(workoutId: $workoutId, pagination: $pagination) {
|
|
365
|
+
items { ${EXERCISE_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} }
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
`;
|
|
369
|
+
var LIST_SESSION_SETS = `
|
|
370
|
+
query MybodyshieldListSessionSets($sessionId: ID!, $pagination: PaginationInput) {
|
|
371
|
+
mybSessionSets(sessionId: $sessionId, pagination: $pagination) {
|
|
372
|
+
items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} }
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
`;
|
|
376
|
+
var MYB_AI_SETTINGS = "query MybAiSettings { mybAiSettings { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }";
|
|
377
|
+
var MYB_UPDATE_AI_SETTINGS = "mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) { mybUpdateAiSettings(input: $input) { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }";
|
|
378
|
+
var MYB_LIST_AI_OPERATION_LOGS = "query MybListAiOperationLogs($pagination: PaginationInput) { mybListAiOperationLogs(pagination: $pagination) { items { createdAt errorMessage id inputTokens memberId modelName operationType outputTokens provider status workspaceId } pageInfo { cursor hasMore } } }";
|
|
379
|
+
var MYB_TODAY_GUIDANCE = "query MybTodayGuidance($memberId: ID) { mybTodayGuidance(memberId: $memberId) { aiSummary cards { action reason signal } date memberId readinessScore } }";
|
|
380
|
+
var MYB_INSIGHTS = "query MybInsights($dateRangeEnd: DateTime, $dateRangeStart: DateTime, $memberId: ID) { mybInsights(dateRangeEnd: $dateRangeEnd, dateRangeStart: $dateRangeStart, memberId: $memberId) { daily { calories carbsG date fatG proteinG readiness sessions sleepHours volumeKg weight } dateRangeEnd dateRangeStart goals { achievedAt baselineValue createdAt currentValue description id memberId status targetDate targetValue title type unit updatedAt workspaceId } summary { averageReadiness consistencyStreakDays macroAdherencePercent totalSessions totalVolumeKg } } }";
|
|
381
|
+
var MYB_EXERCISE_BEST_SET = "query MybExerciseBestSet($exerciseName: String!) { mybExerciseBestSet(exerciseName: $exerciseName) { createdAt distanceM durationSec exerciseName id isPersonalRecord reps sessionId setNumber updatedAt weight workspaceId } }";
|
|
382
|
+
var MYB_SEARCH_FOODS = "query MybSearchFoods($limit: Int, $query: String!) { mybSearchFoods(limit: $limit, query: $query) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }";
|
|
383
|
+
var MYB_FOOD_BY_BARCODE = "query MybFoodByBarcode($barcode: String!) { mybFoodByBarcode(barcode: $barcode) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }";
|
|
384
|
+
var MYB_LIST_DEVICE_CONNECTIONS = "query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }";
|
|
385
|
+
var MYB_CONNECT_DEVICE = "mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }";
|
|
386
|
+
var MYB_DISCONNECT_DEVICE = "mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }";
|
|
387
|
+
var MYB_SYNC_DEVICE_READINGS = "mutation MybSyncDeviceReadings($connectionId: ID!, $readings: [MybSyncReadingInput!]!) { mybSyncDeviceReadings(connectionId: $connectionId, readings: $readings) { connectionId createdAt id metricType normalizedBodyMetricId normalizedRecoveryLogId recordedAt unit value } }";
|
|
388
|
+
var MYB_LIST_LEGAL_ACCEPTANCES = "query MybListLegalAcceptances($actorId: ID, $checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybListLegalAcceptances(actorId: $actorId, checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }";
|
|
389
|
+
var MYB_MY_LEGAL_ACCEPTANCES = "query MybMyLegalAcceptances($checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybMyLegalAcceptances(checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }";
|
|
390
|
+
var MYB_RECORD_LEGAL_ACCEPTANCE = "mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }";
|
|
391
|
+
var MYB_MY_AI_PROCESSING_CONSENT = "query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }";
|
|
392
|
+
var MYB_SET_AI_PROCESSING_CONSENT = "mutation MybSetAiProcessingConsent($enabled: Boolean!) { mybSetAiProcessingConsent(enabled: $enabled) { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }";
|
|
362
393
|
var GoalTypeEnum = zod.z.enum(["ENDURANCE", "GENERAL_FITNESS", "MOBILITY", "MUSCLE_GAIN", "STRENGTH", "WEIGHT_LOSS"]).describe("Training/nutrition goal type (MybGoalType)");
|
|
363
394
|
var GoalStatusEnum = zod.z.enum(["ABANDONED", "ACHIEVED", "ACTIVE", "PAUSED"]).describe("Lifecycle status of a goal (MybGoalStatus)");
|
|
364
395
|
var FitnessLevelEnum = zod.z.enum(["ADVANCED", "BEGINNER", "ELITE", "INTERMEDIATE"]).describe("Member fitness level for a program (MybFitnessLevel)");
|
|
@@ -601,12 +632,20 @@ function registerWorkoutTools(server, ctx, track) {
|
|
|
601
632
|
{
|
|
602
633
|
title: "List Program Workouts",
|
|
603
634
|
description: "List the workouts for a program (ordered), each with its nested exercises.",
|
|
604
|
-
inputSchema: {
|
|
635
|
+
inputSchema: {
|
|
636
|
+
programId: zod.z.string().describe("Program ID"),
|
|
637
|
+
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
638
|
+
offset: zod.z.number().int().min(0).optional(),
|
|
639
|
+
cursor: zod.z.string().optional()
|
|
640
|
+
},
|
|
605
641
|
annotations: { readOnlyHint: true }
|
|
606
642
|
},
|
|
607
|
-
async ({ programId }) => {
|
|
643
|
+
async ({ programId, limit, offset, cursor }) => {
|
|
608
644
|
try {
|
|
609
|
-
const data = await ctx.gql.workspace.request(LIST_PROGRAM_WORKOUTS, {
|
|
645
|
+
const data = await ctx.gql.workspace.request(LIST_PROGRAM_WORKOUTS, {
|
|
646
|
+
programId,
|
|
647
|
+
pagination: { limit: limit ?? 50, offset: offset ?? 0, cursor }
|
|
648
|
+
});
|
|
610
649
|
return jsonResult(data.mybProgramWorkouts);
|
|
611
650
|
} catch (error) {
|
|
612
651
|
ctx.logger.error("mybodyshield workouts_list failed", { error: String(error) });
|
|
@@ -1414,16 +1453,23 @@ function registerRecoveryTools(server, ctx, track) {
|
|
|
1414
1453
|
track(mcpToolName(ctx.productName, "recovery_list")),
|
|
1415
1454
|
{
|
|
1416
1455
|
title: "List Recovery Logs",
|
|
1417
|
-
description: "List recovery/wellbeing logs in the bound workspace, optionally filtered by member and metric. Returns
|
|
1456
|
+
description: "List recovery/wellbeing logs in the bound workspace, optionally filtered by member and metric. Returns { items, pageInfo }; use cursor to continue.",
|
|
1418
1457
|
inputSchema: {
|
|
1419
1458
|
memberId: zod.z.string().optional().describe("Filter by member (user) ID"),
|
|
1420
|
-
metric: RecoveryMetricEnum.optional().describe("Filter by recovery metric")
|
|
1459
|
+
metric: RecoveryMetricEnum.optional().describe("Filter by recovery metric"),
|
|
1460
|
+
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
1461
|
+
offset: zod.z.number().int().min(0).optional(),
|
|
1462
|
+
cursor: zod.z.string().optional()
|
|
1421
1463
|
},
|
|
1422
1464
|
annotations: { readOnlyHint: true }
|
|
1423
1465
|
},
|
|
1424
|
-
async ({ memberId, metric }) => {
|
|
1466
|
+
async ({ memberId, metric, limit, offset, cursor }) => {
|
|
1425
1467
|
try {
|
|
1426
|
-
const data = await ctx.gql.workspace.request(LIST_RECOVERY_LOGS, {
|
|
1468
|
+
const data = await ctx.gql.workspace.request(LIST_RECOVERY_LOGS, {
|
|
1469
|
+
memberId,
|
|
1470
|
+
metric,
|
|
1471
|
+
pagination: { limit: limit ?? 50, offset: offset ?? 0, cursor }
|
|
1472
|
+
});
|
|
1427
1473
|
return jsonResult(data.mybListRecoveryLogs);
|
|
1428
1474
|
} catch (error) {
|
|
1429
1475
|
ctx.logger.error("mybodyshield recovery_list failed", { error: String(error) });
|
|
@@ -1472,16 +1518,23 @@ function registerCoachingTools(server, ctx, track) {
|
|
|
1472
1518
|
track(mcpToolName(ctx.productName, "coaching_list")),
|
|
1473
1519
|
{
|
|
1474
1520
|
title: "List Coaching Relationships",
|
|
1475
|
-
description: "List coach\u2194member coaching relationships in the bound workspace, optionally filtered by member and status. Returns
|
|
1521
|
+
description: "List coach\u2194member coaching relationships in the bound workspace, optionally filtered by member and status. Returns { items, pageInfo }; use cursor to continue.",
|
|
1476
1522
|
inputSchema: {
|
|
1477
1523
|
memberId: zod.z.string().optional().describe("Filter by member (user) ID"),
|
|
1478
|
-
status: CoachingStatusEnum.optional().describe("Filter by coaching status")
|
|
1524
|
+
status: CoachingStatusEnum.optional().describe("Filter by coaching status"),
|
|
1525
|
+
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
1526
|
+
offset: zod.z.number().int().min(0).optional(),
|
|
1527
|
+
cursor: zod.z.string().optional()
|
|
1479
1528
|
},
|
|
1480
1529
|
annotations: { readOnlyHint: true }
|
|
1481
1530
|
},
|
|
1482
|
-
async ({ memberId, status }) => {
|
|
1531
|
+
async ({ memberId, status, limit, offset, cursor }) => {
|
|
1483
1532
|
try {
|
|
1484
|
-
const data = await ctx.gql.workspace.request(LIST_COACHING, {
|
|
1533
|
+
const data = await ctx.gql.workspace.request(LIST_COACHING, {
|
|
1534
|
+
memberId,
|
|
1535
|
+
status,
|
|
1536
|
+
pagination: { limit: limit ?? 50, offset: offset ?? 0, cursor }
|
|
1537
|
+
});
|
|
1485
1538
|
return jsonResult(data.mybListCoaching);
|
|
1486
1539
|
} catch (error) {
|
|
1487
1540
|
ctx.logger.error("mybodyshield coaching_list failed", { error: String(error) });
|
|
@@ -1555,6 +1608,267 @@ function registerCoachingTools(server, ctx, track) {
|
|
|
1555
1608
|
}
|
|
1556
1609
|
);
|
|
1557
1610
|
}
|
|
1611
|
+
function registerCapabilityTools(server, ctx, track) {
|
|
1612
|
+
const tool = (name, field, document, inputSchema, readOnly, sensitive) => {
|
|
1613
|
+
server.registerTool(
|
|
1614
|
+
track(mcpToolName(ctx.productName, name)),
|
|
1615
|
+
{
|
|
1616
|
+
title: name.replaceAll("_", " "),
|
|
1617
|
+
description: sensitive ? "Execute only on explicit member instruction after reviewing the input and scope. Confirm to proceed. Gateway authorization and consent still apply." : "Call the current workspace API. Collection results retain items and pageInfo for continuation.",
|
|
1618
|
+
inputSchema,
|
|
1619
|
+
annotations: {
|
|
1620
|
+
readOnlyHint: readOnly,
|
|
1621
|
+
destructiveHint: sensitive,
|
|
1622
|
+
idempotentHint: readOnly && !sensitive
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
async (variables) => {
|
|
1626
|
+
try {
|
|
1627
|
+
const data = await ctx.gql.workspace.request(
|
|
1628
|
+
document,
|
|
1629
|
+
variables
|
|
1630
|
+
);
|
|
1631
|
+
return jsonResult(data[field]);
|
|
1632
|
+
} catch (error) {
|
|
1633
|
+
const message = error instanceof Error ? error.message : "GraphQL request failed";
|
|
1634
|
+
ctx.logger.error(`mybodyshield ${name} failed`, { error: message });
|
|
1635
|
+
return errorResult(`Operation failed: ${message}`);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
);
|
|
1639
|
+
};
|
|
1640
|
+
tool("ai_settings", "mybAiSettings", MYB_AI_SETTINGS, {}, true, false);
|
|
1641
|
+
tool(
|
|
1642
|
+
"ai_update_settings",
|
|
1643
|
+
"mybUpdateAiSettings",
|
|
1644
|
+
MYB_UPDATE_AI_SETTINGS,
|
|
1645
|
+
{
|
|
1646
|
+
input: zod.z.object({
|
|
1647
|
+
dailyAllowance: zod.z.number().int().safe().nullable().optional(),
|
|
1648
|
+
modelName: zod.z.string().nullable().optional(),
|
|
1649
|
+
provider: zod.z.enum(["ANTHROPIC", "GEMINI", "OPENAI"]).nullable().optional(),
|
|
1650
|
+
providerKey: zod.z.string().nullable().optional()
|
|
1651
|
+
}).strict()
|
|
1652
|
+
},
|
|
1653
|
+
false,
|
|
1654
|
+
true
|
|
1655
|
+
);
|
|
1656
|
+
tool(
|
|
1657
|
+
"ai_operation_logs",
|
|
1658
|
+
"mybListAiOperationLogs",
|
|
1659
|
+
MYB_LIST_AI_OPERATION_LOGS,
|
|
1660
|
+
{
|
|
1661
|
+
pagination: zod.z.object({
|
|
1662
|
+
cursor: zod.z.string().nullable().optional(),
|
|
1663
|
+
limit: zod.z.number().int().safe().nullable().optional(),
|
|
1664
|
+
offset: zod.z.number().int().safe().nullable().optional()
|
|
1665
|
+
}).strict().nullable().optional()
|
|
1666
|
+
},
|
|
1667
|
+
true,
|
|
1668
|
+
false
|
|
1669
|
+
);
|
|
1670
|
+
tool(
|
|
1671
|
+
"wellbeing_guidance",
|
|
1672
|
+
"mybTodayGuidance",
|
|
1673
|
+
MYB_TODAY_GUIDANCE,
|
|
1674
|
+
{ memberId: zod.z.string().min(1).nullable().optional() },
|
|
1675
|
+
true,
|
|
1676
|
+
false
|
|
1677
|
+
);
|
|
1678
|
+
tool(
|
|
1679
|
+
"wellbeing_insights",
|
|
1680
|
+
"mybInsights",
|
|
1681
|
+
MYB_INSIGHTS,
|
|
1682
|
+
{
|
|
1683
|
+
dateRangeEnd: zod.z.string().nullable().optional(),
|
|
1684
|
+
dateRangeStart: zod.z.string().nullable().optional(),
|
|
1685
|
+
memberId: zod.z.string().min(1).nullable().optional()
|
|
1686
|
+
},
|
|
1687
|
+
true,
|
|
1688
|
+
false
|
|
1689
|
+
);
|
|
1690
|
+
tool(
|
|
1691
|
+
"performance_exercise_best_set",
|
|
1692
|
+
"mybExerciseBestSet",
|
|
1693
|
+
MYB_EXERCISE_BEST_SET,
|
|
1694
|
+
{ exerciseName: zod.z.string() },
|
|
1695
|
+
true,
|
|
1696
|
+
false
|
|
1697
|
+
);
|
|
1698
|
+
tool(
|
|
1699
|
+
"foods_search",
|
|
1700
|
+
"mybSearchFoods",
|
|
1701
|
+
MYB_SEARCH_FOODS,
|
|
1702
|
+
{ limit: zod.z.number().int().safe().nullable().optional(), query: zod.z.string() },
|
|
1703
|
+
true,
|
|
1704
|
+
false
|
|
1705
|
+
);
|
|
1706
|
+
tool(
|
|
1707
|
+
"foods_by_barcode",
|
|
1708
|
+
"mybFoodByBarcode",
|
|
1709
|
+
MYB_FOOD_BY_BARCODE,
|
|
1710
|
+
{ barcode: zod.z.string() },
|
|
1711
|
+
true,
|
|
1712
|
+
false
|
|
1713
|
+
);
|
|
1714
|
+
tool(
|
|
1715
|
+
"devices_list",
|
|
1716
|
+
"mybListDeviceConnections",
|
|
1717
|
+
MYB_LIST_DEVICE_CONNECTIONS,
|
|
1718
|
+
{ memberId: zod.z.string().min(1).nullable().optional() },
|
|
1719
|
+
true,
|
|
1720
|
+
false
|
|
1721
|
+
);
|
|
1722
|
+
tool(
|
|
1723
|
+
"devices_connect",
|
|
1724
|
+
"mybConnectDevice",
|
|
1725
|
+
MYB_CONNECT_DEVICE,
|
|
1726
|
+
{
|
|
1727
|
+
input: zod.z.object({
|
|
1728
|
+
externalAccountId: zod.z.string().nullable().optional(),
|
|
1729
|
+
memberId: zod.z.string().min(1).nullable().optional(),
|
|
1730
|
+
provider: zod.z.enum(["APPLE_HEALTH", "GARMIN", "HEALTH_CONNECT", "OURA", "WHOOP"]),
|
|
1731
|
+
scopes: zod.z.array(zod.z.string()).nullable().optional()
|
|
1732
|
+
}).strict()
|
|
1733
|
+
},
|
|
1734
|
+
false,
|
|
1735
|
+
true
|
|
1736
|
+
);
|
|
1737
|
+
tool(
|
|
1738
|
+
"devices_disconnect",
|
|
1739
|
+
"mybDisconnectDevice",
|
|
1740
|
+
MYB_DISCONNECT_DEVICE,
|
|
1741
|
+
{ id: zod.z.string().min(1) },
|
|
1742
|
+
false,
|
|
1743
|
+
true
|
|
1744
|
+
);
|
|
1745
|
+
tool(
|
|
1746
|
+
"devices_sync_readings",
|
|
1747
|
+
"mybSyncDeviceReadings",
|
|
1748
|
+
MYB_SYNC_DEVICE_READINGS,
|
|
1749
|
+
{
|
|
1750
|
+
connectionId: zod.z.string().min(1),
|
|
1751
|
+
readings: zod.z.array(
|
|
1752
|
+
zod.z.object({
|
|
1753
|
+
metricType: zod.z.enum([
|
|
1754
|
+
"ACTIVE_ENERGY",
|
|
1755
|
+
"HRV",
|
|
1756
|
+
"READINESS_SCORE",
|
|
1757
|
+
"RESTING_HEART_RATE",
|
|
1758
|
+
"SLEEP_DURATION",
|
|
1759
|
+
"STEPS",
|
|
1760
|
+
"WORKOUT_COMPLETED"
|
|
1761
|
+
]),
|
|
1762
|
+
recordedAt: zod.z.string(),
|
|
1763
|
+
unit: zod.z.string().nullable().optional(),
|
|
1764
|
+
value: zod.z.number().finite()
|
|
1765
|
+
}).strict()
|
|
1766
|
+
)
|
|
1767
|
+
},
|
|
1768
|
+
false,
|
|
1769
|
+
true
|
|
1770
|
+
);
|
|
1771
|
+
tool(
|
|
1772
|
+
"legal_list",
|
|
1773
|
+
"mybListLegalAcceptances",
|
|
1774
|
+
MYB_LIST_LEGAL_ACCEPTANCES,
|
|
1775
|
+
{
|
|
1776
|
+
actorId: zod.z.string().min(1).nullable().optional(),
|
|
1777
|
+
checkpointType: zod.z.enum(["HEALTH_DISCLAIMER_ACCEPT", "PRIVACY_ACCEPT", "TOS_ACCEPT"]).nullable().optional(),
|
|
1778
|
+
pagination: zod.z.object({
|
|
1779
|
+
cursor: zod.z.string().nullable().optional(),
|
|
1780
|
+
limit: zod.z.number().int().safe().nullable().optional(),
|
|
1781
|
+
offset: zod.z.number().int().safe().nullable().optional()
|
|
1782
|
+
}).strict().nullable().optional()
|
|
1783
|
+
},
|
|
1784
|
+
true,
|
|
1785
|
+
false
|
|
1786
|
+
);
|
|
1787
|
+
tool(
|
|
1788
|
+
"legal_mine",
|
|
1789
|
+
"mybMyLegalAcceptances",
|
|
1790
|
+
MYB_MY_LEGAL_ACCEPTANCES,
|
|
1791
|
+
{
|
|
1792
|
+
checkpointType: zod.z.enum(["HEALTH_DISCLAIMER_ACCEPT", "PRIVACY_ACCEPT", "TOS_ACCEPT"]).nullable().optional(),
|
|
1793
|
+
pagination: zod.z.object({
|
|
1794
|
+
cursor: zod.z.string().nullable().optional(),
|
|
1795
|
+
limit: zod.z.number().int().safe().nullable().optional(),
|
|
1796
|
+
offset: zod.z.number().int().safe().nullable().optional()
|
|
1797
|
+
}).strict().nullable().optional()
|
|
1798
|
+
},
|
|
1799
|
+
true,
|
|
1800
|
+
false
|
|
1801
|
+
);
|
|
1802
|
+
tool(
|
|
1803
|
+
"legal_record",
|
|
1804
|
+
"mybRecordLegalAcceptance",
|
|
1805
|
+
MYB_RECORD_LEGAL_ACCEPTANCE,
|
|
1806
|
+
{
|
|
1807
|
+
input: zod.z.object({
|
|
1808
|
+
checkpointType: zod.z.enum(["HEALTH_DISCLAIMER_ACCEPT", "PRIVACY_ACCEPT", "TOS_ACCEPT"]),
|
|
1809
|
+
documentVersion: zod.z.string(),
|
|
1810
|
+
ipAddress: zod.z.string().nullable().optional(),
|
|
1811
|
+
userAgent: zod.z.string().nullable().optional()
|
|
1812
|
+
}).strict()
|
|
1813
|
+
},
|
|
1814
|
+
false,
|
|
1815
|
+
true
|
|
1816
|
+
);
|
|
1817
|
+
tool(
|
|
1818
|
+
"privacy_ai_processing_consent",
|
|
1819
|
+
"mybMyAiProcessingConsent",
|
|
1820
|
+
MYB_MY_AI_PROCESSING_CONSENT,
|
|
1821
|
+
{},
|
|
1822
|
+
true,
|
|
1823
|
+
false
|
|
1824
|
+
);
|
|
1825
|
+
tool(
|
|
1826
|
+
"privacy_set_ai_processing_consent",
|
|
1827
|
+
"mybSetAiProcessingConsent",
|
|
1828
|
+
MYB_SET_AI_PROCESSING_CONSENT,
|
|
1829
|
+
{ enabled: zod.z.boolean() },
|
|
1830
|
+
false,
|
|
1831
|
+
true
|
|
1832
|
+
);
|
|
1833
|
+
}
|
|
1834
|
+
function registerContinuationTools(server, ctx, track) {
|
|
1835
|
+
for (const [name, parent, field, document] of [
|
|
1836
|
+
["workouts_list_exercises", "workoutId", "mybWorkoutExercises", LIST_WORKOUT_EXERCISES],
|
|
1837
|
+
["sessions_list_sets", "sessionId", "mybSessionSets", LIST_SESSION_SETS]
|
|
1838
|
+
]) {
|
|
1839
|
+
server.registerTool(
|
|
1840
|
+
track(mcpToolName(ctx.productName, name)),
|
|
1841
|
+
{
|
|
1842
|
+
title: name === "workouts_list_exercises" ? "List Workout Exercises" : "List Session Sets",
|
|
1843
|
+
description: "Read a child collection as { items, pageInfo }. Pass pageInfo.cursor to continue.",
|
|
1844
|
+
inputSchema: {
|
|
1845
|
+
[parent]: zod.z.string().min(1),
|
|
1846
|
+
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
1847
|
+
offset: zod.z.number().int().min(0).optional(),
|
|
1848
|
+
cursor: zod.z.string().optional()
|
|
1849
|
+
},
|
|
1850
|
+
annotations: { readOnlyHint: true }
|
|
1851
|
+
},
|
|
1852
|
+
async (input) => {
|
|
1853
|
+
try {
|
|
1854
|
+
const data = await ctx.gql.workspace.request(document, {
|
|
1855
|
+
[parent]: input[parent],
|
|
1856
|
+
pagination: {
|
|
1857
|
+
limit: input.limit ?? 50,
|
|
1858
|
+
offset: input.offset ?? 0,
|
|
1859
|
+
cursor: input.cursor
|
|
1860
|
+
}
|
|
1861
|
+
});
|
|
1862
|
+
return jsonResult(data[field]);
|
|
1863
|
+
} catch (error) {
|
|
1864
|
+
const message = error instanceof Error ? error.message : "GraphQL request failed";
|
|
1865
|
+
ctx.logger.error(`mybodyshield ${name} failed`, { error: message });
|
|
1866
|
+
return errorResult(`Failed to read child collection: ${message}`);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1558
1872
|
|
|
1559
1873
|
// src/modules/mybodyshield/tools/health.ts
|
|
1560
1874
|
function registerHealthTools(server, ctx, track) {
|
|
@@ -1568,7 +1882,7 @@ function registerHealthTools(server, ctx, track) {
|
|
|
1568
1882
|
},
|
|
1569
1883
|
async () => {
|
|
1570
1884
|
try {
|
|
1571
|
-
const data = await ctx.gql.
|
|
1885
|
+
const data = await ctx.gql.workspaceAuthOnly.request(HEALTH, {});
|
|
1572
1886
|
return jsonResult({ ok: true, status: data.mybHealth });
|
|
1573
1887
|
} catch (error) {
|
|
1574
1888
|
ctx.logger.error("mybodyshield health failed", { error: String(error) });
|
|
@@ -1862,6 +2176,8 @@ var mybodyshieldModule = {
|
|
|
1862
2176
|
registerRecoveryTools(server, ctx, trackTool);
|
|
1863
2177
|
registerCoachingTools(server, ctx, trackTool);
|
|
1864
2178
|
registerHealthTools(server, ctx, trackTool);
|
|
2179
|
+
registerContinuationTools(server, ctx, trackTool);
|
|
2180
|
+
registerCapabilityTools(server, ctx, trackTool);
|
|
1865
2181
|
registerMybodyshieldResources(server, ctx, trackResource);
|
|
1866
2182
|
registerMybodyshieldPrompts(server, ctx, trackPrompt);
|
|
1867
2183
|
return { tools, resources, prompts };
|