@trainheroic-unofficial/athlete-mcp 0.4.1 → 0.4.2
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/server.mjs +16 -2
- package/package.json +3 -3
package/dist/server.mjs
CHANGED
|
@@ -415,6 +415,17 @@ async function confirmGate(server, requestId, message, confirmArg) {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
418
|
+
//#region ../core/src/instructions.ts
|
|
419
|
+
/**
|
|
420
|
+
* Server-level guidance passed as the MCP `instructions` string. The host model receives it
|
|
421
|
+
* in the initialize result and treats it like a system hint. Its job is to stop tool-layer
|
|
422
|
+
* implementation details from leaking into user-facing replies: by default a model narrates
|
|
423
|
+
* capability using the raw snake_case tool name (e.g. `athlete_session_create`), and the tool
|
|
424
|
+
* descriptions here reference each other by name to drive correct chaining, which primes that
|
|
425
|
+
* leak further. This tells the host to keep that wiring internal and speak in app terms.
|
|
426
|
+
*/
|
|
427
|
+
const SERVER_INSTRUCTIONS = "Speak to the user in plain, everyday language about their training. Describe what you are doing in the TrainHeroic app's own terms (for example, say you are creating a workout rather than naming a tool). Do not surface internal tool names (the snake_case identifiers such as athlete_session_create), raw parameter names, or numeric ids in your replies unless the user explicitly asks for them; they are implementation details. The tool descriptions cross-reference each other by name only so you can chain them correctly. Keep that wiring to yourself.";
|
|
428
|
+
//#endregion
|
|
418
429
|
//#region ../js/src/auth.ts
|
|
419
430
|
const AUTH_URL = "https://apis.trainheroic.com/auth";
|
|
420
431
|
/**
|
|
@@ -1108,6 +1119,9 @@ function registerAthleteTrainingTools(server, ctx) {
|
|
|
1108
1119
|
registerLogTool(server, ctx);
|
|
1109
1120
|
}
|
|
1110
1121
|
//#endregion
|
|
1122
|
+
//#region package.json
|
|
1123
|
+
var version = "0.4.1";
|
|
1124
|
+
//#endregion
|
|
1111
1125
|
//#region src/server.ts
|
|
1112
1126
|
async function main() {
|
|
1113
1127
|
const email = process.env.TRAINHEROIC_EMAIL;
|
|
@@ -1119,8 +1133,8 @@ async function main() {
|
|
|
1119
1133
|
const client = new TrainHeroicClient(email, password);
|
|
1120
1134
|
const server = new McpServer({
|
|
1121
1135
|
name: "trainheroic-athlete",
|
|
1122
|
-
version
|
|
1123
|
-
});
|
|
1136
|
+
version
|
|
1137
|
+
}, { instructions: SERVER_INSTRUCTIONS });
|
|
1124
1138
|
registerAthleteTrainingTools(server, { client });
|
|
1125
1139
|
await server.connect(new StdioServerTransport());
|
|
1126
1140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/athlete-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
23
23
|
"zod": "^4.4.3",
|
|
24
|
-
"@trainheroic-unofficial/
|
|
25
|
-
"@trainheroic-unofficial/
|
|
24
|
+
"@trainheroic-unofficial/core": "0.4.2",
|
|
25
|
+
"@trainheroic-unofficial/js": "0.4.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^26.0.0",
|