@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mcpToolName, errorResult, jsonResult, mcpResourceUri, mcpPromptName } from '../../chunk-
|
|
1
|
+
import { mcpToolName, errorResult, jsonResult, mcpResourceUri, mcpPromptName } from '../../chunk-22WYCMVS.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// src/modules/mybodyshield/operations.ts
|
|
@@ -57,8 +57,8 @@ var GET_PROGRAM = `
|
|
|
57
57
|
mybProgram(id: $id) {
|
|
58
58
|
${PROGRAM_FIELDS}
|
|
59
59
|
workouts {
|
|
60
|
-
${WORKOUT_FIELDS}
|
|
61
|
-
|
|
60
|
+
items { ${WORKOUT_FIELDS} exercises { items { ${EXERCISE_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } } }
|
|
61
|
+
pageInfo { ${PAGE_INFO_FIELDS} }
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -96,10 +96,10 @@ var ARCHIVE_PROGRAM = `
|
|
|
96
96
|
}
|
|
97
97
|
`;
|
|
98
98
|
var LIST_PROGRAM_WORKOUTS = `
|
|
99
|
-
query MybodyshieldListProgramWorkouts($programId: ID
|
|
100
|
-
mybProgramWorkouts(programId: $programId) {
|
|
101
|
-
${WORKOUT_FIELDS}
|
|
102
|
-
|
|
99
|
+
query MybodyshieldListProgramWorkouts($programId: ID!, $pagination: PaginationInput) {
|
|
100
|
+
mybProgramWorkouts(programId: $programId, pagination: $pagination) {
|
|
101
|
+
items { ${WORKOUT_FIELDS} exercises { items { ${EXERCISE_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } } }
|
|
102
|
+
pageInfo { ${PAGE_INFO_FIELDS} }
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
`;
|
|
@@ -117,7 +117,7 @@ var GET_SESSION = `
|
|
|
117
117
|
query MybodyshieldGetSession($id: ID!) {
|
|
118
118
|
mybSession(id: $id) {
|
|
119
119
|
${SESSION_FIELDS}
|
|
120
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
120
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
`;
|
|
@@ -130,7 +130,7 @@ var LIST_SESSIONS = `
|
|
|
130
130
|
mybListSessions(programId: $programId, status: $status, pagination: $pagination) {
|
|
131
131
|
items {
|
|
132
132
|
${SESSION_FIELDS}
|
|
133
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
133
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
134
134
|
}
|
|
135
135
|
pageInfo { ${PAGE_INFO_FIELDS} }
|
|
136
136
|
}
|
|
@@ -140,7 +140,7 @@ var START_SESSION = `
|
|
|
140
140
|
mutation MybodyshieldStartSession($input: MybStartSessionInput!) {
|
|
141
141
|
mybStartSession(input: $input) {
|
|
142
142
|
${SESSION_FIELDS}
|
|
143
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
143
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
`;
|
|
@@ -148,7 +148,7 @@ var COMPLETE_SESSION = `
|
|
|
148
148
|
mutation MybodyshieldCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
|
|
149
149
|
mybCompleteSession(id: $id, input: $input) {
|
|
150
150
|
${SESSION_FIELDS}
|
|
151
|
-
sets { ${SESSION_SET_FIELDS} }
|
|
151
|
+
sets { items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
`;
|
|
@@ -161,7 +161,7 @@ var GET_NUTRITION_PLAN = `
|
|
|
161
161
|
query MybodyshieldGetNutritionPlan($id: ID!) {
|
|
162
162
|
mybNutritionPlan(id: $id) {
|
|
163
163
|
${NUTRITION_PLAN_FIELDS}
|
|
164
|
-
meals { ${MEAL_FIELDS} }
|
|
164
|
+
meals { items { ${MEAL_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
`;
|
|
@@ -169,7 +169,7 @@ var ACTIVE_NUTRITION_PLAN = `
|
|
|
169
169
|
query MybodyshieldActiveNutritionPlan($memberId: ID) {
|
|
170
170
|
mybActiveNutritionPlan(memberId: $memberId) {
|
|
171
171
|
${NUTRITION_PLAN_FIELDS}
|
|
172
|
-
meals { ${MEAL_FIELDS} }
|
|
172
|
+
meals { items { ${MEAL_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
`;
|
|
@@ -268,8 +268,8 @@ var RECORD_BODY_METRIC = `
|
|
|
268
268
|
}
|
|
269
269
|
`;
|
|
270
270
|
var LIST_RECOVERY_LOGS = `
|
|
271
|
-
query MybodyshieldListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric) {
|
|
272
|
-
mybListRecoveryLogs(memberId: $memberId, metric: $metric) { ${RECOVERY_FIELDS} }
|
|
271
|
+
query MybodyshieldListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric, $pagination: PaginationInput) {
|
|
272
|
+
mybListRecoveryLogs(memberId: $memberId, metric: $metric, pagination: $pagination) { items { ${RECOVERY_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
273
273
|
}
|
|
274
274
|
`;
|
|
275
275
|
var LOG_RECOVERY = `
|
|
@@ -278,8 +278,8 @@ var LOG_RECOVERY = `
|
|
|
278
278
|
}
|
|
279
279
|
`;
|
|
280
280
|
var LIST_COACHING = `
|
|
281
|
-
query MybodyshieldListCoaching($memberId: ID, $status: MybCoachingStatus) {
|
|
282
|
-
mybListCoaching(memberId: $memberId, status: $status) { ${COACHING_FIELDS} }
|
|
281
|
+
query MybodyshieldListCoaching($memberId: ID, $status: MybCoachingStatus, $pagination: PaginationInput) {
|
|
282
|
+
mybListCoaching(memberId: $memberId, status: $status, pagination: $pagination) { items { ${COACHING_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} } }
|
|
283
283
|
}
|
|
284
284
|
`;
|
|
285
285
|
var CREATE_COACHING = `
|
|
@@ -297,6 +297,37 @@ var HEALTH = `
|
|
|
297
297
|
mybHealth
|
|
298
298
|
}
|
|
299
299
|
`;
|
|
300
|
+
var LIST_WORKOUT_EXERCISES = `
|
|
301
|
+
query MybodyshieldListWorkoutExercises($workoutId: ID!, $pagination: PaginationInput) {
|
|
302
|
+
mybWorkoutExercises(workoutId: $workoutId, pagination: $pagination) {
|
|
303
|
+
items { ${EXERCISE_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} }
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
`;
|
|
307
|
+
var LIST_SESSION_SETS = `
|
|
308
|
+
query MybodyshieldListSessionSets($sessionId: ID!, $pagination: PaginationInput) {
|
|
309
|
+
mybSessionSets(sessionId: $sessionId, pagination: $pagination) {
|
|
310
|
+
items { ${SESSION_SET_FIELDS} } pageInfo { ${PAGE_INFO_FIELDS} }
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
`;
|
|
314
|
+
var MYB_AI_SETTINGS = "query MybAiSettings { mybAiSettings { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }";
|
|
315
|
+
var MYB_UPDATE_AI_SETTINGS = "mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) { mybUpdateAiSettings(input: $input) { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }";
|
|
316
|
+
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 } } }";
|
|
317
|
+
var MYB_TODAY_GUIDANCE = "query MybTodayGuidance($memberId: ID) { mybTodayGuidance(memberId: $memberId) { aiSummary cards { action reason signal } date memberId readinessScore } }";
|
|
318
|
+
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 } } }";
|
|
319
|
+
var MYB_EXERCISE_BEST_SET = "query MybExerciseBestSet($exerciseName: String!) { mybExerciseBestSet(exerciseName: $exerciseName) { createdAt distanceM durationSec exerciseName id isPersonalRecord reps sessionId setNumber updatedAt weight workspaceId } }";
|
|
320
|
+
var MYB_SEARCH_FOODS = "query MybSearchFoods($limit: Int, $query: String!) { mybSearchFoods(limit: $limit, query: $query) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }";
|
|
321
|
+
var MYB_FOOD_BY_BARCODE = "query MybFoodByBarcode($barcode: String!) { mybFoodByBarcode(barcode: $barcode) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }";
|
|
322
|
+
var MYB_LIST_DEVICE_CONNECTIONS = "query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }";
|
|
323
|
+
var MYB_CONNECT_DEVICE = "mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }";
|
|
324
|
+
var MYB_DISCONNECT_DEVICE = "mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }";
|
|
325
|
+
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 } }";
|
|
326
|
+
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 } } }";
|
|
327
|
+
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 } } }";
|
|
328
|
+
var MYB_RECORD_LEGAL_ACCEPTANCE = "mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }";
|
|
329
|
+
var MYB_MY_AI_PROCESSING_CONSENT = "query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }";
|
|
330
|
+
var MYB_SET_AI_PROCESSING_CONSENT = "mutation MybSetAiProcessingConsent($enabled: Boolean!) { mybSetAiProcessingConsent(enabled: $enabled) { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }";
|
|
300
331
|
var GoalTypeEnum = z.enum(["ENDURANCE", "GENERAL_FITNESS", "MOBILITY", "MUSCLE_GAIN", "STRENGTH", "WEIGHT_LOSS"]).describe("Training/nutrition goal type (MybGoalType)");
|
|
301
332
|
var GoalStatusEnum = z.enum(["ABANDONED", "ACHIEVED", "ACTIVE", "PAUSED"]).describe("Lifecycle status of a goal (MybGoalStatus)");
|
|
302
333
|
var FitnessLevelEnum = z.enum(["ADVANCED", "BEGINNER", "ELITE", "INTERMEDIATE"]).describe("Member fitness level for a program (MybFitnessLevel)");
|
|
@@ -539,12 +570,20 @@ function registerWorkoutTools(server, ctx, track) {
|
|
|
539
570
|
{
|
|
540
571
|
title: "List Program Workouts",
|
|
541
572
|
description: "List the workouts for a program (ordered), each with its nested exercises.",
|
|
542
|
-
inputSchema: {
|
|
573
|
+
inputSchema: {
|
|
574
|
+
programId: z.string().describe("Program ID"),
|
|
575
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
576
|
+
offset: z.number().int().min(0).optional(),
|
|
577
|
+
cursor: z.string().optional()
|
|
578
|
+
},
|
|
543
579
|
annotations: { readOnlyHint: true }
|
|
544
580
|
},
|
|
545
|
-
async ({ programId }) => {
|
|
581
|
+
async ({ programId, limit, offset, cursor }) => {
|
|
546
582
|
try {
|
|
547
|
-
const data = await ctx.gql.workspace.request(LIST_PROGRAM_WORKOUTS, {
|
|
583
|
+
const data = await ctx.gql.workspace.request(LIST_PROGRAM_WORKOUTS, {
|
|
584
|
+
programId,
|
|
585
|
+
pagination: { limit: limit ?? 50, offset: offset ?? 0, cursor }
|
|
586
|
+
});
|
|
548
587
|
return jsonResult(data.mybProgramWorkouts);
|
|
549
588
|
} catch (error) {
|
|
550
589
|
ctx.logger.error("mybodyshield workouts_list failed", { error: String(error) });
|
|
@@ -1352,16 +1391,23 @@ function registerRecoveryTools(server, ctx, track) {
|
|
|
1352
1391
|
track(mcpToolName(ctx.productName, "recovery_list")),
|
|
1353
1392
|
{
|
|
1354
1393
|
title: "List Recovery Logs",
|
|
1355
|
-
description: "List recovery/wellbeing logs in the bound workspace, optionally filtered by member and metric. Returns
|
|
1394
|
+
description: "List recovery/wellbeing logs in the bound workspace, optionally filtered by member and metric. Returns { items, pageInfo }; use cursor to continue.",
|
|
1356
1395
|
inputSchema: {
|
|
1357
1396
|
memberId: z.string().optional().describe("Filter by member (user) ID"),
|
|
1358
|
-
metric: RecoveryMetricEnum.optional().describe("Filter by recovery metric")
|
|
1397
|
+
metric: RecoveryMetricEnum.optional().describe("Filter by recovery metric"),
|
|
1398
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
1399
|
+
offset: z.number().int().min(0).optional(),
|
|
1400
|
+
cursor: z.string().optional()
|
|
1359
1401
|
},
|
|
1360
1402
|
annotations: { readOnlyHint: true }
|
|
1361
1403
|
},
|
|
1362
|
-
async ({ memberId, metric }) => {
|
|
1404
|
+
async ({ memberId, metric, limit, offset, cursor }) => {
|
|
1363
1405
|
try {
|
|
1364
|
-
const data = await ctx.gql.workspace.request(LIST_RECOVERY_LOGS, {
|
|
1406
|
+
const data = await ctx.gql.workspace.request(LIST_RECOVERY_LOGS, {
|
|
1407
|
+
memberId,
|
|
1408
|
+
metric,
|
|
1409
|
+
pagination: { limit: limit ?? 50, offset: offset ?? 0, cursor }
|
|
1410
|
+
});
|
|
1365
1411
|
return jsonResult(data.mybListRecoveryLogs);
|
|
1366
1412
|
} catch (error) {
|
|
1367
1413
|
ctx.logger.error("mybodyshield recovery_list failed", { error: String(error) });
|
|
@@ -1410,16 +1456,23 @@ function registerCoachingTools(server, ctx, track) {
|
|
|
1410
1456
|
track(mcpToolName(ctx.productName, "coaching_list")),
|
|
1411
1457
|
{
|
|
1412
1458
|
title: "List Coaching Relationships",
|
|
1413
|
-
description: "List coach\u2194member coaching relationships in the bound workspace, optionally filtered by member and status. Returns
|
|
1459
|
+
description: "List coach\u2194member coaching relationships in the bound workspace, optionally filtered by member and status. Returns { items, pageInfo }; use cursor to continue.",
|
|
1414
1460
|
inputSchema: {
|
|
1415
1461
|
memberId: z.string().optional().describe("Filter by member (user) ID"),
|
|
1416
|
-
status: CoachingStatusEnum.optional().describe("Filter by coaching status")
|
|
1462
|
+
status: CoachingStatusEnum.optional().describe("Filter by coaching status"),
|
|
1463
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
1464
|
+
offset: z.number().int().min(0).optional(),
|
|
1465
|
+
cursor: z.string().optional()
|
|
1417
1466
|
},
|
|
1418
1467
|
annotations: { readOnlyHint: true }
|
|
1419
1468
|
},
|
|
1420
|
-
async ({ memberId, status }) => {
|
|
1469
|
+
async ({ memberId, status, limit, offset, cursor }) => {
|
|
1421
1470
|
try {
|
|
1422
|
-
const data = await ctx.gql.workspace.request(LIST_COACHING, {
|
|
1471
|
+
const data = await ctx.gql.workspace.request(LIST_COACHING, {
|
|
1472
|
+
memberId,
|
|
1473
|
+
status,
|
|
1474
|
+
pagination: { limit: limit ?? 50, offset: offset ?? 0, cursor }
|
|
1475
|
+
});
|
|
1423
1476
|
return jsonResult(data.mybListCoaching);
|
|
1424
1477
|
} catch (error) {
|
|
1425
1478
|
ctx.logger.error("mybodyshield coaching_list failed", { error: String(error) });
|
|
@@ -1493,6 +1546,267 @@ function registerCoachingTools(server, ctx, track) {
|
|
|
1493
1546
|
}
|
|
1494
1547
|
);
|
|
1495
1548
|
}
|
|
1549
|
+
function registerCapabilityTools(server, ctx, track) {
|
|
1550
|
+
const tool = (name, field, document, inputSchema, readOnly, sensitive) => {
|
|
1551
|
+
server.registerTool(
|
|
1552
|
+
track(mcpToolName(ctx.productName, name)),
|
|
1553
|
+
{
|
|
1554
|
+
title: name.replaceAll("_", " "),
|
|
1555
|
+
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.",
|
|
1556
|
+
inputSchema,
|
|
1557
|
+
annotations: {
|
|
1558
|
+
readOnlyHint: readOnly,
|
|
1559
|
+
destructiveHint: sensitive,
|
|
1560
|
+
idempotentHint: readOnly && !sensitive
|
|
1561
|
+
}
|
|
1562
|
+
},
|
|
1563
|
+
async (variables) => {
|
|
1564
|
+
try {
|
|
1565
|
+
const data = await ctx.gql.workspace.request(
|
|
1566
|
+
document,
|
|
1567
|
+
variables
|
|
1568
|
+
);
|
|
1569
|
+
return jsonResult(data[field]);
|
|
1570
|
+
} catch (error) {
|
|
1571
|
+
const message = error instanceof Error ? error.message : "GraphQL request failed";
|
|
1572
|
+
ctx.logger.error(`mybodyshield ${name} failed`, { error: message });
|
|
1573
|
+
return errorResult(`Operation failed: ${message}`);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
);
|
|
1577
|
+
};
|
|
1578
|
+
tool("ai_settings", "mybAiSettings", MYB_AI_SETTINGS, {}, true, false);
|
|
1579
|
+
tool(
|
|
1580
|
+
"ai_update_settings",
|
|
1581
|
+
"mybUpdateAiSettings",
|
|
1582
|
+
MYB_UPDATE_AI_SETTINGS,
|
|
1583
|
+
{
|
|
1584
|
+
input: z.object({
|
|
1585
|
+
dailyAllowance: z.number().int().safe().nullable().optional(),
|
|
1586
|
+
modelName: z.string().nullable().optional(),
|
|
1587
|
+
provider: z.enum(["ANTHROPIC", "GEMINI", "OPENAI"]).nullable().optional(),
|
|
1588
|
+
providerKey: z.string().nullable().optional()
|
|
1589
|
+
}).strict()
|
|
1590
|
+
},
|
|
1591
|
+
false,
|
|
1592
|
+
true
|
|
1593
|
+
);
|
|
1594
|
+
tool(
|
|
1595
|
+
"ai_operation_logs",
|
|
1596
|
+
"mybListAiOperationLogs",
|
|
1597
|
+
MYB_LIST_AI_OPERATION_LOGS,
|
|
1598
|
+
{
|
|
1599
|
+
pagination: z.object({
|
|
1600
|
+
cursor: z.string().nullable().optional(),
|
|
1601
|
+
limit: z.number().int().safe().nullable().optional(),
|
|
1602
|
+
offset: z.number().int().safe().nullable().optional()
|
|
1603
|
+
}).strict().nullable().optional()
|
|
1604
|
+
},
|
|
1605
|
+
true,
|
|
1606
|
+
false
|
|
1607
|
+
);
|
|
1608
|
+
tool(
|
|
1609
|
+
"wellbeing_guidance",
|
|
1610
|
+
"mybTodayGuidance",
|
|
1611
|
+
MYB_TODAY_GUIDANCE,
|
|
1612
|
+
{ memberId: z.string().min(1).nullable().optional() },
|
|
1613
|
+
true,
|
|
1614
|
+
false
|
|
1615
|
+
);
|
|
1616
|
+
tool(
|
|
1617
|
+
"wellbeing_insights",
|
|
1618
|
+
"mybInsights",
|
|
1619
|
+
MYB_INSIGHTS,
|
|
1620
|
+
{
|
|
1621
|
+
dateRangeEnd: z.string().nullable().optional(),
|
|
1622
|
+
dateRangeStart: z.string().nullable().optional(),
|
|
1623
|
+
memberId: z.string().min(1).nullable().optional()
|
|
1624
|
+
},
|
|
1625
|
+
true,
|
|
1626
|
+
false
|
|
1627
|
+
);
|
|
1628
|
+
tool(
|
|
1629
|
+
"performance_exercise_best_set",
|
|
1630
|
+
"mybExerciseBestSet",
|
|
1631
|
+
MYB_EXERCISE_BEST_SET,
|
|
1632
|
+
{ exerciseName: z.string() },
|
|
1633
|
+
true,
|
|
1634
|
+
false
|
|
1635
|
+
);
|
|
1636
|
+
tool(
|
|
1637
|
+
"foods_search",
|
|
1638
|
+
"mybSearchFoods",
|
|
1639
|
+
MYB_SEARCH_FOODS,
|
|
1640
|
+
{ limit: z.number().int().safe().nullable().optional(), query: z.string() },
|
|
1641
|
+
true,
|
|
1642
|
+
false
|
|
1643
|
+
);
|
|
1644
|
+
tool(
|
|
1645
|
+
"foods_by_barcode",
|
|
1646
|
+
"mybFoodByBarcode",
|
|
1647
|
+
MYB_FOOD_BY_BARCODE,
|
|
1648
|
+
{ barcode: z.string() },
|
|
1649
|
+
true,
|
|
1650
|
+
false
|
|
1651
|
+
);
|
|
1652
|
+
tool(
|
|
1653
|
+
"devices_list",
|
|
1654
|
+
"mybListDeviceConnections",
|
|
1655
|
+
MYB_LIST_DEVICE_CONNECTIONS,
|
|
1656
|
+
{ memberId: z.string().min(1).nullable().optional() },
|
|
1657
|
+
true,
|
|
1658
|
+
false
|
|
1659
|
+
);
|
|
1660
|
+
tool(
|
|
1661
|
+
"devices_connect",
|
|
1662
|
+
"mybConnectDevice",
|
|
1663
|
+
MYB_CONNECT_DEVICE,
|
|
1664
|
+
{
|
|
1665
|
+
input: z.object({
|
|
1666
|
+
externalAccountId: z.string().nullable().optional(),
|
|
1667
|
+
memberId: z.string().min(1).nullable().optional(),
|
|
1668
|
+
provider: z.enum(["APPLE_HEALTH", "GARMIN", "HEALTH_CONNECT", "OURA", "WHOOP"]),
|
|
1669
|
+
scopes: z.array(z.string()).nullable().optional()
|
|
1670
|
+
}).strict()
|
|
1671
|
+
},
|
|
1672
|
+
false,
|
|
1673
|
+
true
|
|
1674
|
+
);
|
|
1675
|
+
tool(
|
|
1676
|
+
"devices_disconnect",
|
|
1677
|
+
"mybDisconnectDevice",
|
|
1678
|
+
MYB_DISCONNECT_DEVICE,
|
|
1679
|
+
{ id: z.string().min(1) },
|
|
1680
|
+
false,
|
|
1681
|
+
true
|
|
1682
|
+
);
|
|
1683
|
+
tool(
|
|
1684
|
+
"devices_sync_readings",
|
|
1685
|
+
"mybSyncDeviceReadings",
|
|
1686
|
+
MYB_SYNC_DEVICE_READINGS,
|
|
1687
|
+
{
|
|
1688
|
+
connectionId: z.string().min(1),
|
|
1689
|
+
readings: z.array(
|
|
1690
|
+
z.object({
|
|
1691
|
+
metricType: z.enum([
|
|
1692
|
+
"ACTIVE_ENERGY",
|
|
1693
|
+
"HRV",
|
|
1694
|
+
"READINESS_SCORE",
|
|
1695
|
+
"RESTING_HEART_RATE",
|
|
1696
|
+
"SLEEP_DURATION",
|
|
1697
|
+
"STEPS",
|
|
1698
|
+
"WORKOUT_COMPLETED"
|
|
1699
|
+
]),
|
|
1700
|
+
recordedAt: z.string(),
|
|
1701
|
+
unit: z.string().nullable().optional(),
|
|
1702
|
+
value: z.number().finite()
|
|
1703
|
+
}).strict()
|
|
1704
|
+
)
|
|
1705
|
+
},
|
|
1706
|
+
false,
|
|
1707
|
+
true
|
|
1708
|
+
);
|
|
1709
|
+
tool(
|
|
1710
|
+
"legal_list",
|
|
1711
|
+
"mybListLegalAcceptances",
|
|
1712
|
+
MYB_LIST_LEGAL_ACCEPTANCES,
|
|
1713
|
+
{
|
|
1714
|
+
actorId: z.string().min(1).nullable().optional(),
|
|
1715
|
+
checkpointType: z.enum(["HEALTH_DISCLAIMER_ACCEPT", "PRIVACY_ACCEPT", "TOS_ACCEPT"]).nullable().optional(),
|
|
1716
|
+
pagination: z.object({
|
|
1717
|
+
cursor: z.string().nullable().optional(),
|
|
1718
|
+
limit: z.number().int().safe().nullable().optional(),
|
|
1719
|
+
offset: z.number().int().safe().nullable().optional()
|
|
1720
|
+
}).strict().nullable().optional()
|
|
1721
|
+
},
|
|
1722
|
+
true,
|
|
1723
|
+
false
|
|
1724
|
+
);
|
|
1725
|
+
tool(
|
|
1726
|
+
"legal_mine",
|
|
1727
|
+
"mybMyLegalAcceptances",
|
|
1728
|
+
MYB_MY_LEGAL_ACCEPTANCES,
|
|
1729
|
+
{
|
|
1730
|
+
checkpointType: z.enum(["HEALTH_DISCLAIMER_ACCEPT", "PRIVACY_ACCEPT", "TOS_ACCEPT"]).nullable().optional(),
|
|
1731
|
+
pagination: z.object({
|
|
1732
|
+
cursor: z.string().nullable().optional(),
|
|
1733
|
+
limit: z.number().int().safe().nullable().optional(),
|
|
1734
|
+
offset: z.number().int().safe().nullable().optional()
|
|
1735
|
+
}).strict().nullable().optional()
|
|
1736
|
+
},
|
|
1737
|
+
true,
|
|
1738
|
+
false
|
|
1739
|
+
);
|
|
1740
|
+
tool(
|
|
1741
|
+
"legal_record",
|
|
1742
|
+
"mybRecordLegalAcceptance",
|
|
1743
|
+
MYB_RECORD_LEGAL_ACCEPTANCE,
|
|
1744
|
+
{
|
|
1745
|
+
input: z.object({
|
|
1746
|
+
checkpointType: z.enum(["HEALTH_DISCLAIMER_ACCEPT", "PRIVACY_ACCEPT", "TOS_ACCEPT"]),
|
|
1747
|
+
documentVersion: z.string(),
|
|
1748
|
+
ipAddress: z.string().nullable().optional(),
|
|
1749
|
+
userAgent: z.string().nullable().optional()
|
|
1750
|
+
}).strict()
|
|
1751
|
+
},
|
|
1752
|
+
false,
|
|
1753
|
+
true
|
|
1754
|
+
);
|
|
1755
|
+
tool(
|
|
1756
|
+
"privacy_ai_processing_consent",
|
|
1757
|
+
"mybMyAiProcessingConsent",
|
|
1758
|
+
MYB_MY_AI_PROCESSING_CONSENT,
|
|
1759
|
+
{},
|
|
1760
|
+
true,
|
|
1761
|
+
false
|
|
1762
|
+
);
|
|
1763
|
+
tool(
|
|
1764
|
+
"privacy_set_ai_processing_consent",
|
|
1765
|
+
"mybSetAiProcessingConsent",
|
|
1766
|
+
MYB_SET_AI_PROCESSING_CONSENT,
|
|
1767
|
+
{ enabled: z.boolean() },
|
|
1768
|
+
false,
|
|
1769
|
+
true
|
|
1770
|
+
);
|
|
1771
|
+
}
|
|
1772
|
+
function registerContinuationTools(server, ctx, track) {
|
|
1773
|
+
for (const [name, parent, field, document] of [
|
|
1774
|
+
["workouts_list_exercises", "workoutId", "mybWorkoutExercises", LIST_WORKOUT_EXERCISES],
|
|
1775
|
+
["sessions_list_sets", "sessionId", "mybSessionSets", LIST_SESSION_SETS]
|
|
1776
|
+
]) {
|
|
1777
|
+
server.registerTool(
|
|
1778
|
+
track(mcpToolName(ctx.productName, name)),
|
|
1779
|
+
{
|
|
1780
|
+
title: name === "workouts_list_exercises" ? "List Workout Exercises" : "List Session Sets",
|
|
1781
|
+
description: "Read a child collection as { items, pageInfo }. Pass pageInfo.cursor to continue.",
|
|
1782
|
+
inputSchema: {
|
|
1783
|
+
[parent]: z.string().min(1),
|
|
1784
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
1785
|
+
offset: z.number().int().min(0).optional(),
|
|
1786
|
+
cursor: z.string().optional()
|
|
1787
|
+
},
|
|
1788
|
+
annotations: { readOnlyHint: true }
|
|
1789
|
+
},
|
|
1790
|
+
async (input) => {
|
|
1791
|
+
try {
|
|
1792
|
+
const data = await ctx.gql.workspace.request(document, {
|
|
1793
|
+
[parent]: input[parent],
|
|
1794
|
+
pagination: {
|
|
1795
|
+
limit: input.limit ?? 50,
|
|
1796
|
+
offset: input.offset ?? 0,
|
|
1797
|
+
cursor: input.cursor
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
return jsonResult(data[field]);
|
|
1801
|
+
} catch (error) {
|
|
1802
|
+
const message = error instanceof Error ? error.message : "GraphQL request failed";
|
|
1803
|
+
ctx.logger.error(`mybodyshield ${name} failed`, { error: message });
|
|
1804
|
+
return errorResult(`Failed to read child collection: ${message}`);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1496
1810
|
|
|
1497
1811
|
// src/modules/mybodyshield/tools/health.ts
|
|
1498
1812
|
function registerHealthTools(server, ctx, track) {
|
|
@@ -1506,7 +1820,7 @@ function registerHealthTools(server, ctx, track) {
|
|
|
1506
1820
|
},
|
|
1507
1821
|
async () => {
|
|
1508
1822
|
try {
|
|
1509
|
-
const data = await ctx.gql.
|
|
1823
|
+
const data = await ctx.gql.workspaceAuthOnly.request(HEALTH, {});
|
|
1510
1824
|
return jsonResult({ ok: true, status: data.mybHealth });
|
|
1511
1825
|
} catch (error) {
|
|
1512
1826
|
ctx.logger.error("mybodyshield health failed", { error: String(error) });
|
|
@@ -1800,6 +2114,8 @@ var mybodyshieldModule = {
|
|
|
1800
2114
|
registerRecoveryTools(server, ctx, trackTool);
|
|
1801
2115
|
registerCoachingTools(server, ctx, trackTool);
|
|
1802
2116
|
registerHealthTools(server, ctx, trackTool);
|
|
2117
|
+
registerContinuationTools(server, ctx, trackTool);
|
|
2118
|
+
registerCapabilityTools(server, ctx, trackTool);
|
|
1803
2119
|
registerMybodyshieldResources(server, ctx, trackResource);
|
|
1804
2120
|
registerMybodyshieldPrompts(server, ctx, trackPrompt);
|
|
1805
2121
|
return { tools, resources, prompts };
|