learnhouse-mcp-server 1.0.2 → 1.0.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/index.d.ts +0 -1
- package/dist/index.js +47 -13
- package/package.json +1 -1
- package/src/index.ts +34 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -39,19 +39,19 @@ async function getClient() {
|
|
|
39
39
|
const server = new FastMCP({
|
|
40
40
|
name: "LearnHouse MCP Server",
|
|
41
41
|
version: "1.0.0",
|
|
42
|
-
instructions: `
|
|
43
|
-
LearnHouse MCP Server provides tools to manage an LMS (Learning Management System).
|
|
44
|
-
|
|
45
|
-
Available capabilities:
|
|
46
|
-
- **Course Management**: List, create, update, delete courses
|
|
47
|
-
- **Chapter Management**: Organize chapters within courses
|
|
48
|
-
- **Activity Management**: Create and manage learning activities (documents, videos, PDFs)
|
|
49
|
-
- **Content Creation**: Set TipTap document content for activities
|
|
50
|
-
- **Progress Tracking**: Track user progress through courses
|
|
51
|
-
- **Search**: Search across courses and content
|
|
52
|
-
|
|
53
|
-
Organization ID: ${config.orgId}
|
|
54
|
-
API URL: ${config.baseUrl}
|
|
42
|
+
instructions: `
|
|
43
|
+
LearnHouse MCP Server provides tools to manage an LMS (Learning Management System).
|
|
44
|
+
|
|
45
|
+
Available capabilities:
|
|
46
|
+
- **Course Management**: List, create, update, delete courses
|
|
47
|
+
- **Chapter Management**: Organize chapters within courses
|
|
48
|
+
- **Activity Management**: Create and manage learning activities (documents, videos, PDFs)
|
|
49
|
+
- **Content Creation**: Set TipTap document content for activities
|
|
50
|
+
- **Progress Tracking**: Track user progress through courses
|
|
51
|
+
- **Search**: Search across courses and content
|
|
52
|
+
|
|
53
|
+
Organization ID: ${config.orgId}
|
|
54
|
+
API URL: ${config.baseUrl}
|
|
55
55
|
`.trim(),
|
|
56
56
|
});
|
|
57
57
|
server.addTool({
|
|
@@ -480,6 +480,40 @@ server.addTool({
|
|
|
480
480
|
return JSON.stringify(results, null, 2);
|
|
481
481
|
},
|
|
482
482
|
});
|
|
483
|
+
server.addTool({
|
|
484
|
+
name: "get_course_full",
|
|
485
|
+
description: "Get full course hierarchy including chapters and activities",
|
|
486
|
+
parameters: z.object({
|
|
487
|
+
course_uuid: z.string().describe("The UUID of the course"),
|
|
488
|
+
}),
|
|
489
|
+
execute: async (args) => {
|
|
490
|
+
const api = await getClient();
|
|
491
|
+
const course = await api.getCourseMeta(args.course_uuid);
|
|
492
|
+
return JSON.stringify(course, null, 2);
|
|
493
|
+
},
|
|
494
|
+
});
|
|
495
|
+
server.addTool({
|
|
496
|
+
name: "update_collection",
|
|
497
|
+
description: "Update a collection",
|
|
498
|
+
parameters: z.object({
|
|
499
|
+
collection_uuid: z.string().describe("The UUID of the collection"),
|
|
500
|
+
name: z.string().optional().describe("Collection name"),
|
|
501
|
+
description: z.string().optional().describe("Collection description"),
|
|
502
|
+
public: z.boolean().optional().describe("Whether the collection is public"),
|
|
503
|
+
}),
|
|
504
|
+
execute: async (args) => {
|
|
505
|
+
const api = await getClient();
|
|
506
|
+
const update = {};
|
|
507
|
+
if (args.name)
|
|
508
|
+
update.name = args.name;
|
|
509
|
+
if (args.description)
|
|
510
|
+
update.description = args.description;
|
|
511
|
+
if (args.public !== undefined)
|
|
512
|
+
update.public = args.public;
|
|
513
|
+
const collection = await api.updateCollection(args.collection_uuid, update);
|
|
514
|
+
return JSON.stringify(collection, null, 2);
|
|
515
|
+
},
|
|
516
|
+
});
|
|
483
517
|
// ============================================================
|
|
484
518
|
// Start Server
|
|
485
519
|
// ============================================================
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
/**
|
|
3
2
|
* LearnHouse MCP Server
|
|
4
3
|
*
|
|
@@ -521,6 +520,40 @@ server.addTool({
|
|
|
521
520
|
},
|
|
522
521
|
});
|
|
523
522
|
|
|
523
|
+
server.addTool({
|
|
524
|
+
name: "get_course_full",
|
|
525
|
+
description: "Get full course hierarchy including chapters and activities",
|
|
526
|
+
parameters: z.object({
|
|
527
|
+
course_uuid: z.string().describe("The UUID of the course"),
|
|
528
|
+
}),
|
|
529
|
+
execute: async (args) => {
|
|
530
|
+
const api = await getClient();
|
|
531
|
+
const course = await api.getCourseMeta(args.course_uuid);
|
|
532
|
+
return JSON.stringify(course, null, 2);
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
server.addTool({
|
|
537
|
+
name: "update_collection",
|
|
538
|
+
description: "Update a collection",
|
|
539
|
+
parameters: z.object({
|
|
540
|
+
collection_uuid: z.string().describe("The UUID of the collection"),
|
|
541
|
+
name: z.string().optional().describe("Collection name"),
|
|
542
|
+
description: z.string().optional().describe("Collection description"),
|
|
543
|
+
public: z.boolean().optional().describe("Whether the collection is public"),
|
|
544
|
+
}),
|
|
545
|
+
execute: async (args) => {
|
|
546
|
+
const api = await getClient();
|
|
547
|
+
const update: any = {};
|
|
548
|
+
if (args.name) update.name = args.name;
|
|
549
|
+
if (args.description) update.description = args.description;
|
|
550
|
+
if (args.public !== undefined) update.public = args.public;
|
|
551
|
+
|
|
552
|
+
const collection = await api.updateCollection(args.collection_uuid, update);
|
|
553
|
+
return JSON.stringify(collection, null, 2);
|
|
554
|
+
},
|
|
555
|
+
});
|
|
556
|
+
|
|
524
557
|
// ============================================================
|
|
525
558
|
// Start Server
|
|
526
559
|
// ============================================================
|