canvas-lms-mcp 1.15.0 → 1.15.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/README.md +1 -0
- package/dist/canvas/index.cjs +2 -2
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-WBJQAMP7.cjs → chunk-2GUCKHLM.cjs} +24 -24
- package/dist/{chunk-WBJQAMP7.cjs.map → chunk-2GUCKHLM.cjs.map} +1 -1
- package/dist/{chunk-U377JWIJ.cjs → chunk-C2VV5O7H.cjs} +2 -2
- package/dist/chunk-C2VV5O7H.cjs.map +1 -0
- package/dist/{chunk-B3FVQ3BA.js → chunk-X6GSTWAI.js} +2 -2
- package/dist/{chunk-I2VGM7V5.js → chunk-YUF25C6C.js} +2 -2
- package/dist/chunk-YUF25C6C.js.map +1 -0
- package/dist/http.cjs +3 -3
- package/dist/http.js +2 -2
- package/dist/server.cjs +3 -3
- package/dist/server.js +2 -2
- package/dist/stdio.cjs +3 -3
- package/dist/stdio.js +2 -2
- package/package.json +10 -9
- package/dist/chunk-I2VGM7V5.js.map +0 -1
- package/dist/chunk-U377JWIJ.cjs.map +0 -1
- /package/dist/{chunk-B3FVQ3BA.js.map → chunk-X6GSTWAI.js.map} +0 -0
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
[](https://nodejs.org)
|
|
9
9
|
[](https://www.npmjs.com/package/canvas-lms-mcp)
|
|
10
|
+
[](https://registry.modelcontextprotocol.io/v0/servers/io.github.bruchris%2Fcanvas-lms-mcp)
|
|
10
11
|
|
|
11
12
|
MCP server for [Canvas LMS](https://www.instructure.com/canvas). Read courses, assignments, submissions, rubrics, quizzes; grade, comment, manage course content, and handle Canvas admin workflows from any AI agent.
|
|
12
13
|
|
package/dist/canvas/index.cjs
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkC2VV5O7Hcjs = require('../chunk-C2VV5O7H.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.CanvasApiError =
|
|
14
|
+
exports.CanvasApiError = _chunkC2VV5O7Hcjs.CanvasApiError; exports.CanvasClient = _chunkC2VV5O7Hcjs.CanvasClient; exports.CanvasHttpClient = _chunkC2VV5O7Hcjs.CanvasHttpClient; exports.appendCanvasQuery = _chunkC2VV5O7Hcjs.appendCanvasQuery; exports.toCanvasQuery = _chunkC2VV5O7Hcjs.toCanvasQuery;
|
|
15
15
|
//# sourceMappingURL=index.cjs.map
|
package/dist/canvas/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkC2VV5O7Hcjs = require('./chunk-C2VV5O7H.cjs');
|
|
13
13
|
|
|
14
14
|
// src/server.ts
|
|
15
15
|
var _mcpjs = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
@@ -114,7 +114,7 @@ function accountTools(canvas) {
|
|
|
114
114
|
|
|
115
115
|
// src/tools/errors.ts
|
|
116
116
|
function formatError(error) {
|
|
117
|
-
if (error instanceof
|
|
117
|
+
if (error instanceof _chunkC2VV5O7Hcjs.CanvasApiError) {
|
|
118
118
|
const status = error.status;
|
|
119
119
|
const message = error.message;
|
|
120
120
|
const ltiMarkers = ["Tool not configured", "tool is not configured"];
|
|
@@ -166,7 +166,7 @@ function analyticsTools(canvas) {
|
|
|
166
166
|
inputSchema: {
|
|
167
167
|
course_id: _zod.z.number().describe("The Canvas course ID"),
|
|
168
168
|
search_term: _zod.z.string().describe("The keyword or phrase to search for"),
|
|
169
|
-
content_types: _zod.z.array(_zod.z.enum(
|
|
169
|
+
content_types: _zod.z.array(_zod.z.enum(_chunkC2VV5O7Hcjs.SEARCH_CONTENT_TYPES)).optional().describe(
|
|
170
170
|
"Content types to search. Defaults to all types: pages, discussions, assignments, announcements."
|
|
171
171
|
)
|
|
172
172
|
},
|
|
@@ -178,7 +178,7 @@ function analyticsTools(canvas) {
|
|
|
178
178
|
const courseId = params.course_id;
|
|
179
179
|
const searchTerm = params.search_term;
|
|
180
180
|
const types = _nullishCoalesce(params.content_types, () => ( [
|
|
181
|
-
...
|
|
181
|
+
..._chunkC2VV5O7Hcjs.SEARCH_CONTENT_TYPES
|
|
182
182
|
]));
|
|
183
183
|
if (types.length === 0) return { results: [] };
|
|
184
184
|
const settled = await Promise.allSettled(
|
|
@@ -1485,7 +1485,7 @@ function outcomeTools(canvas) {
|
|
|
1485
1485
|
name: "get_root_outcome_group",
|
|
1486
1486
|
description: "Get the root outcome group for an account or course context.",
|
|
1487
1487
|
inputSchema: {
|
|
1488
|
-
context_type: _zod.z.enum(
|
|
1488
|
+
context_type: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcomes from an account or course context."),
|
|
1489
1489
|
context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context.")
|
|
1490
1490
|
},
|
|
1491
1491
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -1498,7 +1498,7 @@ function outcomeTools(canvas) {
|
|
|
1498
1498
|
name: "list_outcome_groups",
|
|
1499
1499
|
description: "List all outcome groups for an account or course context.",
|
|
1500
1500
|
inputSchema: {
|
|
1501
|
-
context_type: _zod.z.enum(
|
|
1501
|
+
context_type: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome groups from an account or course context."),
|
|
1502
1502
|
context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context.")
|
|
1503
1503
|
},
|
|
1504
1504
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -1511,10 +1511,10 @@ function outcomeTools(canvas) {
|
|
|
1511
1511
|
name: "list_outcome_group_links",
|
|
1512
1512
|
description: "List all outcome links in an account or course context.",
|
|
1513
1513
|
inputSchema: {
|
|
1514
|
-
context_type: _zod.z.enum(
|
|
1514
|
+
context_type: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome links from an account or course context."),
|
|
1515
1515
|
context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
|
|
1516
|
-
outcome_style: _zod.z.enum(
|
|
1517
|
-
outcome_group_style: _zod.z.enum(
|
|
1516
|
+
outcome_style: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.'),
|
|
1517
|
+
outcome_group_style: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_DETAIL_LEVELS).optional().describe(
|
|
1518
1518
|
'Outcome group detail level. Use "full" to include expanded outcome group fields.'
|
|
1519
1519
|
)
|
|
1520
1520
|
},
|
|
@@ -1532,7 +1532,7 @@ function outcomeTools(canvas) {
|
|
|
1532
1532
|
name: "get_outcome_group",
|
|
1533
1533
|
description: "Get details for a specific outcome group in an account or course context.",
|
|
1534
1534
|
inputSchema: {
|
|
1535
|
-
context_type: _zod.z.enum(
|
|
1535
|
+
context_type: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
|
|
1536
1536
|
context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
|
|
1537
1537
|
outcome_group_id: _zod.z.number().describe("The Canvas outcome group ID.")
|
|
1538
1538
|
},
|
|
@@ -1547,10 +1547,10 @@ function outcomeTools(canvas) {
|
|
|
1547
1547
|
name: "list_outcome_group_outcomes",
|
|
1548
1548
|
description: "List the linked outcomes directly under a specific outcome group.",
|
|
1549
1549
|
inputSchema: {
|
|
1550
|
-
context_type: _zod.z.enum(
|
|
1550
|
+
context_type: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
|
|
1551
1551
|
context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
|
|
1552
1552
|
outcome_group_id: _zod.z.number().describe("The Canvas outcome group ID."),
|
|
1553
|
-
outcome_style: _zod.z.enum(
|
|
1553
|
+
outcome_style: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.')
|
|
1554
1554
|
},
|
|
1555
1555
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
1556
1556
|
handler: async (params) => canvas.outcomes.listGroupOutcomes(
|
|
@@ -1566,7 +1566,7 @@ function outcomeTools(canvas) {
|
|
|
1566
1566
|
name: "list_outcome_group_subgroups",
|
|
1567
1567
|
description: "List the immediate child outcome groups under a specific outcome group.",
|
|
1568
1568
|
inputSchema: {
|
|
1569
|
-
context_type: _zod.z.enum(
|
|
1569
|
+
context_type: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
|
|
1570
1570
|
context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
|
|
1571
1571
|
outcome_group_id: _zod.z.number().describe("The Canvas outcome group ID.")
|
|
1572
1572
|
},
|
|
@@ -1627,14 +1627,14 @@ function outcomeTools(canvas) {
|
|
|
1627
1627
|
inputSchema: {
|
|
1628
1628
|
course_id: _zod.z.number().describe("The Canvas course ID."),
|
|
1629
1629
|
aggregate: _zod.z.enum(["course"]).optional().describe("Aggregate all student rollups into a single course-level rollup."),
|
|
1630
|
-
aggregate_stat: _zod.z.enum(
|
|
1630
|
+
aggregate_stat: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_ROLLUP_AGGREGATE_STATS).optional().describe('Statistic to use when aggregate="course".'),
|
|
1631
1631
|
user_ids: _zod.z.array(_zod.z.union([_zod.z.number(), _zod.z.string()])).optional().describe('Optional Canvas user IDs or SIS user IDs prefixed with "sis_user_id:".'),
|
|
1632
1632
|
outcome_ids: _zod.z.array(_zod.z.number()).optional().describe("Optional outcome IDs to restrict the rollups."),
|
|
1633
1633
|
include_courses: _zod.z.boolean().optional().describe("Include linked course details in the response payload."),
|
|
1634
|
-
exclude: _zod.z.array(_zod.z.enum(
|
|
1635
|
-
sort_by: _zod.z.enum(
|
|
1634
|
+
exclude: _zod.z.array(_zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional rollup exclusions for missing users or missing outcome results."),
|
|
1635
|
+
sort_by: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_ROLLUP_SORT_BY).optional().describe("Sort rollups by student name or by a specific outcome score."),
|
|
1636
1636
|
sort_outcome_id: _zod.z.number().optional().describe('Outcome ID to sort by when sort_by="outcome".'),
|
|
1637
|
-
sort_order: _zod.z.enum(
|
|
1637
|
+
sort_order: _zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_SORT_ORDER).optional().describe("Sort order to apply when sorting rollups."),
|
|
1638
1638
|
add_defaults: _zod.z.boolean().optional().describe("Include default mastery colors and levels when Canvas supports it.")
|
|
1639
1639
|
},
|
|
1640
1640
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -1677,7 +1677,7 @@ function outcomeTools(canvas) {
|
|
|
1677
1677
|
description: "Get mastery distribution analytics for outcomes in a course, optionally filtered by students or outcomes.",
|
|
1678
1678
|
inputSchema: {
|
|
1679
1679
|
course_id: _zod.z.number().describe("The Canvas course ID."),
|
|
1680
|
-
exclude: _zod.z.array(_zod.z.enum(
|
|
1680
|
+
exclude: _zod.z.array(_zod.z.enum(_chunkC2VV5O7Hcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional exclusions for missing users or missing outcome results."),
|
|
1681
1681
|
outcome_ids: _zod.z.array(_zod.z.number()).optional().describe("Optional outcome IDs to restrict the distribution results."),
|
|
1682
1682
|
student_ids: _zod.z.array(_zod.z.union([_zod.z.number(), _zod.z.string()])).optional().describe('Optional Canvas student IDs or SIS user IDs prefixed with "sis_user_id:".'),
|
|
1683
1683
|
include_alignment_distributions: _zod.z.boolean().optional().describe("Include contributing score distributions for alignments."),
|
|
@@ -2832,7 +2832,7 @@ function registerAllTools(server, canvas) {
|
|
|
2832
2832
|
content: [{ type: "text", text }]
|
|
2833
2833
|
};
|
|
2834
2834
|
} catch (error) {
|
|
2835
|
-
if (error instanceof
|
|
2835
|
+
if (error instanceof _chunkC2VV5O7Hcjs.CanvasApiError) {
|
|
2836
2836
|
} else {
|
|
2837
2837
|
console.error(`Unexpected error in tool "${tool.name}":`, error);
|
|
2838
2838
|
}
|
|
@@ -2880,7 +2880,7 @@ function registerSyllabusResource(server, canvas) {
|
|
|
2880
2880
|
]
|
|
2881
2881
|
};
|
|
2882
2882
|
} catch (error) {
|
|
2883
|
-
if (!(error instanceof
|
|
2883
|
+
if (!(error instanceof _chunkC2VV5O7Hcjs.CanvasApiError)) {
|
|
2884
2884
|
console.error("Unexpected error in syllabus resource:", error);
|
|
2885
2885
|
}
|
|
2886
2886
|
return {
|
|
@@ -2929,7 +2929,7 @@ function registerAssignmentDescriptionResource(server, canvas) {
|
|
|
2929
2929
|
]
|
|
2930
2930
|
};
|
|
2931
2931
|
} catch (error) {
|
|
2932
|
-
if (!(error instanceof
|
|
2932
|
+
if (!(error instanceof _chunkC2VV5O7Hcjs.CanvasApiError)) {
|
|
2933
2933
|
console.error("Unexpected error in assignment-description resource:", error);
|
|
2934
2934
|
}
|
|
2935
2935
|
return {
|
|
@@ -2948,13 +2948,13 @@ function registerAllResources(server, canvas) {
|
|
|
2948
2948
|
|
|
2949
2949
|
// src/server.ts
|
|
2950
2950
|
function createCanvasMCPServer(config) {
|
|
2951
|
-
const canvas = new (0,
|
|
2951
|
+
const canvas = new (0, _chunkC2VV5O7Hcjs.CanvasClient)({
|
|
2952
2952
|
token: config.token,
|
|
2953
2953
|
baseUrl: config.baseUrl
|
|
2954
2954
|
});
|
|
2955
2955
|
const server = new (0, _mcpjs.McpServer)({
|
|
2956
2956
|
name: "canvas-lms-mcp",
|
|
2957
|
-
version:
|
|
2957
|
+
version: _chunkC2VV5O7Hcjs.version
|
|
2958
2958
|
});
|
|
2959
2959
|
registerAllTools(server, canvas);
|
|
2960
2960
|
registerAllResources(server, canvas);
|
|
@@ -2964,4 +2964,4 @@ function createCanvasMCPServer(config) {
|
|
|
2964
2964
|
|
|
2965
2965
|
|
|
2966
2966
|
exports.createCanvasMCPServer = createCanvasMCPServer;
|
|
2967
|
-
//# sourceMappingURL=chunk-
|
|
2967
|
+
//# sourceMappingURL=chunk-2GUCKHLM.cjs.map
|