canvas-lms-mcp 2.2.0 → 2.3.0
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 +7 -7
- package/dist/canvas/discussions.d.ts +2 -0
- package/dist/canvas/discussions.d.ts.map +1 -1
- package/dist/canvas/index.cjs +3 -3
- package/dist/canvas/index.js +2 -2
- package/dist/{chunk-FKTJGYLG.js → chunk-24IEEOBF.js} +64 -3
- package/dist/chunk-24IEEOBF.js.map +1 -0
- package/dist/{chunk-JR74DYXY.cjs → chunk-6VFRPUTQ.cjs} +389 -328
- package/dist/chunk-6VFRPUTQ.cjs.map +1 -0
- package/dist/{chunk-FP4A34TD.js → chunk-I4EZ5NSC.js} +12 -2
- package/dist/chunk-I4EZ5NSC.js.map +1 -0
- package/dist/{chunk-C2C3TYWD.cjs → chunk-SVXYCCZ4.cjs} +2 -2
- package/dist/{chunk-C2C3TYWD.cjs.map → chunk-SVXYCCZ4.cjs.map} +1 -1
- package/dist/{chunk-W5DF5YBG.js → chunk-TEYUOD55.js} +2 -2
- package/dist/{chunk-W5DF5YBG.js.map → chunk-TEYUOD55.js.map} +1 -1
- package/dist/{chunk-EMIO4XD4.cjs → chunk-V25MGZFN.cjs} +14 -4
- package/dist/chunk-V25MGZFN.cjs.map +1 -0
- package/dist/http.cjs +6 -6
- package/dist/http.js +3 -3
- package/dist/init.cjs +3 -3
- package/dist/init.js +1 -1
- package/dist/provenance/fields.d.ts.map +1 -1
- package/dist/server.cjs +4 -4
- package/dist/server.js +3 -3
- package/dist/stdio.cjs +4 -4
- package/dist/stdio.js +3 -3
- package/dist/tools/discussions.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-EMIO4XD4.cjs.map +0 -1
- package/dist/chunk-FKTJGYLG.js.map +0 -1
- package/dist/chunk-FP4A34TD.js.map +0 -1
- package/dist/chunk-JR74DYXY.cjs.map +0 -1
|
@@ -25,11 +25,11 @@ var _chunkQCEGMTXWcjs = require('./chunk-QCEGMTXW.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkV25MGZFNcjs = require('./chunk-V25MGZFN.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkSVXYCCZ4cjs = require('./chunk-SVXYCCZ4.cjs');
|
|
33
33
|
|
|
34
34
|
// src/server.ts
|
|
35
35
|
var _mcpjs = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
@@ -804,6 +804,8 @@ var UNTRUSTED_FIELDS = {
|
|
|
804
804
|
// `post_discussion_entry` / `update_discussion` publish as the operator.
|
|
805
805
|
get_discussion: { message: "discussion message" },
|
|
806
806
|
list_discussions: { message: "discussion message" },
|
|
807
|
+
get_group_discussion: { message: "discussion message" },
|
|
808
|
+
list_group_discussions: { message: "discussion message" },
|
|
807
809
|
// Rank 3 — arbitrary sender; `send_conversation` sends as the operator.
|
|
808
810
|
// `last_message` is Canvas's preview string on the conversation itself;
|
|
809
811
|
// `body` is the full text of each message in the thread.
|
|
@@ -1001,7 +1003,7 @@ function accountTools(canvas, pseudonymizer) {
|
|
|
1001
1003
|
title: "Get Account",
|
|
1002
1004
|
description: "Get details for a Canvas account by ID.",
|
|
1003
1005
|
inputSchema: {
|
|
1004
|
-
account_id:
|
|
1006
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID")
|
|
1005
1007
|
},
|
|
1006
1008
|
annotations: {
|
|
1007
1009
|
readOnlyHint: true,
|
|
@@ -1029,7 +1031,7 @@ function accountTools(canvas, pseudonymizer) {
|
|
|
1029
1031
|
title: "List Sub-Accounts",
|
|
1030
1032
|
description: "List sub-accounts under a given Canvas account.",
|
|
1031
1033
|
inputSchema: {
|
|
1032
|
-
account_id:
|
|
1034
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The parent Canvas account ID")
|
|
1033
1035
|
},
|
|
1034
1036
|
annotations: {
|
|
1035
1037
|
readOnlyHint: true,
|
|
@@ -1044,7 +1046,7 @@ function accountTools(canvas, pseudonymizer) {
|
|
|
1044
1046
|
title: "List Account Courses",
|
|
1045
1047
|
description: "List courses under a given Canvas account.",
|
|
1046
1048
|
inputSchema: {
|
|
1047
|
-
account_id:
|
|
1049
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID"),
|
|
1048
1050
|
search_term: _zod.z.string().optional().describe("Search courses by name or course code")
|
|
1049
1051
|
},
|
|
1050
1052
|
annotations: {
|
|
@@ -1062,7 +1064,7 @@ function accountTools(canvas, pseudonymizer) {
|
|
|
1062
1064
|
title: "List Account Users",
|
|
1063
1065
|
description: "List users in a Canvas account.",
|
|
1064
1066
|
inputSchema: {
|
|
1065
|
-
account_id:
|
|
1067
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID"),
|
|
1066
1068
|
search_term: _zod.z.string().optional().describe("Search users by name, email, or login")
|
|
1067
1069
|
},
|
|
1068
1070
|
annotations: {
|
|
@@ -1083,7 +1085,7 @@ function accountTools(canvas, pseudonymizer) {
|
|
|
1083
1085
|
title: "Get Account Reports",
|
|
1084
1086
|
description: "List available report types for a Canvas account.",
|
|
1085
1087
|
inputSchema: {
|
|
1086
|
-
account_id:
|
|
1088
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID")
|
|
1087
1089
|
},
|
|
1088
1090
|
annotations: {
|
|
1089
1091
|
readOnlyHint: true,
|
|
@@ -1147,8 +1149,8 @@ function assignmentSubmissionTools(canvas) {
|
|
|
1147
1149
|
name: "upload_submission_file",
|
|
1148
1150
|
description: "Upload a file to the authenticated student's own submission area for one assignment, as step 1 of an online_upload submission (step 2: pass the returned file id to submit_assignment). Opt-in tool: only available when the server was started with CANVAS_ENABLE_ASSIGNMENT_SUBMISSION. Content must be base64-encoded. This uploads only \u2014 nothing is submitted until submit_assignment is called.",
|
|
1149
1151
|
inputSchema: {
|
|
1150
|
-
course_id:
|
|
1151
|
-
assignment_id:
|
|
1152
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1153
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
1152
1154
|
name: _zod.z.string().describe("The filename, including extension"),
|
|
1153
1155
|
content_base64: _zod.z.string().describe("The file content, base64-encoded"),
|
|
1154
1156
|
content_type: _zod.z.string().describe("The MIME type, e.g. application/pdf")
|
|
@@ -1168,12 +1170,12 @@ function assignmentSubmissionTools(canvas) {
|
|
|
1168
1170
|
name: "submit_assignment",
|
|
1169
1171
|
description: "Submit the authenticated student's own work to an assignment. Opt-in tool: only available when the server was started with CANVAS_ENABLE_ASSIGNMENT_SUBMISSION. IMPORTANT: before calling, show the user exactly what will be submitted (assignment name, submission type, and full content/URL/file list) and get their explicit confirmation \u2014 submissions cannot be retracted and may consume a limited attempt. Submits as the token holder only; submitting on behalf of another user is not supported. For online_upload, first upload each file with upload_submission_file and pass the returned file ids.",
|
|
1170
1172
|
inputSchema: {
|
|
1171
|
-
course_id:
|
|
1172
|
-
assignment_id:
|
|
1173
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1174
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
1173
1175
|
submission_type: _zod.z.enum(["online_text_entry", "online_url", "online_upload"]).describe("Must be one of the assignment's allowed submission_types"),
|
|
1174
1176
|
body: _zod.z.string().optional().describe("The submission text/HTML. Required iff submission_type is online_text_entry"),
|
|
1175
1177
|
url: _zod.z.string().optional().describe("The submission URL (http/https). Required iff submission_type is online_url"),
|
|
1176
|
-
file_ids: _zod.z.array(
|
|
1178
|
+
file_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
1177
1179
|
"File IDs from prior upload_submission_file calls. Required (non-empty) iff submission_type is online_upload"
|
|
1178
1180
|
),
|
|
1179
1181
|
comment: _zod.z.string().optional().describe("Optional text comment to attach alongside the submission")
|
|
@@ -1253,7 +1255,7 @@ function assignmentSubmissionTools(canvas) {
|
|
|
1253
1255
|
|
|
1254
1256
|
// src/tools/errors.ts
|
|
1255
1257
|
function formatError(error) {
|
|
1256
|
-
if (error instanceof
|
|
1258
|
+
if (error instanceof _chunkSVXYCCZ4cjs.CanvasApiError) {
|
|
1257
1259
|
const status = error.status;
|
|
1258
1260
|
const message = error.message;
|
|
1259
1261
|
const ltiMarkers = ["Tool not configured", "tool is not configured"];
|
|
@@ -1305,9 +1307,9 @@ function analyticsTools(canvas) {
|
|
|
1305
1307
|
audience: "shared",
|
|
1306
1308
|
description: "Search for content within a course. Searches pages, assignments, discussions, and announcements by keyword.",
|
|
1307
1309
|
inputSchema: {
|
|
1308
|
-
course_id:
|
|
1310
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1309
1311
|
search_term: _zod.z.string().describe("The keyword or phrase to search for"),
|
|
1310
|
-
content_types: _zod.z.array(_zod.z.enum(
|
|
1312
|
+
content_types: _zod.z.array(_zod.z.enum(_chunkV25MGZFNcjs.SEARCH_CONTENT_TYPES)).optional().describe(
|
|
1311
1313
|
"Content types to search. Defaults to all types: pages, discussions, assignments, announcements."
|
|
1312
1314
|
)
|
|
1313
1315
|
},
|
|
@@ -1319,7 +1321,7 @@ function analyticsTools(canvas) {
|
|
|
1319
1321
|
const courseId = params.course_id;
|
|
1320
1322
|
const searchTerm = params.search_term;
|
|
1321
1323
|
const types = _nullishCoalesce(params.content_types, () => ( [
|
|
1322
|
-
...
|
|
1324
|
+
..._chunkV25MGZFNcjs.SEARCH_CONTENT_TYPES
|
|
1323
1325
|
]));
|
|
1324
1326
|
if (types.length === 0) return { results: [] };
|
|
1325
1327
|
const settled = await Promise.allSettled(
|
|
@@ -1347,7 +1349,7 @@ ${allErrors.join("\n")}`);
|
|
|
1347
1349
|
title: "Get Course Analytics",
|
|
1348
1350
|
description: "Get course-level activity analytics. Returns daily page view and participation counts.",
|
|
1349
1351
|
inputSchema: {
|
|
1350
|
-
course_id:
|
|
1352
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
1351
1353
|
},
|
|
1352
1354
|
annotations: {
|
|
1353
1355
|
readOnlyHint: true,
|
|
@@ -1363,8 +1365,8 @@ ${allErrors.join("\n")}`);
|
|
|
1363
1365
|
title: "Get Student Analytics",
|
|
1364
1366
|
description: "Get per-student activity analytics for a course. Returns page views, participations, and submission timeline for a specific student.",
|
|
1365
1367
|
inputSchema: {
|
|
1366
|
-
course_id:
|
|
1367
|
-
student_id:
|
|
1368
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1369
|
+
student_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID of the student")
|
|
1368
1370
|
},
|
|
1369
1371
|
annotations: {
|
|
1370
1372
|
readOnlyHint: true,
|
|
@@ -1382,7 +1384,7 @@ ${allErrors.join("\n")}`);
|
|
|
1382
1384
|
audience: "shared",
|
|
1383
1385
|
description: "Get a summary of recent activity in a course. Returns counts of recent events grouped by type (submissions, discussions, announcements, etc.).",
|
|
1384
1386
|
inputSchema: {
|
|
1385
|
-
course_id:
|
|
1387
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
1386
1388
|
},
|
|
1387
1389
|
annotations: {
|
|
1388
1390
|
readOnlyHint: true,
|
|
@@ -1399,8 +1401,8 @@ ${allErrors.join("\n")}`);
|
|
|
1399
1401
|
audience: "shared",
|
|
1400
1402
|
description: "Get score distribution analytics for assignments in a course. Returns statistical summary (min, max, median, first/third quartile), submission count, and tardiness breakdown (on_time, late, missing) for each assignment. Provide assignment_id to scope to one assignment; omit to return analytics for all assignments in the course.",
|
|
1401
1403
|
inputSchema: {
|
|
1402
|
-
course_id:
|
|
1403
|
-
assignment_id:
|
|
1404
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1405
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
1404
1406
|
"Scope the result to a single assignment ID. Omit to return analytics for all assignments."
|
|
1405
1407
|
)
|
|
1406
1408
|
},
|
|
@@ -1461,8 +1463,8 @@ function attentionTools(canvas, pseudonymizer) {
|
|
|
1461
1463
|
title: "List Submission Comments Needing Attention",
|
|
1462
1464
|
description: "List submissions where the most recent comment is from the student and has not been addressed by grading or a reply \u2014 i.e. comments the instructor has likely not seen. Returns a triage list, oldest-unaddressed first. Requires instructor/TA permissions in the course.",
|
|
1463
1465
|
inputSchema: {
|
|
1464
|
-
course_id:
|
|
1465
|
-
assignment_ids: _zod.z.array(
|
|
1466
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1467
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
1466
1468
|
"Scope the scan to specific assignment IDs (fetches all assignments when omitted)"
|
|
1467
1469
|
),
|
|
1468
1470
|
unread_only: _zod.z.boolean().optional().describe(
|
|
@@ -1534,7 +1536,7 @@ function attentionTools(canvas, pseudonymizer) {
|
|
|
1534
1536
|
title: "List Students Needing Attention",
|
|
1535
1537
|
description: "Report students who may need instructor attention based on inactivity, missing or late submissions, and low current score. Each finding lists the exact signals that fired and the thresholds used \u2014 this is a factual report, not a prediction. Requires instructor/TA permissions in the course.",
|
|
1536
1538
|
inputSchema: {
|
|
1537
|
-
course_id:
|
|
1539
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1538
1540
|
inactive_days: _zod.z.number().optional().describe("Flag students with no activity in the last N days (default 7)"),
|
|
1539
1541
|
min_missing: _zod.z.number().optional().describe("Flag students with at least N missing submissions (default 1)"),
|
|
1540
1542
|
min_late: _zod.z.number().optional().describe("Flag students with at least N late submissions (default 3)"),
|
|
@@ -1572,7 +1574,7 @@ function attentionTools(canvas, pseudonymizer) {
|
|
|
1572
1574
|
summaryMap.set(s.id, s);
|
|
1573
1575
|
}
|
|
1574
1576
|
} catch (err) {
|
|
1575
|
-
if (err instanceof
|
|
1577
|
+
if (err instanceof _chunkSVXYCCZ4cjs.CanvasApiError && err.status === 404) {
|
|
1576
1578
|
analyticsAvailable = false;
|
|
1577
1579
|
} else {
|
|
1578
1580
|
throw err;
|
|
@@ -1711,7 +1713,7 @@ function assignmentTools(canvas) {
|
|
|
1711
1713
|
audience: "shared",
|
|
1712
1714
|
description: 'List all assignments in a course. Use fields="slim" when enumerating assignments for selection; switch to "full" once you\'ve identified the target. slim returns id, name, due_at, points_possible, published, and course_id only. "full" (default) includes all Canvas fields plus `include` extras (submission, all_dates, overrides, score_statistics, etc.). Use `bucket` to filter by past/upcoming/overdue/etc. Other filters: `search_term`, `assignment_ids`, `order_by`.',
|
|
1713
1715
|
inputSchema: {
|
|
1714
|
-
course_id:
|
|
1716
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1715
1717
|
fields: _zod.z.enum(["slim", "full"]).optional().describe(
|
|
1716
1718
|
'Projection mode: "slim" returns id/name/due_at/points_possible/published/course_id only; "full" (default) returns all fields'
|
|
1717
1719
|
),
|
|
@@ -1720,7 +1722,7 @@ function assignmentTools(canvas) {
|
|
|
1720
1722
|
),
|
|
1721
1723
|
search_term: _zod.z.string().optional().describe("Partial name substring to filter assignments by"),
|
|
1722
1724
|
bucket: _zod.z.enum(ASSIGNMENT_BUCKET).optional().describe("Only include assignments in the given bucket"),
|
|
1723
|
-
assignment_ids: _zod.z.array(
|
|
1725
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Restrict to the given list of assignment IDs"),
|
|
1724
1726
|
order_by: _zod.z.enum(ASSIGNMENT_ORDER_BY).optional().describe("Field to sort the result by"),
|
|
1725
1727
|
override_assignment_dates: _zod.z.boolean().optional().describe(
|
|
1726
1728
|
"Apply assignment overrides to due/unlock/lock dates (default Canvas behavior: true)"
|
|
@@ -1765,8 +1767,8 @@ function assignmentTools(canvas) {
|
|
|
1765
1767
|
audience: "shared",
|
|
1766
1768
|
description: "Get details for a single assignment by ID. Use `include` to request submission, overrides, all_dates, score_statistics, and other optional fields.",
|
|
1767
1769
|
inputSchema: {
|
|
1768
|
-
course_id:
|
|
1769
|
-
assignment_id:
|
|
1770
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1771
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
1770
1772
|
include: _zod.z.array(_zod.z.enum(ASSIGNMENT_GET_INCLUDE)).optional().describe("Extra fields to include on the assignment (Canvas include[] param)"),
|
|
1771
1773
|
override_assignment_dates: _zod.z.boolean().optional().describe("Apply assignment overrides to due/unlock/lock dates"),
|
|
1772
1774
|
needs_grading_count_by_section: _zod.z.boolean().optional().describe("Break needs_grading_count down by section"),
|
|
@@ -1798,14 +1800,14 @@ function assignmentTools(canvas) {
|
|
|
1798
1800
|
audience: "shared",
|
|
1799
1801
|
description: "List assignment groups (categories like Homework, Exams) in a course. Use `include=assignments` to nest assignments under each group; other includes add submission, overrides, score_statistics, etc.",
|
|
1800
1802
|
inputSchema: {
|
|
1801
|
-
course_id:
|
|
1803
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1802
1804
|
include: _zod.z.array(_zod.z.enum(ASSIGNMENT_GROUP_INCLUDE)).optional().describe("Extra fields to include (Canvas include[] param)"),
|
|
1803
|
-
assignment_ids: _zod.z.array(
|
|
1805
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
1804
1806
|
"When combined with include=assignments, restrict nested assignments to these IDs"
|
|
1805
1807
|
),
|
|
1806
1808
|
exclude_assignment_submission_types: _zod.z.array(_zod.z.string()).optional().describe("Exclude assignments whose submission_types match any of these values"),
|
|
1807
1809
|
override_assignment_dates: _zod.z.boolean().optional().describe("Apply assignment overrides to due/unlock/lock dates"),
|
|
1808
|
-
grading_period_id:
|
|
1810
|
+
grading_period_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Scope to a specific grading period"),
|
|
1809
1811
|
scope_assignments_to_student: _zod.z.boolean().optional().describe("Limit assignments to what the current student can see")
|
|
1810
1812
|
},
|
|
1811
1813
|
annotations: {
|
|
@@ -1834,7 +1836,7 @@ function assignmentTools(canvas) {
|
|
|
1834
1836
|
title: "Create Assignment",
|
|
1835
1837
|
description: "Create a new assignment in a course.",
|
|
1836
1838
|
inputSchema: {
|
|
1837
|
-
course_id:
|
|
1839
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1838
1840
|
name: _zod.z.string().describe("Assignment name"),
|
|
1839
1841
|
description: _zod.z.string().optional().describe("Assignment description (HTML supported)"),
|
|
1840
1842
|
points_possible: _zod.z.number().optional().describe("Maximum points for this assignment"),
|
|
@@ -1842,7 +1844,7 @@ function assignmentTools(canvas) {
|
|
|
1842
1844
|
submission_types: _zod.z.array(_zod.z.string()).optional().describe(
|
|
1843
1845
|
'Allowed submission types (e.g. ["online_upload", "online_text_entry", "none"])'
|
|
1844
1846
|
),
|
|
1845
|
-
assignment_group_id:
|
|
1847
|
+
assignment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("ID of the assignment group to place this assignment in"),
|
|
1846
1848
|
published: _zod.z.boolean().optional().describe("Whether the assignment is published and visible to students"),
|
|
1847
1849
|
omit_from_final_grade: _zod.z.boolean().optional().describe("Whether to leave this assignment out of the final grade calculation"),
|
|
1848
1850
|
grade_group_students_individually: _zod.z.boolean().optional().describe(
|
|
@@ -1863,14 +1865,14 @@ function assignmentTools(canvas) {
|
|
|
1863
1865
|
title: "Update Assignment",
|
|
1864
1866
|
description: "Update an existing assignment in a course.",
|
|
1865
1867
|
inputSchema: {
|
|
1866
|
-
course_id:
|
|
1867
|
-
assignment_id:
|
|
1868
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1869
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
1868
1870
|
name: _zod.z.string().optional().describe("New assignment name"),
|
|
1869
1871
|
description: _zod.z.string().optional().describe("New assignment description (HTML supported)"),
|
|
1870
1872
|
points_possible: _zod.z.number().optional().describe("New maximum points"),
|
|
1871
1873
|
due_at: _zod.z.string().optional().describe("New due date in ISO 8601 format (e.g. 2026-05-01T23:59:00Z)"),
|
|
1872
1874
|
submission_types: _zod.z.array(_zod.z.string()).optional().describe("New allowed submission types"),
|
|
1873
|
-
assignment_group_id:
|
|
1875
|
+
assignment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("New assignment group ID"),
|
|
1874
1876
|
published: _zod.z.boolean().optional().describe("Whether the assignment is published and visible to students"),
|
|
1875
1877
|
omit_from_final_grade: _zod.z.boolean().optional().describe("Whether to leave this assignment out of the final grade calculation"),
|
|
1876
1878
|
grade_group_students_individually: _zod.z.boolean().optional().describe(
|
|
@@ -1892,8 +1894,8 @@ function assignmentTools(canvas) {
|
|
|
1892
1894
|
title: "Delete Assignment",
|
|
1893
1895
|
description: "Delete an assignment from a course. This action is permanent.",
|
|
1894
1896
|
inputSchema: {
|
|
1895
|
-
course_id:
|
|
1896
|
-
assignment_id:
|
|
1897
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
1898
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID to delete")
|
|
1897
1899
|
},
|
|
1898
1900
|
annotations: {
|
|
1899
1901
|
destructiveHint: true,
|
|
@@ -1926,7 +1928,7 @@ async function fanOut(config) {
|
|
|
1926
1928
|
skipped.push(outcome.result);
|
|
1927
1929
|
}
|
|
1928
1930
|
} catch (err) {
|
|
1929
|
-
if (!(err instanceof
|
|
1931
|
+
if (!(err instanceof _chunkSVXYCCZ4cjs.CanvasApiError)) {
|
|
1930
1932
|
console.error(`Unexpected error ${config.errorContext(item)}:`, err);
|
|
1931
1933
|
}
|
|
1932
1934
|
const message = err instanceof Error ? err.message : "Unknown error";
|
|
@@ -1959,8 +1961,8 @@ function assignmentOverrideTools(canvas) {
|
|
|
1959
1961
|
title: "List Assignment Overrides",
|
|
1960
1962
|
description: "List all due-date / availability overrides for a specific assignment in a course. Returns overrides targeting individual students, sections, or groups. Useful for auditing before creating a new override \u2014 Canvas returns a 422 if a student-set override already exists for the same students on the same assignment.",
|
|
1961
1963
|
inputSchema: {
|
|
1962
|
-
course_id:
|
|
1963
|
-
assignment_id:
|
|
1964
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
1965
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas assignment ID")
|
|
1964
1966
|
},
|
|
1965
1967
|
annotations: {
|
|
1966
1968
|
readOnlyHint: true,
|
|
@@ -1977,15 +1979,15 @@ function assignmentOverrideTools(canvas) {
|
|
|
1977
1979
|
title: "Create Assignment Override",
|
|
1978
1980
|
description: 'Create a due-date / availability override for a specific assignment, targeting a set of students, a course section, or a group. Exactly one of student_ids, course_section_id, or group_id must be provided. At least one date field (due_at, unlock_at, lock_at) should be provided; omit a date field to leave the corresponding date unchanged for the override target. Dates must be ISO 8601 strings (e.g. "2026-09-15T23:59:00Z"). Canvas returns a 422 if a student-set override already exists for the same students on this assignment \u2014 use list_assignment_overrides to audit first. Provide student_ids as real Canvas user IDs. If CANVAS_PSEUDONYMIZE_STUDENTS is enabled, call resolve_pseudonym first to resolve pseudonyms to real user IDs.',
|
|
1979
1981
|
inputSchema: {
|
|
1980
|
-
course_id:
|
|
1981
|
-
assignment_id:
|
|
1982
|
-
student_ids: _zod.z.array(
|
|
1982
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
1983
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas assignment ID"),
|
|
1984
|
+
student_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).min(1).optional().describe(
|
|
1983
1985
|
"Real Canvas user IDs to grant the override to. Mutually exclusive with course_section_id and group_id."
|
|
1984
1986
|
),
|
|
1985
|
-
course_section_id:
|
|
1987
|
+
course_section_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
1986
1988
|
"ID of the course section to override. Mutually exclusive with student_ids and group_id."
|
|
1987
1989
|
),
|
|
1988
|
-
group_id:
|
|
1990
|
+
group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
1989
1991
|
"ID of the group to override. Mutually exclusive with student_ids and course_section_id."
|
|
1990
1992
|
),
|
|
1991
1993
|
title: _zod.z.string().optional().describe(
|
|
@@ -2033,9 +2035,9 @@ function assignmentOverrideTools(canvas) {
|
|
|
2033
2035
|
title: "Set Student Assignment Dates",
|
|
2034
2036
|
description: "Fan a due-date / availability override for a specific student across all (or a filtered subset of) assignments in a course. Creates one student-set override per assignment via the Canvas assignment overrides API. Partial failures are tolerated \u2014 a failure on one assignment does not abort the rest. Note: for courses with many assignments this makes one Canvas API call per assignment. V1 is create-only: if an override for this student already exists on an assignment, Canvas returns a 422 and that assignment appears in the failed[] list. Use list_assignment_overrides to audit first. Dates must be ISO 8601 strings. To shift dates by a relative amount, first call list_assignments with include=overrides to retrieve current dates, compute absolute timestamps, then call this tool. Returns the standard fan-out envelope: separated applied[], skipped[] (unused in this create-only version, always empty), and failed[] (each with an error) arrays, a not_found list, and a summary of counts. Any assignment_ids that do not exist in the course are reported in not_found (they are neither applied nor failed). Provide user_id as the real Canvas user ID. If CANVAS_PSEUDONYMIZE_STUDENTS is enabled, call resolve_pseudonym first to obtain the real user_id from a pseudonym.",
|
|
2035
2037
|
inputSchema: {
|
|
2036
|
-
course_id:
|
|
2037
|
-
user_id:
|
|
2038
|
-
assignment_ids: _zod.z.array(
|
|
2038
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
2039
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Real Canvas user ID of the student to accommodate"),
|
|
2040
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).min(1).optional().describe(
|
|
2039
2041
|
"Limit the fan-out to these specific assignment IDs (provide at least one). Omit entirely to target all assignments in the course. IDs not present in the course are returned in not_found, not applied/failed."
|
|
2040
2042
|
),
|
|
2041
2043
|
title: _zod.z.string().optional().describe(
|
|
@@ -2116,7 +2118,7 @@ function calendarTools(canvas) {
|
|
|
2116
2118
|
title: "List Calendar Events",
|
|
2117
2119
|
description: 'List calendar events for a course, unbounded by the ~1-week/20-item caps that `get_upcoming_events` and `get_my_upcoming_assignments` are stuck with. By default Canvas only returns `type="event"` items for today alone (end_date defaults to start_date) \u2014 pass both start_date and end_date to cover a range, and type="assignment" to list assignment due dates instead of plain events.',
|
|
2118
2120
|
inputSchema: {
|
|
2119
|
-
course_id:
|
|
2121
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2120
2122
|
type: _zod.z.enum(["event", "assignment", "sub_assignment"]).optional().describe('Kind of calendar item to return. Defaults to "event" if omitted.'),
|
|
2121
2123
|
start_date: _zod.z.string().optional().describe(
|
|
2122
2124
|
"Inclusive range start (YYYY-MM-DD or ISO 8601 datetime). Defaults to today if omitted."
|
|
@@ -2170,7 +2172,7 @@ function calendarTools(canvas) {
|
|
|
2170
2172
|
title: "Update Calendar Event",
|
|
2171
2173
|
description: "Update an existing calendar event. Only provided fields are changed.",
|
|
2172
2174
|
inputSchema: {
|
|
2173
|
-
event_id:
|
|
2175
|
+
event_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas calendar event ID"),
|
|
2174
2176
|
title: _zod.z.string().optional().describe("New event title"),
|
|
2175
2177
|
start_at: _zod.z.string().optional().describe("New start time in ISO 8601 format"),
|
|
2176
2178
|
end_at: _zod.z.string().optional().describe("New end time in ISO 8601 format"),
|
|
@@ -2204,7 +2206,7 @@ function contentExportsTools(canvas) {
|
|
|
2204
2206
|
title: "Create Content Export",
|
|
2205
2207
|
description: 'Start a Canvas course content export (Common Cartridge / QTI / zip). Exports are asynchronous \u2014 this tool returns immediately with an export ID and initial workflow_state ("created"). Call get_content_export to poll progress and retrieve the time-limited download link when the export finishes.',
|
|
2206
2208
|
inputSchema: {
|
|
2207
|
-
course_id:
|
|
2209
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2208
2210
|
export_type: _zod.z.enum(["common_cartridge", "qti", "zip"]).describe(
|
|
2209
2211
|
"Export format: common_cartridge (IMS CC, widely portable for migration/backup), qti (assessments only), zip (Canvas-native files archive)"
|
|
2210
2212
|
)
|
|
@@ -2220,8 +2222,8 @@ function contentExportsTools(canvas) {
|
|
|
2220
2222
|
title: "Get Content Export",
|
|
2221
2223
|
description: 'Get the status of a content export. When workflow_state is "exported", attachment.url contains a time-limited download link \u2014 download it promptly, as the URL expires (re-fetch to get a fresh one). Returns attachment: null while still "created"/"exporting" or on "failed".',
|
|
2222
2224
|
inputSchema: {
|
|
2223
|
-
course_id:
|
|
2224
|
-
export_id:
|
|
2225
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2226
|
+
export_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The export ID returned by create_content_export")
|
|
2225
2227
|
},
|
|
2226
2228
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2227
2229
|
handler: async (params) => canvas.contentExports.get(params.course_id, params.export_id)
|
|
@@ -2231,7 +2233,7 @@ function contentExportsTools(canvas) {
|
|
|
2231
2233
|
title: "List Content Exports",
|
|
2232
2234
|
description: "List all content exports for a course (most recent first).",
|
|
2233
2235
|
inputSchema: {
|
|
2234
|
-
course_id:
|
|
2236
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
2235
2237
|
},
|
|
2236
2238
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2237
2239
|
handler: async (params) => canvas.contentExports.list(params.course_id)
|
|
@@ -2248,7 +2250,7 @@ function contentMigrationsTools(canvas) {
|
|
|
2248
2250
|
title: "List Content Migrations",
|
|
2249
2251
|
description: "List all content migrations for a course (most recent first).",
|
|
2250
2252
|
inputSchema: {
|
|
2251
|
-
course_id:
|
|
2253
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
2252
2254
|
},
|
|
2253
2255
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2254
2256
|
handler: async (params) => canvas.contentMigrations.list(params.course_id)
|
|
@@ -2258,8 +2260,8 @@ function contentMigrationsTools(canvas) {
|
|
|
2258
2260
|
title: "Get Content Migration",
|
|
2259
2261
|
description: 'Get the status of a single content migration. When workflow_state is "running", poll progress_url for live updates. When "completed", the migration is done.',
|
|
2260
2262
|
inputSchema: {
|
|
2261
|
-
course_id:
|
|
2262
|
-
migration_id:
|
|
2263
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2264
|
+
migration_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The content migration ID")
|
|
2263
2265
|
},
|
|
2264
2266
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2265
2267
|
handler: async (params) => canvas.contentMigrations.get(params.course_id, params.migration_id)
|
|
@@ -2269,7 +2271,7 @@ function contentMigrationsTools(canvas) {
|
|
|
2269
2271
|
title: "List Content Migration Types",
|
|
2270
2272
|
description: "List available migration types (migrators) for a course. Returns migrator type keys such as course_copy_importer, common_cartridge_importer, zip_file_importer, qti_converter, moodle_converter.",
|
|
2271
2273
|
inputSchema: {
|
|
2272
|
-
course_id:
|
|
2274
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
2273
2275
|
},
|
|
2274
2276
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2275
2277
|
handler: async (params) => canvas.contentMigrations.listMigrators(params.course_id)
|
|
@@ -2279,8 +2281,8 @@ function contentMigrationsTools(canvas) {
|
|
|
2279
2281
|
title: "Get Migration Selective Data",
|
|
2280
2282
|
description: 'Get the selective import tree for a migration \u2014 the list of content items available to selectively import. Only meaningful for migrations in the "waiting_for_select" state.',
|
|
2281
2283
|
inputSchema: {
|
|
2282
|
-
course_id:
|
|
2283
|
-
migration_id:
|
|
2284
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2285
|
+
migration_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The content migration ID"),
|
|
2284
2286
|
type: _zod.z.string().optional().describe(
|
|
2285
2287
|
'Filter to a specific content type (e.g. "course_settings", "syllabus_body", "context_modules", "assignments")'
|
|
2286
2288
|
)
|
|
@@ -2297,8 +2299,8 @@ function contentMigrationsTools(canvas) {
|
|
|
2297
2299
|
title: "Get Migration Asset ID Mapping",
|
|
2298
2300
|
description: "Get the old-to-new asset ID mapping for a completed migration. Useful for resolving references to content that existed in the source course.",
|
|
2299
2301
|
inputSchema: {
|
|
2300
|
-
course_id:
|
|
2301
|
-
migration_id:
|
|
2302
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2303
|
+
migration_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The content migration ID")
|
|
2302
2304
|
},
|
|
2303
2305
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2304
2306
|
handler: async (params) => canvas.contentMigrations.getAssetIdMapping(
|
|
@@ -2311,8 +2313,8 @@ function contentMigrationsTools(canvas) {
|
|
|
2311
2313
|
title: "List Migration Issues",
|
|
2312
2314
|
description: "List issues encountered during a content migration. Each issue has a type (todo, warning, or error) and a description.",
|
|
2313
2315
|
inputSchema: {
|
|
2314
|
-
course_id:
|
|
2315
|
-
migration_id:
|
|
2316
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2317
|
+
migration_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The content migration ID")
|
|
2316
2318
|
},
|
|
2317
2319
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
2318
2320
|
handler: async (params) => canvas.contentMigrations.listMigrationIssues(
|
|
@@ -2325,7 +2327,7 @@ function contentMigrationsTools(canvas) {
|
|
|
2325
2327
|
title: "Create Content Migration",
|
|
2326
2328
|
description: "Start a content migration (course copy, Common Cartridge import, zip import, QTI conversion, or Moodle conversion). Migrations are asynchronous \u2014 this tool returns immediately with a migration ID and progress_url. Poll get_content_migration or progress_url to track completion.",
|
|
2327
2329
|
inputSchema: {
|
|
2328
|
-
course_id:
|
|
2330
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The destination Canvas course ID"),
|
|
2329
2331
|
migration_type: _zod.z.enum([
|
|
2330
2332
|
"course_copy_importer",
|
|
2331
2333
|
"common_cartridge_importer",
|
|
@@ -2378,7 +2380,7 @@ function conversationTools(canvas, pseudonymizer) {
|
|
|
2378
2380
|
title: "Get Conversation",
|
|
2379
2381
|
description: "Get a single conversation with its full message thread.",
|
|
2380
2382
|
inputSchema: {
|
|
2381
|
-
conversation_id:
|
|
2383
|
+
conversation_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The conversation ID")
|
|
2382
2384
|
},
|
|
2383
2385
|
annotations: {
|
|
2384
2386
|
readOnlyHint: true,
|
|
@@ -2483,7 +2485,7 @@ function courseSetupTools(canvas) {
|
|
|
2483
2485
|
title: "Check Course Setup",
|
|
2484
2486
|
description: "Run a factual course-readiness report that surfaces common configuration problems \u2014 assignments missing due dates, unpublished items students will not see, gradebook weighting gaps, graded assignments with no points, and published assignments still accepting submissions after their due date. Returns findings grouped by check with a plain-language detail per item. This is a config-health report only; it does not inspect student submissions or performance (see list_students_needing_attention / get_missing_submissions for those). Requires instructor permissions in the course.",
|
|
2485
2487
|
inputSchema: {
|
|
2486
|
-
course_id:
|
|
2488
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
2487
2489
|
checks: _zod.z.array(
|
|
2488
2490
|
_zod.z.enum([
|
|
2489
2491
|
"missing_due_dates",
|
|
@@ -2707,7 +2709,7 @@ function courseTools(canvas) {
|
|
|
2707
2709
|
title: "Get Course",
|
|
2708
2710
|
description: "Get details for a single course. Defaults to requesting `term` and `total_students`. Pass `include` to replace the default set with custom Canvas include[] fields (teachers, permissions, syllabus_body, sections, etc.).",
|
|
2709
2711
|
inputSchema: {
|
|
2710
|
-
course_id:
|
|
2712
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2711
2713
|
include: _zod.z.array(_zod.z.enum(COURSE_GET_INCLUDE)).optional().describe("Extra fields to include on the course (Canvas include[] param)"),
|
|
2712
2714
|
teacher_limit: _zod.z.number().int().optional().describe("Limit on the number of teachers returned when include=teachers")
|
|
2713
2715
|
},
|
|
@@ -2728,7 +2730,7 @@ function courseTools(canvas) {
|
|
|
2728
2730
|
title: "Get Syllabus",
|
|
2729
2731
|
description: "Get the syllabus HTML body for a course.",
|
|
2730
2732
|
inputSchema: {
|
|
2731
|
-
course_id:
|
|
2733
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
2732
2734
|
},
|
|
2733
2735
|
annotations: {
|
|
2734
2736
|
readOnlyHint: true,
|
|
@@ -2746,7 +2748,7 @@ function courseTools(canvas) {
|
|
|
2746
2748
|
audience: "admin",
|
|
2747
2749
|
description: "Create a new course in a Canvas account. Returns the created course object.",
|
|
2748
2750
|
inputSchema: {
|
|
2749
|
-
account_id:
|
|
2751
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID to create the course in"),
|
|
2750
2752
|
name: _zod.z.string().describe("The name of the course"),
|
|
2751
2753
|
course_code: _zod.z.string().optional().describe("The course code (e.g. CS101)"),
|
|
2752
2754
|
start_at: _zod.z.string().datetime().optional().describe("Course start date in ISO 8601 format (e.g. 2026-01-15T00:00:00Z)"),
|
|
@@ -2767,7 +2769,7 @@ function courseTools(canvas) {
|
|
|
2767
2769
|
audience: "educator",
|
|
2768
2770
|
description: "Update an existing course. Only provided fields are changed; omitted fields are left as-is.",
|
|
2769
2771
|
inputSchema: {
|
|
2770
|
-
course_id:
|
|
2772
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID to update"),
|
|
2771
2773
|
name: _zod.z.string().optional().describe("New course name"),
|
|
2772
2774
|
course_code: _zod.z.string().optional().describe("New course code"),
|
|
2773
2775
|
start_at: _zod.z.string().datetime().optional().describe("New start date in ISO 8601 format (e.g. 2026-01-15T00:00:00Z)"),
|
|
@@ -2863,6 +2865,9 @@ function anonymityDescription(topic) {
|
|
|
2863
2865
|
function anonymousTopicMessage(courseId, topicId, description) {
|
|
2864
2866
|
return `Discussion topic ${topicId} exists in course ${courseId} \u2014 list_discussions returns it \u2014 but Canvas blocks the topic-scoped detail REST endpoint for anonymous discussion topics and answers it with HTTP 404. This topic is ${description}. The topic ID is correct; no other ID will work. Read the topic's listed attributes from list_discussions, or open the topic in the Canvas web UI. Replying with post_discussion_entry is unaffected.`;
|
|
2865
2867
|
}
|
|
2868
|
+
function anonymousGroupTopicMessage(groupId, topicId, description) {
|
|
2869
|
+
return `Discussion topic ${topicId} exists in group ${groupId} \u2014 list_group_discussions returns it \u2014 but Canvas blocks the topic-scoped detail REST endpoint for anonymous discussion topics and answers it with HTTP 404. This topic is ${description}. The topic ID is correct; no other ID will work. Read the topic's listed attributes from list_group_discussions, or open the topic in the Canvas web UI.`;
|
|
2870
|
+
}
|
|
2866
2871
|
async function describeAnonymityFromList(canvas, courseId, topicId) {
|
|
2867
2872
|
let topics;
|
|
2868
2873
|
try {
|
|
@@ -2873,6 +2878,16 @@ async function describeAnonymityFromList(canvas, courseId, topicId) {
|
|
|
2873
2878
|
const listed = topics.find((topic) => topic.id === topicId);
|
|
2874
2879
|
return listed ? anonymityDescription(listed) : void 0;
|
|
2875
2880
|
}
|
|
2881
|
+
async function describeGroupAnonymityFromList(canvas, groupId, topicId) {
|
|
2882
|
+
let topics;
|
|
2883
|
+
try {
|
|
2884
|
+
topics = await canvas.discussions.listForGroup(groupId);
|
|
2885
|
+
} catch (e6) {
|
|
2886
|
+
return void 0;
|
|
2887
|
+
}
|
|
2888
|
+
const listed = topics.find((topic) => topic.id === topicId);
|
|
2889
|
+
return listed ? anonymityDescription(listed) : void 0;
|
|
2890
|
+
}
|
|
2876
2891
|
function assertAnnouncementHonored(topic, action) {
|
|
2877
2892
|
if (topic.is_announcement) return;
|
|
2878
2893
|
throw new Error(
|
|
@@ -2886,7 +2901,7 @@ function discussionTools(canvas) {
|
|
|
2886
2901
|
title: "List Discussions",
|
|
2887
2902
|
description: "List all discussion topics in a course.",
|
|
2888
2903
|
inputSchema: {
|
|
2889
|
-
course_id:
|
|
2904
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
2890
2905
|
},
|
|
2891
2906
|
annotations: {
|
|
2892
2907
|
readOnlyHint: true,
|
|
@@ -2905,8 +2920,8 @@ function discussionTools(canvas) {
|
|
|
2905
2920
|
// edit also requires `pnpm generate:manifests`.
|
|
2906
2921
|
description: "Get details for a single discussion topic by ID.",
|
|
2907
2922
|
inputSchema: {
|
|
2908
|
-
course_id:
|
|
2909
|
-
topic_id:
|
|
2923
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2924
|
+
topic_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas discussion topic ID")
|
|
2910
2925
|
},
|
|
2911
2926
|
annotations: {
|
|
2912
2927
|
readOnlyHint: true,
|
|
@@ -2918,7 +2933,7 @@ function discussionTools(canvas) {
|
|
|
2918
2933
|
try {
|
|
2919
2934
|
return await canvas.discussions.get(course_id, topic_id);
|
|
2920
2935
|
} catch (error) {
|
|
2921
|
-
if (!(error instanceof
|
|
2936
|
+
if (!(error instanceof _chunkSVXYCCZ4cjs.CanvasApiError) || error.status !== 404) throw error;
|
|
2922
2937
|
const description = await describeAnonymityFromList(canvas, course_id, topic_id);
|
|
2923
2938
|
if (description === void 0) throw error;
|
|
2924
2939
|
throw new Error(anonymousTopicMessage(course_id, topic_id, description), {
|
|
@@ -2927,12 +2942,58 @@ function discussionTools(canvas) {
|
|
|
2927
2942
|
}
|
|
2928
2943
|
}
|
|
2929
2944
|
},
|
|
2945
|
+
{
|
|
2946
|
+
name: "list_group_discussions",
|
|
2947
|
+
title: "List Group Discussions",
|
|
2948
|
+
description: "List all discussion topics in a group.",
|
|
2949
|
+
inputSchema: {
|
|
2950
|
+
group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas group ID")
|
|
2951
|
+
},
|
|
2952
|
+
annotations: {
|
|
2953
|
+
readOnlyHint: true,
|
|
2954
|
+
openWorldHint: true
|
|
2955
|
+
},
|
|
2956
|
+
handler: async (params) => {
|
|
2957
|
+
const group_id = params.group_id;
|
|
2958
|
+
return canvas.discussions.listForGroup(group_id);
|
|
2959
|
+
}
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
name: "get_group_discussion",
|
|
2963
|
+
title: "Get Group Discussion",
|
|
2964
|
+
// As with get_discussion, the anonymous-topic case is reported by the handler's
|
|
2965
|
+
// error below rather than advertised here — `docs/generated/tool-manifest.json`
|
|
2966
|
+
// embeds this string, so any edit also requires `pnpm generate:manifests`.
|
|
2967
|
+
description: "Get details for a single discussion topic in a group by ID.",
|
|
2968
|
+
inputSchema: {
|
|
2969
|
+
group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas group ID"),
|
|
2970
|
+
topic_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas discussion topic ID")
|
|
2971
|
+
},
|
|
2972
|
+
annotations: {
|
|
2973
|
+
readOnlyHint: true,
|
|
2974
|
+
openWorldHint: true
|
|
2975
|
+
},
|
|
2976
|
+
handler: async (params) => {
|
|
2977
|
+
const group_id = params.group_id;
|
|
2978
|
+
const topic_id = params.topic_id;
|
|
2979
|
+
try {
|
|
2980
|
+
return await canvas.discussions.getForGroup(group_id, topic_id);
|
|
2981
|
+
} catch (error) {
|
|
2982
|
+
if (!(error instanceof _chunkSVXYCCZ4cjs.CanvasApiError) || error.status !== 404) throw error;
|
|
2983
|
+
const description = await describeGroupAnonymityFromList(canvas, group_id, topic_id);
|
|
2984
|
+
if (description === void 0) throw error;
|
|
2985
|
+
throw new Error(anonymousGroupTopicMessage(group_id, topic_id, description), {
|
|
2986
|
+
cause: error
|
|
2987
|
+
});
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
},
|
|
2930
2991
|
{
|
|
2931
2992
|
name: "list_announcements",
|
|
2932
2993
|
title: "List Announcements",
|
|
2933
2994
|
description: "List all announcements in a course.",
|
|
2934
2995
|
inputSchema: {
|
|
2935
|
-
course_id:
|
|
2996
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
2936
2997
|
},
|
|
2937
2998
|
annotations: {
|
|
2938
2999
|
readOnlyHint: true,
|
|
@@ -2948,8 +3009,8 @@ function discussionTools(canvas) {
|
|
|
2948
3009
|
title: "Post Discussion Entry",
|
|
2949
3010
|
description: "Post a new entry (reply) to a discussion topic.",
|
|
2950
3011
|
inputSchema: {
|
|
2951
|
-
course_id:
|
|
2952
|
-
topic_id:
|
|
3012
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3013
|
+
topic_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas discussion topic ID"),
|
|
2953
3014
|
message: _zod.z.string().describe("The message body (supports HTML)")
|
|
2954
3015
|
},
|
|
2955
3016
|
annotations: {
|
|
@@ -2969,7 +3030,7 @@ function discussionTools(canvas) {
|
|
|
2969
3030
|
audience: "educator",
|
|
2970
3031
|
description: "Create a new discussion topic in a course.",
|
|
2971
3032
|
inputSchema: {
|
|
2972
|
-
course_id:
|
|
3033
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
2973
3034
|
title: _zod.z.string().min(1).describe("Title of the discussion topic"),
|
|
2974
3035
|
message: _zod.z.string().optional().describe("Body text of the discussion (supports HTML)"),
|
|
2975
3036
|
discussion_type: _zod.z.enum(["side_comment", "threaded"]).optional().describe("Discussion type: side_comment (flat) or threaded"),
|
|
@@ -3006,8 +3067,8 @@ function discussionTools(canvas) {
|
|
|
3006
3067
|
audience: "educator",
|
|
3007
3068
|
description: "Update an existing discussion topic.",
|
|
3008
3069
|
inputSchema: {
|
|
3009
|
-
course_id:
|
|
3010
|
-
topic_id:
|
|
3070
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3071
|
+
topic_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas discussion topic ID"),
|
|
3011
3072
|
title: _zod.z.string().optional().describe("New title for the discussion topic"),
|
|
3012
3073
|
message: _zod.z.string().optional().describe("New body text (supports HTML)"),
|
|
3013
3074
|
published: _zod.z.boolean().optional().describe("Publish or unpublish the topic"),
|
|
@@ -3047,8 +3108,8 @@ function discussionTools(canvas) {
|
|
|
3047
3108
|
audience: "educator",
|
|
3048
3109
|
description: "Delete a discussion topic from a course. This action is permanent.",
|
|
3049
3110
|
inputSchema: {
|
|
3050
|
-
course_id:
|
|
3051
|
-
topic_id:
|
|
3111
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3112
|
+
topic_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas discussion topic ID to delete")
|
|
3052
3113
|
},
|
|
3053
3114
|
annotations: {
|
|
3054
3115
|
destructiveHint: true,
|
|
@@ -3106,8 +3167,8 @@ function enrollmentTools(canvas, pseudonymizer) {
|
|
|
3106
3167
|
state: _zod.z.array(_zod.z.enum(ENROLLMENT_STATE)).optional().describe("Filter by one or more enrollment states"),
|
|
3107
3168
|
role: _zod.z.array(_zod.z.string()).optional().describe("Filter by enrollment role names (as defined in the Canvas account)"),
|
|
3108
3169
|
include: _zod.z.array(_zod.z.enum(ENROLLMENT_INCLUDE)).optional().describe("Extra fields to include on each enrollment (Canvas include[] param)"),
|
|
3109
|
-
grading_period_id:
|
|
3110
|
-
enrollment_term_id:
|
|
3170
|
+
grading_period_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Return enrollments scoped to this grading period"),
|
|
3171
|
+
enrollment_term_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Limit to enrollments in the given term")
|
|
3111
3172
|
},
|
|
3112
3173
|
annotations: {
|
|
3113
3174
|
readOnlyHint: true,
|
|
@@ -3137,14 +3198,14 @@ function enrollmentTools(canvas, pseudonymizer) {
|
|
|
3137
3198
|
audience: "educator",
|
|
3138
3199
|
description: "List enrollments within a specific course with Canvas filters. Use `include=grades` / `include=current_points` for richer grade data, `type[]` to limit to a role, and `user_id` to focus on a single user.",
|
|
3139
3200
|
inputSchema: {
|
|
3140
|
-
course_id:
|
|
3201
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3141
3202
|
type: _zod.z.array(_zod.z.enum(ENROLLMENT_TYPE)).optional().describe("Filter by one or more enrollment types"),
|
|
3142
3203
|
state: _zod.z.array(_zod.z.enum(ENROLLMENT_STATE)).optional().describe("Filter by enrollment states"),
|
|
3143
3204
|
role: _zod.z.array(_zod.z.string()).optional().describe("Filter by custom role names"),
|
|
3144
3205
|
include: _zod.z.array(_zod.z.enum(ENROLLMENT_INCLUDE)).optional().describe("Extra fields to include (Canvas include[] param)"),
|
|
3145
|
-
user_id:
|
|
3146
|
-
grading_period_id:
|
|
3147
|
-
enrollment_term_id:
|
|
3206
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, { sentinels: ["self"] }).optional().describe('Filter to a specific user. Canvas ID (pass large IDs as a string) or "self".'),
|
|
3207
|
+
grading_period_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Scope grade-related includes to this grading period"),
|
|
3208
|
+
enrollment_term_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Limit to enrollments in the given term")
|
|
3148
3209
|
},
|
|
3149
3210
|
annotations: {
|
|
3150
3211
|
readOnlyHint: true,
|
|
@@ -3173,8 +3234,8 @@ function enrollmentTools(canvas, pseudonymizer) {
|
|
|
3173
3234
|
title: "Enroll User",
|
|
3174
3235
|
description: "Enroll a user in a course with a specified role.",
|
|
3175
3236
|
inputSchema: {
|
|
3176
|
-
course_id:
|
|
3177
|
-
user_id:
|
|
3237
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3238
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID to enroll"),
|
|
3178
3239
|
type: _zod.z.enum([
|
|
3179
3240
|
"StudentEnrollment",
|
|
3180
3241
|
"TeacherEnrollment",
|
|
@@ -3202,8 +3263,8 @@ function enrollmentTools(canvas, pseudonymizer) {
|
|
|
3202
3263
|
title: "Remove Enrollment",
|
|
3203
3264
|
description: "Remove or conclude an enrollment from a course. The 'delete' task is permanent; 'conclude' and 'deactivate' are reversible.",
|
|
3204
3265
|
inputSchema: {
|
|
3205
|
-
course_id:
|
|
3206
|
-
enrollment_id:
|
|
3266
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3267
|
+
enrollment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The enrollment ID to remove"),
|
|
3207
3268
|
task: _zod.z.enum(["conclude", "delete", "deactivate"]).describe("The action to perform on the enrollment")
|
|
3208
3269
|
},
|
|
3209
3270
|
annotations: {
|
|
@@ -3281,7 +3342,7 @@ function fileTools(canvas) {
|
|
|
3281
3342
|
title: "List Files",
|
|
3282
3343
|
description: "List all files in a course.",
|
|
3283
3344
|
inputSchema: {
|
|
3284
|
-
course_id:
|
|
3345
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
3285
3346
|
},
|
|
3286
3347
|
annotations: {
|
|
3287
3348
|
readOnlyHint: true,
|
|
@@ -3297,7 +3358,7 @@ function fileTools(canvas) {
|
|
|
3297
3358
|
title: "List Folders",
|
|
3298
3359
|
description: "List all folders in a course.",
|
|
3299
3360
|
inputSchema: {
|
|
3300
|
-
course_id:
|
|
3361
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
3301
3362
|
},
|
|
3302
3363
|
annotations: {
|
|
3303
3364
|
readOnlyHint: true,
|
|
@@ -3313,8 +3374,8 @@ function fileTools(canvas) {
|
|
|
3313
3374
|
title: "Get File",
|
|
3314
3375
|
description: "Get metadata for a single file by ID, including download URL.",
|
|
3315
3376
|
inputSchema: {
|
|
3316
|
-
course_id:
|
|
3317
|
-
file_id:
|
|
3377
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3378
|
+
file_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas file ID")
|
|
3318
3379
|
},
|
|
3319
3380
|
annotations: {
|
|
3320
3381
|
readOnlyHint: true,
|
|
@@ -3332,7 +3393,7 @@ function fileTools(canvas) {
|
|
|
3332
3393
|
audience: "educator",
|
|
3333
3394
|
description: "Upload a file to a course. Content must be base64-encoded. Canvas performs a multi-step upload internally.",
|
|
3334
3395
|
inputSchema: {
|
|
3335
|
-
course_id:
|
|
3396
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3336
3397
|
name: _zod.z.string().describe("File name including extension"),
|
|
3337
3398
|
content: _zod.z.string().describe("Base64-encoded file content"),
|
|
3338
3399
|
content_type: _zod.z.string().describe('MIME type, e.g. "application/pdf" or "image/png"'),
|
|
@@ -3357,7 +3418,7 @@ function fileTools(canvas) {
|
|
|
3357
3418
|
audience: "educator",
|
|
3358
3419
|
description: "Delete a file by ID. This action is permanent.",
|
|
3359
3420
|
inputSchema: {
|
|
3360
|
-
file_id:
|
|
3421
|
+
file_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas file ID")
|
|
3361
3422
|
},
|
|
3362
3423
|
annotations: {
|
|
3363
3424
|
destructiveHint: true,
|
|
@@ -3373,8 +3434,8 @@ function fileTools(canvas) {
|
|
|
3373
3434
|
title: "Download File",
|
|
3374
3435
|
description: "Download the content of a Canvas file by ID. Text files (plain text, HTML, JSON, XML, JavaScript) are returned as readable text. Binary files (images, PDFs, etc.) are returned as base64-encoded data. Files larger than 10 MB are refused.",
|
|
3375
3436
|
inputSchema: {
|
|
3376
|
-
file_id:
|
|
3377
|
-
course_id:
|
|
3437
|
+
file_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas file ID"),
|
|
3438
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Optional Canvas course ID to scope the file lookup")
|
|
3378
3439
|
},
|
|
3379
3440
|
annotations: {
|
|
3380
3441
|
readOnlyHint: true,
|
|
@@ -3391,8 +3452,8 @@ function fileTools(canvas) {
|
|
|
3391
3452
|
title: "Find Duplicate Files",
|
|
3392
3453
|
description: "Find duplicate files in a course's Files area \u2014 copies with the same name and size, typically left behind by repeated course copies. Each duplicate gets flagged separately by accessibility checkers, so this surfaces them for cleanup with the existing delete_file tool. Groups by display name + size (Canvas file listings carry no content hash), so same-name files of different sizes are not considered duplicates.",
|
|
3393
3454
|
inputSchema: {
|
|
3394
|
-
course_id:
|
|
3395
|
-
folder_id:
|
|
3455
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3456
|
+
folder_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
3396
3457
|
"Optional Canvas folder ID to scope the search to that folder and its subfolders"
|
|
3397
3458
|
)
|
|
3398
3459
|
},
|
|
@@ -3433,7 +3494,7 @@ function gradebookHistoryTools(canvas, pseudonymizer) {
|
|
|
3433
3494
|
title: "List Gradebook History Days",
|
|
3434
3495
|
description: "List the dates in a course gradebook history that contain grading activity, grouped by grader and assignment.",
|
|
3435
3496
|
inputSchema: {
|
|
3436
|
-
course_id:
|
|
3497
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
3437
3498
|
},
|
|
3438
3499
|
annotations: {
|
|
3439
3500
|
readOnlyHint: true,
|
|
@@ -3449,7 +3510,7 @@ function gradebookHistoryTools(canvas, pseudonymizer) {
|
|
|
3449
3510
|
title: "Get Gradebook History Day",
|
|
3450
3511
|
description: "Get the graders and assignment IDs that had gradebook activity on a specific course date.",
|
|
3451
3512
|
inputSchema: {
|
|
3452
|
-
course_id:
|
|
3513
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3453
3514
|
date: _zod.z.string().describe("The gradebook history date to inspect, in YYYY-MM-DD format")
|
|
3454
3515
|
},
|
|
3455
3516
|
annotations: {
|
|
@@ -3467,10 +3528,10 @@ function gradebookHistoryTools(canvas, pseudonymizer) {
|
|
|
3467
3528
|
title: "List Gradebook History Submissions",
|
|
3468
3529
|
description: "List versioned submission history for one grader and assignment on a specific gradebook history date.",
|
|
3469
3530
|
inputSchema: {
|
|
3470
|
-
course_id:
|
|
3531
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3471
3532
|
date: _zod.z.string().describe("The gradebook history date to inspect, in YYYY-MM-DD format"),
|
|
3472
|
-
grader_id:
|
|
3473
|
-
assignment_id:
|
|
3533
|
+
grader_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID of the grader"),
|
|
3534
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID")
|
|
3474
3535
|
},
|
|
3475
3536
|
annotations: {
|
|
3476
3537
|
readOnlyHint: true,
|
|
@@ -3503,9 +3564,9 @@ function gradebookHistoryTools(canvas, pseudonymizer) {
|
|
|
3503
3564
|
title: "Get Gradebook History Feed",
|
|
3504
3565
|
description: "Get the paginated gradebook history feed for a course, optionally filtered by assignment or user and optionally sorted oldest-first.",
|
|
3505
3566
|
inputSchema: {
|
|
3506
|
-
course_id:
|
|
3507
|
-
assignment_id:
|
|
3508
|
-
user_id:
|
|
3567
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
3568
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Optional Canvas assignment ID to filter the feed"),
|
|
3569
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Optional Canvas user ID to filter the feed"),
|
|
3509
3570
|
ascending: _zod.z.boolean().optional().describe("Set true to return the oldest gradebook history entries first")
|
|
3510
3571
|
},
|
|
3511
3572
|
annotations: {
|
|
@@ -3780,11 +3841,11 @@ function gradeExplanationTools(canvas, pseudonymizer) {
|
|
|
3780
3841
|
title: "Explain Grade",
|
|
3781
3842
|
description: "Recomputes and explains the weighted course grade for a student, including assignment-group weights, drop_lowest / drop_highest / never_drop rules, per-group breakdowns (earned points, dropped assignments, weighted contributions), the mapped letter grade (via the course grading standard when present), and a reconciliation check against Canvas's posted current_score / final_score.\n\nUse this when you need to verify that Canvas's displayed grade matches the rules, or to explain to a student or instructor how their grade was calculated.\n\nLimitations:\n- V1 computes one student per call. Omit student_id to compute for the authenticated user.\n- Instructor-applied curves and fudge points are not exposed via the Canvas REST API and cannot be reflected in the computation; a caveat is added when the discrepancy exceeds 0.5 pp.\n- When the course uses grading periods, reconciliation is against the overall (cross-period) grade.\n- When CANVAS_PSEUDONYMIZE_STUDENTS is enabled and you are passing a student_id, first call resolve_pseudonym to obtain the real Canvas user_id.",
|
|
3782
3843
|
inputSchema: {
|
|
3783
|
-
course_id:
|
|
3784
|
-
student_id:
|
|
3844
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID to compute the grade for."),
|
|
3845
|
+
student_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
3785
3846
|
"Canvas user_id of the student to compute the grade for. Omit to compute for the currently authenticated user. Instructors may pass any enrolled student's user_id. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, pass the numeric Canvas user_id after resolving the pseudonym via resolve_pseudonym."
|
|
3786
3847
|
),
|
|
3787
|
-
assignment_group_id:
|
|
3848
|
+
assignment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
3788
3849
|
"Narrow the output to a single assignment group. When omitted all groups are included and the overall course grade is computed."
|
|
3789
3850
|
)
|
|
3790
3851
|
},
|
|
@@ -4020,7 +4081,7 @@ Limitations:
|
|
|
4020
4081
|
- Late-submission penalties are not factored in.
|
|
4021
4082
|
- V1 computes one student per call. Omit student_id to compute for the authenticated user. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, resolve the pseudonym first via resolve_pseudonym.`,
|
|
4022
4083
|
inputSchema: {
|
|
4023
|
-
course_id:
|
|
4084
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe(
|
|
4024
4085
|
"Canvas course ID to compute the grade projection for."
|
|
4025
4086
|
),
|
|
4026
4087
|
target_percentage: _zod.z.number().min(0).max(100).optional().describe(
|
|
@@ -4029,7 +4090,7 @@ Limitations:
|
|
|
4029
4090
|
target_letter: _zod.z.string().optional().describe(
|
|
4030
4091
|
'Target course grade as a letter (e.g. "A", "B+"). Requires the course to have a grading standard configured. Exactly one of target_percentage or target_letter must be provided. Case-insensitive.'
|
|
4031
4092
|
),
|
|
4032
|
-
student_id:
|
|
4093
|
+
student_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
4033
4094
|
"Canvas user_id of the student to compute for. Omit to compute for the authenticated user. Instructors may pass any enrolled student's user_id. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, pass the numeric Canvas user_id after resolving the pseudonym via resolve_pseudonym."
|
|
4034
4095
|
)
|
|
4035
4096
|
},
|
|
@@ -4233,7 +4294,7 @@ function gradingPolicyTools(canvas) {
|
|
|
4233
4294
|
title: "Explain Grading Policy",
|
|
4234
4295
|
description: "Explains the grading automation rules configured for a Canvas course:\n- Missing-submission policy: whether blank/unsubmitted work is automatically scored 0 (or another deduction), or left unpenalised.\n- Late-submission policy: whether Canvas applies a per-day or per-hour percentage deduction to late submissions, and whether there is a floor below which the grade cannot fall.\n- Assignment-group weighting: whether the course uses weighted groups, and the weight of each group.\n- Grading scheme: whether a letter-grade scheme (A/B/C/F mapping) is applied to the final score.\n\nAlso returns a plain-language summary paragraph you can share with students or instructors.\n\nNote: the late/missing policy section requires instructor or admin permissions. Students receive the group-weighting and grading-scheme sections only, with a caveat noting what is unavailable. Use explain_grade to compute the actual weighted grade for a specific student.",
|
|
4235
4296
|
inputSchema: {
|
|
4236
|
-
course_id:
|
|
4297
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID to explain the grading policy for.")
|
|
4237
4298
|
},
|
|
4238
4299
|
annotations: {
|
|
4239
4300
|
readOnlyHint: true,
|
|
@@ -4260,9 +4321,9 @@ function gradingPolicyTools(canvas) {
|
|
|
4260
4321
|
latePolicySource = "api";
|
|
4261
4322
|
} else {
|
|
4262
4323
|
const err = latePolicyResult.reason;
|
|
4263
|
-
if (err instanceof
|
|
4324
|
+
if (err instanceof _chunkSVXYCCZ4cjs.CanvasApiError && err.status === 403) {
|
|
4264
4325
|
policyUnavailable = true;
|
|
4265
|
-
} else if (err instanceof
|
|
4326
|
+
} else if (err instanceof _chunkSVXYCCZ4cjs.CanvasApiError && err.status === 404) {
|
|
4266
4327
|
latePolicySource = "default";
|
|
4267
4328
|
} else {
|
|
4268
4329
|
throw err;
|
|
@@ -4292,7 +4353,7 @@ function gradingPolicyTools(canvas) {
|
|
|
4292
4353
|
}
|
|
4293
4354
|
}
|
|
4294
4355
|
} catch (err) {
|
|
4295
|
-
if (!(err instanceof
|
|
4356
|
+
if (!(err instanceof _chunkSVXYCCZ4cjs.CanvasApiError)) throw err;
|
|
4296
4357
|
if (err.status !== 403 && err.status !== 404) throw err;
|
|
4297
4358
|
}
|
|
4298
4359
|
if (standardTitle === null) {
|
|
@@ -4363,8 +4424,8 @@ function gradingStandardsTools(canvas) {
|
|
|
4363
4424
|
title: "List Grading Standards",
|
|
4364
4425
|
description: "List grading standards available in a course or account context. Provide either course_id (to see standards scoped to a course) or account_id (to see account-level standards, requires admin access). Returns an array of grading standard objects, each with an id, title, context, and grading_scheme array of { name, value } entries.",
|
|
4365
4426
|
inputSchema: {
|
|
4366
|
-
course_id:
|
|
4367
|
-
account_id:
|
|
4427
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Course ID to list standards for (mutually exclusive with account_id)"),
|
|
4428
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
4368
4429
|
"Account ID to list standards for (mutually exclusive with course_id; requires admin)"
|
|
4369
4430
|
)
|
|
4370
4431
|
},
|
|
@@ -4392,8 +4453,8 @@ function gradingStandardsTools(canvas) {
|
|
|
4392
4453
|
title: "Create Grading Standard",
|
|
4393
4454
|
description: 'Create a new grading standard (letter-to-percentage scheme) in a course or account context. Provide either course_id or account_id (account requires admin). scheme_entries is an array of { name, value } objects where value is the lower-bound percentage as a fraction 0\u20131 (e.g. { name: "A", value: 0.94 } means A \u2265 94%). Entries will be sorted descending by value before sending to Canvas. Canvas POST body key is grading_scheme_entry (singular); the returned object uses grading_scheme (plural). Returns the created grading standard object including its id \u2014 use that id with apply_grading_standard_to_course to activate it on a course.',
|
|
4394
4455
|
inputSchema: {
|
|
4395
|
-
course_id:
|
|
4396
|
-
account_id:
|
|
4456
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Course ID to create the standard in (mutually exclusive with account_id)"),
|
|
4457
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
4397
4458
|
"Account ID to create the standard in (requires admin; mutually exclusive with course_id)"
|
|
4398
4459
|
),
|
|
4399
4460
|
title: _zod.z.string().min(1).describe('Display name for this grading standard (e.g. "GPA 4.0 Scale")'),
|
|
@@ -4422,7 +4483,7 @@ function gradingStandardsTools(canvas) {
|
|
|
4422
4483
|
}
|
|
4423
4484
|
throw new Error("Provide either course_id or account_id.");
|
|
4424
4485
|
} catch (error) {
|
|
4425
|
-
if (error instanceof
|
|
4486
|
+
if (error instanceof _chunkSVXYCCZ4cjs.CanvasApiError && error.status === 403 && courseId === void 0 && accountId !== void 0 && !error.message.toLowerCase().includes("rate limit exceeded")) {
|
|
4426
4487
|
throw new Error(
|
|
4427
4488
|
"Creating grading standards at the account level requires Canvas admin permissions. Try creating the standard in a course context instead (use course_id).",
|
|
4428
4489
|
{ cause: error }
|
|
@@ -4437,8 +4498,8 @@ function gradingStandardsTools(canvas) {
|
|
|
4437
4498
|
title: "Apply Grading Standard to Course",
|
|
4438
4499
|
description: "Apply an existing grading standard to a course so the gradebook uses it. Pass the grading_standard_id returned by create_grading_standard or list_grading_standards. Pass null for grading_standard_id to remove the current grading standard from the course. Returns the updated course object.",
|
|
4439
4500
|
inputSchema: {
|
|
4440
|
-
course_id:
|
|
4441
|
-
grading_standard_id:
|
|
4501
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID to update"),
|
|
4502
|
+
grading_standard_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).nullable().describe("The grading standard ID to apply, or null to remove the current standard")
|
|
4442
4503
|
},
|
|
4443
4504
|
annotations: {
|
|
4444
4505
|
destructiveHint: true,
|
|
@@ -4461,7 +4522,7 @@ function groupTools(canvas, pseudonymizer) {
|
|
|
4461
4522
|
title: "List Groups",
|
|
4462
4523
|
description: "List all groups in a course.",
|
|
4463
4524
|
inputSchema: {
|
|
4464
|
-
course_id:
|
|
4525
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
4465
4526
|
},
|
|
4466
4527
|
annotations: {
|
|
4467
4528
|
readOnlyHint: true,
|
|
@@ -4477,7 +4538,7 @@ function groupTools(canvas, pseudonymizer) {
|
|
|
4477
4538
|
title: "List Group Members",
|
|
4478
4539
|
description: "List all members of a group.",
|
|
4479
4540
|
inputSchema: {
|
|
4480
|
-
group_id:
|
|
4541
|
+
group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas group ID")
|
|
4481
4542
|
},
|
|
4482
4543
|
annotations: {
|
|
4483
4544
|
readOnlyHint: true,
|
|
@@ -4523,7 +4584,7 @@ function moduleTools(canvas) {
|
|
|
4523
4584
|
audience: "shared",
|
|
4524
4585
|
description: "List all modules in a course.",
|
|
4525
4586
|
inputSchema: {
|
|
4526
|
-
course_id:
|
|
4587
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
4527
4588
|
},
|
|
4528
4589
|
annotations: {
|
|
4529
4590
|
readOnlyHint: true,
|
|
@@ -4540,8 +4601,8 @@ function moduleTools(canvas) {
|
|
|
4540
4601
|
audience: "shared",
|
|
4541
4602
|
description: "Get details for a single module by ID.",
|
|
4542
4603
|
inputSchema: {
|
|
4543
|
-
course_id:
|
|
4544
|
-
module_id:
|
|
4604
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4605
|
+
module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module ID")
|
|
4545
4606
|
},
|
|
4546
4607
|
annotations: {
|
|
4547
4608
|
readOnlyHint: true,
|
|
@@ -4559,8 +4620,8 @@ function moduleTools(canvas) {
|
|
|
4559
4620
|
audience: "shared",
|
|
4560
4621
|
description: "List all items within a module.",
|
|
4561
4622
|
inputSchema: {
|
|
4562
|
-
course_id:
|
|
4563
|
-
module_id:
|
|
4623
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4624
|
+
module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module ID")
|
|
4564
4625
|
},
|
|
4565
4626
|
annotations: {
|
|
4566
4627
|
readOnlyHint: true,
|
|
@@ -4578,7 +4639,7 @@ function moduleTools(canvas) {
|
|
|
4578
4639
|
audience: "shared",
|
|
4579
4640
|
description: "Return the full module \u2192 items tree for a course in a single call, with summary stats. Avoids N+1 round-trips when an agent needs to reason over the whole course shape.",
|
|
4580
4641
|
inputSchema: {
|
|
4581
|
-
course_id:
|
|
4642
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4582
4643
|
include_published_only: _zod.z.boolean().optional().describe("When true, exclude unpublished items from each module (default: false)"),
|
|
4583
4644
|
include_content_details: _zod.z.boolean().optional().describe(
|
|
4584
4645
|
"When true, fetch content_details for each item (adds extra Canvas API data; default: false)"
|
|
@@ -4606,7 +4667,7 @@ function moduleTools(canvas) {
|
|
|
4606
4667
|
audience: "shared",
|
|
4607
4668
|
description: "Interactive tree view of a course's modules and items. Returns the same payload as `get_course_structure` and additionally links to an MCP Apps UI resource that renders an explorable tree with type filters and search. Hosts that do not support MCP Apps fall back to the JSON payload (same as `get_course_structure`).",
|
|
4608
4669
|
inputSchema: {
|
|
4609
|
-
course_id:
|
|
4670
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4610
4671
|
include_published_only: _zod.z.boolean().optional().describe("When true, exclude unpublished items (default: false)"),
|
|
4611
4672
|
include_content_details: _zod.z.boolean().optional().describe("When true, fetch content_details for each item (default: false)")
|
|
4612
4673
|
},
|
|
@@ -4635,11 +4696,11 @@ function moduleTools(canvas) {
|
|
|
4635
4696
|
title: "Create Module",
|
|
4636
4697
|
description: "Create a new module in a course.",
|
|
4637
4698
|
inputSchema: {
|
|
4638
|
-
course_id:
|
|
4699
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4639
4700
|
name: _zod.z.string().describe("Name of the module"),
|
|
4640
4701
|
position: _zod.z.number().optional().describe("Position of the module in the list"),
|
|
4641
4702
|
unlock_at: _zod.z.string().optional().describe("Date/time the module unlocks (ISO 8601)"),
|
|
4642
|
-
prerequisite_module_ids: _zod.z.array(
|
|
4703
|
+
prerequisite_module_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("IDs of modules that must be completed before this one")
|
|
4643
4704
|
},
|
|
4644
4705
|
annotations: {
|
|
4645
4706
|
destructiveHint: true,
|
|
@@ -4660,8 +4721,8 @@ function moduleTools(canvas) {
|
|
|
4660
4721
|
title: "Update Module",
|
|
4661
4722
|
description: "Update an existing module (rename, reposition, publish/unpublish).",
|
|
4662
4723
|
inputSchema: {
|
|
4663
|
-
course_id:
|
|
4664
|
-
module_id:
|
|
4724
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4725
|
+
module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module ID"),
|
|
4665
4726
|
name: _zod.z.string().optional().describe("New name for the module"),
|
|
4666
4727
|
position: _zod.z.number().optional().describe("New position in the module list"),
|
|
4667
4728
|
published: _zod.z.boolean().optional().describe("Whether the module is published")
|
|
@@ -4685,8 +4746,8 @@ function moduleTools(canvas) {
|
|
|
4685
4746
|
title: "Create Module Item",
|
|
4686
4747
|
description: "Add an item (Assignment, Page, Quiz, File, Discussion, ExternalUrl, ExternalTool, SubHeader) to a module.",
|
|
4687
4748
|
inputSchema: {
|
|
4688
|
-
course_id:
|
|
4689
|
-
module_id:
|
|
4749
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4750
|
+
module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module ID"),
|
|
4690
4751
|
title: _zod.z.string().describe("Title of the module item"),
|
|
4691
4752
|
type: _zod.z.enum([
|
|
4692
4753
|
"File",
|
|
@@ -4698,7 +4759,7 @@ function moduleTools(canvas) {
|
|
|
4698
4759
|
"ExternalTool",
|
|
4699
4760
|
"SubHeader"
|
|
4700
4761
|
]).describe("Type of content to add"),
|
|
4701
|
-
content_id:
|
|
4762
|
+
content_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Canvas ID of the content (required for File, Discussion, Assignment, Quiz)"),
|
|
4702
4763
|
page_url: _zod.z.string().optional().describe("Page URL slug (required for Page items, which are addressed by slug, not ID)"),
|
|
4703
4764
|
external_url: _zod.z.string().optional().describe("URL for ExternalUrl or ExternalTool items"),
|
|
4704
4765
|
position: _zod.z.number().optional().describe("Position within the module")
|
|
@@ -4725,16 +4786,16 @@ function moduleTools(canvas) {
|
|
|
4725
4786
|
title: "Update Module Item",
|
|
4726
4787
|
description: "Edit an existing module item in place: rename it, repoint an ExternalUrl/ExternalTool item, reposition or re-indent it, publish/unpublish it, or move it to another module. ExternalUrl items exist only as module items, so a stale link carried in by a course copy can only be fixed here.",
|
|
4727
4788
|
inputSchema: {
|
|
4728
|
-
course_id:
|
|
4729
|
-
module_id:
|
|
4730
|
-
item_id:
|
|
4789
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4790
|
+
module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module ID the item currently belongs to"),
|
|
4791
|
+
item_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module item ID"),
|
|
4731
4792
|
title: _zod.z.string().optional().describe("New title for the module item"),
|
|
4732
4793
|
external_url: _zod.z.string().optional().describe("New URL for an ExternalUrl or ExternalTool item"),
|
|
4733
4794
|
position: _zod.z.number().optional().describe("New 1-based position within the module"),
|
|
4734
4795
|
indent: _zod.z.number().optional().describe("New indent level (0 = flush left)"),
|
|
4735
4796
|
new_tab: _zod.z.boolean().optional().describe("Whether an external item opens in a new tab"),
|
|
4736
4797
|
published: _zod.z.boolean().optional().describe("Whether the item is published"),
|
|
4737
|
-
target_module_id:
|
|
4798
|
+
target_module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Move the item to this module ID (omit to leave it where it is)")
|
|
4738
4799
|
},
|
|
4739
4800
|
annotations: {
|
|
4740
4801
|
destructiveHint: true,
|
|
@@ -4753,9 +4814,9 @@ function moduleTools(canvas) {
|
|
|
4753
4814
|
title: "Delete Module Item",
|
|
4754
4815
|
description: "Remove an item from a module. For ExternalUrl, ExternalTool and SubHeader items the item is the content, so this deletes it outright; for Assignment, Page, Quiz, File and Discussion items it only unlinks the item and the underlying content survives. Re-add with create_module_item.",
|
|
4755
4816
|
inputSchema: {
|
|
4756
|
-
course_id:
|
|
4757
|
-
module_id:
|
|
4758
|
-
item_id:
|
|
4817
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
4818
|
+
module_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module ID"),
|
|
4819
|
+
item_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas module item ID to remove")
|
|
4759
4820
|
},
|
|
4760
4821
|
annotations: {
|
|
4761
4822
|
destructiveHint: true,
|
|
@@ -4781,8 +4842,8 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4781
4842
|
title: "Get Root Outcome Group",
|
|
4782
4843
|
description: "Get the root outcome group for an account or course context.",
|
|
4783
4844
|
inputSchema: {
|
|
4784
|
-
context_type: _zod.z.enum(
|
|
4785
|
-
context_id:
|
|
4845
|
+
context_type: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcomes from an account or course context."),
|
|
4846
|
+
context_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID or course ID for the context.")
|
|
4786
4847
|
},
|
|
4787
4848
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
4788
4849
|
handler: async (params) => canvas.outcomes.getRootOutcomeGroup(
|
|
@@ -4795,8 +4856,8 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4795
4856
|
title: "List Outcome Groups",
|
|
4796
4857
|
description: "List all outcome groups for an account or course context.",
|
|
4797
4858
|
inputSchema: {
|
|
4798
|
-
context_type: _zod.z.enum(
|
|
4799
|
-
context_id:
|
|
4859
|
+
context_type: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome groups from an account or course context."),
|
|
4860
|
+
context_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID or course ID for the context.")
|
|
4800
4861
|
},
|
|
4801
4862
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
4802
4863
|
handler: async (params) => canvas.outcomes.listOutcomeGroups(
|
|
@@ -4809,10 +4870,10 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4809
4870
|
title: "List Outcome Group Links",
|
|
4810
4871
|
description: "List all outcome links in an account or course context.",
|
|
4811
4872
|
inputSchema: {
|
|
4812
|
-
context_type: _zod.z.enum(
|
|
4813
|
-
context_id:
|
|
4814
|
-
outcome_style: _zod.z.enum(
|
|
4815
|
-
outcome_group_style: _zod.z.enum(
|
|
4873
|
+
context_type: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome links from an account or course context."),
|
|
4874
|
+
context_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID or course ID for the context."),
|
|
4875
|
+
outcome_style: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.'),
|
|
4876
|
+
outcome_group_style: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_DETAIL_LEVELS).optional().describe(
|
|
4816
4877
|
'Outcome group detail level. Use "full" to include expanded outcome group fields.'
|
|
4817
4878
|
)
|
|
4818
4879
|
},
|
|
@@ -4831,9 +4892,9 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4831
4892
|
title: "Get Outcome Group",
|
|
4832
4893
|
description: "Get details for a specific outcome group in an account or course context.",
|
|
4833
4894
|
inputSchema: {
|
|
4834
|
-
context_type: _zod.z.enum(
|
|
4835
|
-
context_id:
|
|
4836
|
-
outcome_group_id:
|
|
4895
|
+
context_type: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
|
|
4896
|
+
context_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID or course ID for the context."),
|
|
4897
|
+
outcome_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas outcome group ID.")
|
|
4837
4898
|
},
|
|
4838
4899
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
4839
4900
|
handler: async (params) => canvas.outcomes.getOutcomeGroup(
|
|
@@ -4847,10 +4908,10 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4847
4908
|
title: "List Outcome Group Outcomes",
|
|
4848
4909
|
description: "List the linked outcomes directly under a specific outcome group.",
|
|
4849
4910
|
inputSchema: {
|
|
4850
|
-
context_type: _zod.z.enum(
|
|
4851
|
-
context_id:
|
|
4852
|
-
outcome_group_id:
|
|
4853
|
-
outcome_style: _zod.z.enum(
|
|
4911
|
+
context_type: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
|
|
4912
|
+
context_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID or course ID for the context."),
|
|
4913
|
+
outcome_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas outcome group ID."),
|
|
4914
|
+
outcome_style: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.')
|
|
4854
4915
|
},
|
|
4855
4916
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
4856
4917
|
handler: async (params) => canvas.outcomes.listGroupOutcomes(
|
|
@@ -4867,9 +4928,9 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4867
4928
|
title: "List Outcome Group Subgroups",
|
|
4868
4929
|
description: "List the immediate child outcome groups under a specific outcome group.",
|
|
4869
4930
|
inputSchema: {
|
|
4870
|
-
context_type: _zod.z.enum(
|
|
4871
|
-
context_id:
|
|
4872
|
-
outcome_group_id:
|
|
4931
|
+
context_type: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
|
|
4932
|
+
context_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID or course ID for the context."),
|
|
4933
|
+
outcome_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas outcome group ID.")
|
|
4873
4934
|
},
|
|
4874
4935
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
4875
4936
|
handler: async (params) => canvas.outcomes.listGroupSubgroups(
|
|
@@ -4883,7 +4944,7 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4883
4944
|
title: "Get Outcome",
|
|
4884
4945
|
description: "Get the full details for a specific learning outcome by ID.",
|
|
4885
4946
|
inputSchema: {
|
|
4886
|
-
outcome_id:
|
|
4947
|
+
outcome_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas outcome ID."),
|
|
4887
4948
|
add_defaults: _zod.z.boolean().optional().describe("Include default mastery colors and levels when Canvas supports it.")
|
|
4888
4949
|
},
|
|
4889
4950
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -4896,9 +4957,9 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4896
4957
|
title: "Get Outcome Alignments",
|
|
4897
4958
|
description: "Get outcome alignments for a course, optionally filtered to a specific student or assignment.",
|
|
4898
4959
|
inputSchema: {
|
|
4899
|
-
course_id:
|
|
4900
|
-
student_id:
|
|
4901
|
-
assignment_id:
|
|
4960
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID."),
|
|
4961
|
+
student_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Optional Canvas user ID of the student to filter alignments by."),
|
|
4962
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Optional Canvas assignment ID to filter alignments by.")
|
|
4902
4963
|
},
|
|
4903
4964
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
4904
4965
|
handler: async (params) => canvas.outcomes.getOutcomeAlignments(params.course_id, {
|
|
@@ -4911,11 +4972,11 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4911
4972
|
title: "Get Outcome Results",
|
|
4912
4973
|
description: "Get per-student outcome results for a course, with optional outcome, student, and alignment filters.",
|
|
4913
4974
|
inputSchema: {
|
|
4914
|
-
course_id:
|
|
4915
|
-
user_ids:
|
|
4975
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID."),
|
|
4976
|
+
user_ids: _chunkV25MGZFNcjs.canvasIdList.call(void 0, { prefixes: ["sis_user_id"] }).optional().describe(
|
|
4916
4977
|
'Optional Canvas user IDs (pass large IDs as strings) or SIS user IDs prefixed with "sis_user_id:".'
|
|
4917
4978
|
),
|
|
4918
|
-
outcome_ids: _zod.z.array(
|
|
4979
|
+
outcome_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Optional outcome IDs to restrict the results."),
|
|
4919
4980
|
include_alignments: _zod.z.boolean().optional().describe("Include linked alignment details in the response."),
|
|
4920
4981
|
include_hidden: _zod.z.boolean().optional().describe("Include hidden outcomes when Canvas supports it.")
|
|
4921
4982
|
},
|
|
@@ -4937,18 +4998,18 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4937
4998
|
title: "Get Outcome Rollups",
|
|
4938
4999
|
description: "Get outcome rollups for a course, optionally aggregated or filtered by students, outcomes, and sort options.",
|
|
4939
5000
|
inputSchema: {
|
|
4940
|
-
course_id:
|
|
5001
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID."),
|
|
4941
5002
|
aggregate: _zod.z.enum(["course"]).optional().describe("Aggregate all student rollups into a single course-level rollup."),
|
|
4942
|
-
aggregate_stat: _zod.z.enum(
|
|
4943
|
-
user_ids:
|
|
5003
|
+
aggregate_stat: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_ROLLUP_AGGREGATE_STATS).optional().describe('Statistic to use when aggregate="course".'),
|
|
5004
|
+
user_ids: _chunkV25MGZFNcjs.canvasIdList.call(void 0, { prefixes: ["sis_user_id"] }).optional().describe(
|
|
4944
5005
|
'Optional Canvas user IDs (pass large IDs as strings) or SIS user IDs prefixed with "sis_user_id:".'
|
|
4945
5006
|
),
|
|
4946
|
-
outcome_ids: _zod.z.array(
|
|
5007
|
+
outcome_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Optional outcome IDs to restrict the rollups."),
|
|
4947
5008
|
include_courses: _zod.z.boolean().optional().describe("Include linked course details in the response payload."),
|
|
4948
|
-
exclude: _zod.z.array(_zod.z.enum(
|
|
4949
|
-
sort_by: _zod.z.enum(
|
|
4950
|
-
sort_outcome_id:
|
|
4951
|
-
sort_order: _zod.z.enum(
|
|
5009
|
+
exclude: _zod.z.array(_zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional rollup exclusions for missing users or missing outcome results."),
|
|
5010
|
+
sort_by: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_ROLLUP_SORT_BY).optional().describe("Sort rollups by student name or by a specific outcome score."),
|
|
5011
|
+
sort_outcome_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe('Outcome ID to sort by when sort_by="outcome".'),
|
|
5012
|
+
sort_order: _zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_SORT_ORDER).optional().describe("Sort order to apply when sorting rollups."),
|
|
4952
5013
|
add_defaults: _zod.z.boolean().optional().describe("Include default mastery colors and levels when Canvas supports it.")
|
|
4953
5014
|
},
|
|
4954
5015
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -4975,9 +5036,9 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4975
5036
|
title: "Get Outcome Contributing Scores",
|
|
4976
5037
|
description: "Get assignment or quiz scores that contributed to a specific outcome for one or more students in a course.",
|
|
4977
5038
|
inputSchema: {
|
|
4978
|
-
course_id:
|
|
4979
|
-
outcome_id:
|
|
4980
|
-
user_ids:
|
|
5039
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID."),
|
|
5040
|
+
outcome_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas outcome ID."),
|
|
5041
|
+
user_ids: _chunkV25MGZFNcjs.canvasIdList.call(void 0, { prefixes: ["sis_user_id"] }).optional().describe(
|
|
4981
5042
|
'Optional Canvas user IDs (pass large IDs as strings) or SIS user IDs prefixed with "sis_user_id:".'
|
|
4982
5043
|
),
|
|
4983
5044
|
only_assignment_alignments: _zod.z.boolean().optional().describe("Limit results to assignment alignments only."),
|
|
@@ -4999,10 +5060,10 @@ function outcomeTools(canvas, pseudonymizer) {
|
|
|
4999
5060
|
title: "Get Outcome Mastery Distribution",
|
|
5000
5061
|
description: "Get mastery distribution analytics for outcomes in a course, optionally filtered by students or outcomes.",
|
|
5001
5062
|
inputSchema: {
|
|
5002
|
-
course_id:
|
|
5003
|
-
exclude: _zod.z.array(_zod.z.enum(
|
|
5004
|
-
outcome_ids: _zod.z.array(
|
|
5005
|
-
student_ids:
|
|
5063
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID."),
|
|
5064
|
+
exclude: _zod.z.array(_zod.z.enum(_chunkV25MGZFNcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional exclusions for missing users or missing outcome results."),
|
|
5065
|
+
outcome_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Optional outcome IDs to restrict the distribution results."),
|
|
5066
|
+
student_ids: _chunkV25MGZFNcjs.canvasIdList.call(void 0, { prefixes: ["sis_user_id"] }).optional().describe(
|
|
5006
5067
|
'Optional Canvas student IDs (pass large IDs as strings) or SIS user IDs prefixed with "sis_user_id:".'
|
|
5007
5068
|
),
|
|
5008
5069
|
include_alignment_distributions: _zod.z.boolean().optional().describe("Include contributing score distributions for alignments."),
|
|
@@ -5096,7 +5157,7 @@ function pageTools(canvas) {
|
|
|
5096
5157
|
audience: "shared",
|
|
5097
5158
|
description: "List all wiki pages in a course.",
|
|
5098
5159
|
inputSchema: {
|
|
5099
|
-
course_id:
|
|
5160
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
5100
5161
|
},
|
|
5101
5162
|
output: listOutput("pages", canvasPageSchema),
|
|
5102
5163
|
annotations: {
|
|
@@ -5114,7 +5175,7 @@ function pageTools(canvas) {
|
|
|
5114
5175
|
audience: "shared",
|
|
5115
5176
|
description: "Get a single wiki page by its URL slug.",
|
|
5116
5177
|
inputSchema: {
|
|
5117
|
-
course_id:
|
|
5178
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5118
5179
|
page_url: _zod.z.string().describe('The page URL slug (e.g. "welcome-page")')
|
|
5119
5180
|
},
|
|
5120
5181
|
output: objectOutput(canvasPageSchema),
|
|
@@ -5133,7 +5194,7 @@ function pageTools(canvas) {
|
|
|
5133
5194
|
title: "Create Page",
|
|
5134
5195
|
description: "Create a new wiki page in a course.",
|
|
5135
5196
|
inputSchema: {
|
|
5136
|
-
course_id:
|
|
5197
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5137
5198
|
title: _zod.z.string().describe("Title of the page"),
|
|
5138
5199
|
body: _zod.z.string().optional().describe("HTML body content of the page"),
|
|
5139
5200
|
published: _zod.z.boolean().optional().describe("Whether the page is published"),
|
|
@@ -5159,7 +5220,7 @@ function pageTools(canvas) {
|
|
|
5159
5220
|
title: "Update Page",
|
|
5160
5221
|
description: "Update an existing wiki page.",
|
|
5161
5222
|
inputSchema: {
|
|
5162
|
-
course_id:
|
|
5223
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5163
5224
|
page_url: _zod.z.string().describe("The page URL slug"),
|
|
5164
5225
|
title: _zod.z.string().optional().describe("New title for the page"),
|
|
5165
5226
|
body: _zod.z.string().optional().describe("New HTML body content"),
|
|
@@ -5187,7 +5248,7 @@ function pageTools(canvas) {
|
|
|
5187
5248
|
title: "Delete Page",
|
|
5188
5249
|
description: "Delete a wiki page from a course. This action is permanent.",
|
|
5189
5250
|
inputSchema: {
|
|
5190
|
-
course_id:
|
|
5251
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5191
5252
|
page_url: _zod.z.string().describe("The page URL slug to delete")
|
|
5192
5253
|
},
|
|
5193
5254
|
output: objectOutput(pageDeletionSchema),
|
|
@@ -5213,8 +5274,8 @@ function peerReviewTools(canvas) {
|
|
|
5213
5274
|
title: "List Peer Reviews",
|
|
5214
5275
|
description: "List all peer reviews for an assignment in a course.",
|
|
5215
5276
|
inputSchema: {
|
|
5216
|
-
course_id:
|
|
5217
|
-
assignment_id:
|
|
5277
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5278
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID")
|
|
5218
5279
|
},
|
|
5219
5280
|
annotations: {
|
|
5220
5281
|
readOnlyHint: true,
|
|
@@ -5231,9 +5292,9 @@ function peerReviewTools(canvas) {
|
|
|
5231
5292
|
title: "Get Submission Peer Reviews",
|
|
5232
5293
|
description: "List peer reviews assigned to a specific submission.",
|
|
5233
5294
|
inputSchema: {
|
|
5234
|
-
course_id:
|
|
5235
|
-
assignment_id:
|
|
5236
|
-
submission_id:
|
|
5295
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5296
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
5297
|
+
submission_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas submission ID")
|
|
5237
5298
|
},
|
|
5238
5299
|
annotations: {
|
|
5239
5300
|
readOnlyHint: true,
|
|
@@ -5252,10 +5313,10 @@ function peerReviewTools(canvas) {
|
|
|
5252
5313
|
audience: "educator",
|
|
5253
5314
|
description: "Assign a user to peer-review a submission.",
|
|
5254
5315
|
inputSchema: {
|
|
5255
|
-
course_id:
|
|
5256
|
-
assignment_id:
|
|
5257
|
-
submission_id:
|
|
5258
|
-
user_id:
|
|
5316
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5317
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
5318
|
+
submission_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas submission ID"),
|
|
5319
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID of the reviewer to assign")
|
|
5259
5320
|
},
|
|
5260
5321
|
annotations: {
|
|
5261
5322
|
destructiveHint: true,
|
|
@@ -5275,10 +5336,10 @@ function peerReviewTools(canvas) {
|
|
|
5275
5336
|
audience: "educator",
|
|
5276
5337
|
description: "Remove a peer review assignment from a submission. This action is permanent.",
|
|
5277
5338
|
inputSchema: {
|
|
5278
|
-
course_id:
|
|
5279
|
-
assignment_id:
|
|
5280
|
-
submission_id:
|
|
5281
|
-
user_id:
|
|
5339
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5340
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
5341
|
+
submission_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas submission ID"),
|
|
5342
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID of the reviewer to remove")
|
|
5282
5343
|
},
|
|
5283
5344
|
annotations: {
|
|
5284
5345
|
destructiveHint: true,
|
|
@@ -5305,7 +5366,7 @@ function quizTools(canvas) {
|
|
|
5305
5366
|
audience: "shared",
|
|
5306
5367
|
description: "List all quizzes in a course.",
|
|
5307
5368
|
inputSchema: {
|
|
5308
|
-
course_id:
|
|
5369
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
5309
5370
|
},
|
|
5310
5371
|
annotations: {
|
|
5311
5372
|
readOnlyHint: true,
|
|
@@ -5322,8 +5383,8 @@ function quizTools(canvas) {
|
|
|
5322
5383
|
audience: "shared",
|
|
5323
5384
|
description: "Get details for a single quiz by ID.",
|
|
5324
5385
|
inputSchema: {
|
|
5325
|
-
course_id:
|
|
5326
|
-
quiz_id:
|
|
5386
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5387
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID")
|
|
5327
5388
|
},
|
|
5328
5389
|
annotations: {
|
|
5329
5390
|
readOnlyHint: true,
|
|
@@ -5340,8 +5401,8 @@ function quizTools(canvas) {
|
|
|
5340
5401
|
title: "List Quiz Submissions",
|
|
5341
5402
|
description: "List all submissions for a quiz.",
|
|
5342
5403
|
inputSchema: {
|
|
5343
|
-
course_id:
|
|
5344
|
-
quiz_id:
|
|
5404
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5405
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID")
|
|
5345
5406
|
},
|
|
5346
5407
|
annotations: {
|
|
5347
5408
|
readOnlyHint: true,
|
|
@@ -5358,8 +5419,8 @@ function quizTools(canvas) {
|
|
|
5358
5419
|
title: "List Quiz Questions",
|
|
5359
5420
|
description: "List all questions in a quiz.",
|
|
5360
5421
|
inputSchema: {
|
|
5361
|
-
course_id:
|
|
5362
|
-
quiz_id:
|
|
5422
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5423
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID")
|
|
5363
5424
|
},
|
|
5364
5425
|
annotations: {
|
|
5365
5426
|
readOnlyHint: true,
|
|
@@ -5376,7 +5437,7 @@ function quizTools(canvas) {
|
|
|
5376
5437
|
title: "Get Quiz Submission Answers",
|
|
5377
5438
|
description: "Get a student's answers for a quiz submission.",
|
|
5378
5439
|
inputSchema: {
|
|
5379
|
-
quiz_submission_id:
|
|
5440
|
+
quiz_submission_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz submission ID")
|
|
5380
5441
|
},
|
|
5381
5442
|
annotations: {
|
|
5382
5443
|
readOnlyHint: true,
|
|
@@ -5392,10 +5453,10 @@ function quizTools(canvas) {
|
|
|
5392
5453
|
title: "Score Quiz Question",
|
|
5393
5454
|
description: "Score a specific question in a quiz submission. Specify attempt to score a particular attempt (omit for latest). Requires grading permissions.",
|
|
5394
5455
|
inputSchema: {
|
|
5395
|
-
course_id:
|
|
5396
|
-
quiz_id:
|
|
5397
|
-
submission_id:
|
|
5398
|
-
question_id:
|
|
5456
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5457
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID"),
|
|
5458
|
+
submission_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz submission ID"),
|
|
5459
|
+
question_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz question ID"),
|
|
5399
5460
|
score: _zod.z.number().describe("The score to assign"),
|
|
5400
5461
|
comment: _zod.z.string().optional().describe("Optional feedback comment"),
|
|
5401
5462
|
attempt: _zod.z.number().optional().describe("Quiz attempt number to score (omit for latest)")
|
|
@@ -5435,9 +5496,9 @@ function quizTools(canvas) {
|
|
|
5435
5496
|
audience: "shared",
|
|
5436
5497
|
description: `Get the event log for a Classic Quiz submission in chronological order. Events include session_started, question_answered, question_flagged, page_blurred, and page_focused. Use this to understand the timeline of a student's attempt. Classic Quizzes only \u2014 New Quizzes does not expose event logs via the Canvas REST API. Events are scoped to a single submission; Canvas enforces access permissions (instructors and the submitting student only). Do not use event logs as the sole basis for academic-integrity conclusions; present them with context.`,
|
|
5437
5498
|
inputSchema: {
|
|
5438
|
-
course_id:
|
|
5439
|
-
quiz_id:
|
|
5440
|
-
submission_id:
|
|
5499
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5500
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID (Classic Quizzes only)"),
|
|
5501
|
+
submission_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The quiz submission ID"),
|
|
5441
5502
|
attempt: _zod.z.number().int().positive().optional().describe("Attempt number (1-based). Omit for the most recent attempt.")
|
|
5442
5503
|
},
|
|
5443
5504
|
annotations: {
|
|
@@ -5457,8 +5518,8 @@ function quizTools(canvas) {
|
|
|
5457
5518
|
title: "Delete Quiz",
|
|
5458
5519
|
description: "Permanently delete a Classic quiz from a course, including its questions and every student submission. Classic Quizzes only; use delete_new_quiz for a New Quiz (LTI).",
|
|
5459
5520
|
inputSchema: {
|
|
5460
|
-
course_id:
|
|
5461
|
-
quiz_id:
|
|
5521
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5522
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID to delete (Classic Quizzes only)")
|
|
5462
5523
|
},
|
|
5463
5524
|
annotations: { destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
5464
5525
|
handler: async (params) => {
|
|
@@ -5472,9 +5533,9 @@ function quizTools(canvas) {
|
|
|
5472
5533
|
title: "Delete Quiz Question",
|
|
5473
5534
|
description: "Permanently delete a single question from a Classic quiz. Classic Quizzes only; use delete_new_quiz_item for a New Quiz item.",
|
|
5474
5535
|
inputSchema: {
|
|
5475
|
-
course_id:
|
|
5476
|
-
quiz_id:
|
|
5477
|
-
question_id:
|
|
5536
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5537
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID (Classic Quizzes only)"),
|
|
5538
|
+
question_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz question ID to delete")
|
|
5478
5539
|
},
|
|
5479
5540
|
annotations: { destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
5480
5541
|
handler: async (params) => {
|
|
@@ -5551,9 +5612,9 @@ function quizQuestionResponseTools(canvas, pseudonymizer) {
|
|
|
5551
5612
|
title: "Get Quiz Question Responses",
|
|
5552
5613
|
description: "Review every student's answer to one or all questions in a Classic Quiz, pivoted by question instead of by student \u2014 for grading essay/short-answer/file-upload questions consistently across a class instead of paging through SpeedGrader one student at a time. Classic Quizzes only (quiz_type: assignment, practice_quiz, graded_survey, survey) \u2014 New Quizzes exposes responses through a different API. Omit question_id to get every question; provide it to scope to one. Each question reports needs_manual_grading (true for essay and file-upload questions) and points_possible. Questions drawn from a question bank are included: Canvas stores each draw as a generated question that the quiz's question list omits, so they are resolved from the students' own attempts, listed after the quiz's fixed questions, and report position: null. Scans one Canvas API call per completed or pending-review submission, plus one per attempt needed to resolve such questions. A failed per-submission fetch is recorded in submissions_failed, and a response whose question cannot be resolved is counted in unmatched_response_count and unmatched_question_ids, rather than aborting the whole call. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, student names are replaced with stable pseudonyms.",
|
|
5553
5614
|
inputSchema: {
|
|
5554
|
-
course_id:
|
|
5555
|
-
quiz_id:
|
|
5556
|
-
question_id:
|
|
5615
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
5616
|
+
quiz_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas quiz ID (Classic Quizzes only)"),
|
|
5617
|
+
question_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe(
|
|
5557
5618
|
"Scope the result to a single question ID (from list_quiz_questions, or a bank-drawn question_id returned by this tool). Omit to return every question with every student's response."
|
|
5558
5619
|
)
|
|
5559
5620
|
},
|
|
@@ -5621,7 +5682,7 @@ function quizQuestionResponseTools(canvas, pseudonymizer) {
|
|
|
5621
5682
|
answersBySubmission,
|
|
5622
5683
|
missing
|
|
5623
5684
|
);
|
|
5624
|
-
for (const question of resolved.sort((a, b) =>
|
|
5685
|
+
for (const question of resolved.sort((a, b) => _chunkV25MGZFNcjs.compareCanvasIds.call(void 0, a.id, b.id))) {
|
|
5625
5686
|
groups.set(question.id, toGroup(question, null));
|
|
5626
5687
|
}
|
|
5627
5688
|
}
|
|
@@ -5664,7 +5725,7 @@ function quizQuestionResponseTools(canvas, pseudonymizer) {
|
|
|
5664
5725
|
unmatched_response_count: unmatchedResponseCount,
|
|
5665
5726
|
// `a - b` would round both operands above 2**53 and can report two
|
|
5666
5727
|
// distinct ids as equal (BRU-2730 §4.4).
|
|
5667
|
-
unmatched_question_ids: [...unmatchedQuestionIds].sort(
|
|
5728
|
+
unmatched_question_ids: [...unmatchedQuestionIds].sort(_chunkV25MGZFNcjs.compareCanvasIds)
|
|
5668
5729
|
};
|
|
5669
5730
|
}
|
|
5670
5731
|
}
|
|
@@ -5681,8 +5742,8 @@ function quizAccommodationTools(canvas) {
|
|
|
5681
5742
|
title: "Set Student Quiz Accommodation",
|
|
5682
5743
|
description: "Apply extra time and/or extra attempts to a specific student across all Classic Quizzes in a course (or a specified subset). Fans out to the Canvas quiz extensions API for each quiz. New Quizzes (quiz_type quizzes.next) are skipped \u2014 use set_student_new_quiz_accommodation instead. Only applies to quizzes that exist at call time; re-run after creating new quizzes. Assignment due-date overrides are not handled here (separate fast-follow feature). Note: for courses with many quizzes this makes one Canvas API call per quiz. Partial failures are tolerated \u2014 a failure on one quiz does not abort the rest. Returns the standard fan-out envelope: separated applied[], skipped[] (each with a skip_reason), and failed[] (each with an error) arrays, a not_found list of any requested quiz_ids absent from the course, and a summary of counts. Provide user_id as the real Canvas user ID. If CANVAS_PSEUDONYMIZE_STUDENTS is enabled, call resolve_pseudonym first to obtain the real user_id from a pseudonym.",
|
|
5683
5744
|
inputSchema: {
|
|
5684
|
-
course_id:
|
|
5685
|
-
user_id:
|
|
5745
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
5746
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Real Canvas user ID of the student to accommodate"),
|
|
5686
5747
|
extra_time_minutes: _zod.z.number().int().positive().optional().describe(
|
|
5687
5748
|
"Absolute extra time in minutes to add to each quiz. Mutually exclusive with time_multiplier."
|
|
5688
5749
|
),
|
|
@@ -5690,7 +5751,7 @@ function quizAccommodationTools(canvas) {
|
|
|
5690
5751
|
"Relative time multiplier (e.g. 1.5 for 1.5\xD7 time). extra_minutes = round(quiz.time_limit * (multiplier - 1)), minimum 1 minute. Quizzes with no time limit are skipped for extra_time (extra_attempts is still applied if provided). Mutually exclusive with extra_time_minutes."
|
|
5691
5752
|
),
|
|
5692
5753
|
extra_attempts: _zod.z.number().int().min(1).optional().describe("Additional attempts to grant beyond the quiz default."),
|
|
5693
|
-
quiz_ids: _zod.z.array(
|
|
5754
|
+
quiz_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
5694
5755
|
"Limit accommodation to these specific quiz IDs. Omit to target all Classic Quizzes in the course."
|
|
5695
5756
|
)
|
|
5696
5757
|
},
|
|
@@ -5786,8 +5847,8 @@ function quizAccommodationTools(canvas) {
|
|
|
5786
5847
|
title: "List Student Quiz Accommodations",
|
|
5787
5848
|
description: "List the current quiz accommodation (extra time and/or extra attempts) for a specific student across all Classic Quizzes in a course. Useful for auditing before or after calling set_student_quiz_accommodation. New Quizzes (quiz_type quizzes.next) are excluded. Reads extra_time / extra_attempts from each quiz's submission records (Canvas exposes no read endpoint for quiz extensions directly) \u2014 one Canvas API call per Classic Quiz, so it may be slow for courses with many quizzes. Errors from any quiz's read propagate immediately (no per-quiz error catching). Provide user_id as the real Canvas user ID. If CANVAS_PSEUDONYMIZE_STUDENTS is enabled, call resolve_pseudonym first.",
|
|
5788
5849
|
inputSchema: {
|
|
5789
|
-
course_id:
|
|
5790
|
-
user_id:
|
|
5850
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
5851
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Real Canvas user ID of the student")
|
|
5791
5852
|
},
|
|
5792
5853
|
annotations: {
|
|
5793
5854
|
readOnlyHint: true,
|
|
@@ -5837,13 +5898,13 @@ function newQuizAccommodationTools(canvas) {
|
|
|
5837
5898
|
title: "Set Student New Quiz Accommodation",
|
|
5838
5899
|
description: 'Apply a time and/or attempts accommodation for a student across all New Quizzes in a course (course-level, single Canvas API call when no assignment_ids are given) or for a specified subset of New Quizzes (per-quiz fan-out when assignment_ids are given). New Quizzes use a time_multiplier (ratio, e.g. 1.5 for 1.5\xD7 time), not absolute minutes. For Classic Quizzes (quiz_type: assignment / practice_quiz / etc.) use set_student_quiz_accommodation instead. Partial per-quiz failures are tolerated \u2014 a failure on one quiz does not abort the rest. In per-quiz mode, fan-out is sequential (one Canvas API call per assignment ID, awaited in series). Canvas errors on the course-level path (no assignment_ids) propagate as a top-level error (no envelope). Returns a uniform envelope: scope ("course" or "per_quiz"), applied[], failed[], and summary. Provide user_id as the real Canvas user ID. If CANVAS_PSEUDONYMIZE_STUDENTS is enabled, call resolve_pseudonym first to obtain the real user_id from a pseudonym.',
|
|
5839
5900
|
inputSchema: {
|
|
5840
|
-
course_id:
|
|
5841
|
-
user_id:
|
|
5901
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
5902
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Real Canvas user ID of the student to accommodate"),
|
|
5842
5903
|
time_multiplier: _zod.z.number().min(1.01).optional().describe(
|
|
5843
5904
|
"Time multiplier for New Quizzes (e.g. 1.5 for 1.5\xD7 time, 2.0 for double time). This is the native New Quizzes field; Canvas applies it to each quiz's time limit. Must be > 1.0. Mutually exclusive with nothing \u2014 can be combined with extra_attempts."
|
|
5844
5905
|
),
|
|
5845
5906
|
extra_attempts: _zod.z.number().int().min(1).optional().describe("Additional attempts to grant beyond each quiz's default attempt limit."),
|
|
5846
|
-
assignment_ids: _zod.z.array(
|
|
5907
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
5847
5908
|
"Limit accommodation to these specific New Quiz assignment IDs. Omit to apply a course-level accommodation (covers all New Quizzes in the course with a single Canvas API call). When provided, fans out one call per assignment ID."
|
|
5848
5909
|
)
|
|
5849
5910
|
},
|
|
@@ -5896,7 +5957,7 @@ function newQuizAccommodationTools(canvas) {
|
|
|
5896
5957
|
extra_attempts: record.extra_attempts
|
|
5897
5958
|
});
|
|
5898
5959
|
} catch (err) {
|
|
5899
|
-
const message = err instanceof
|
|
5960
|
+
const message = err instanceof _chunkSVXYCCZ4cjs.CanvasApiError ? err.message : "Unknown error";
|
|
5900
5961
|
failed.push({
|
|
5901
5962
|
assignment_id: assignmentId,
|
|
5902
5963
|
time_multiplier: null,
|
|
@@ -5918,8 +5979,8 @@ function newQuizAccommodationTools(canvas) {
|
|
|
5918
5979
|
title: "List Student New Quiz Accommodations",
|
|
5919
5980
|
description: 'Read the current course-level New Quizzes accommodation (time multiplier and/or extra attempts) for a specific student in a course. Useful for auditing before or after calling set_student_new_quiz_accommodation. Returns has_accommodation: false when no accommodation is set (Canvas 404 is treated as "no record", not an error). New Quizzes store a single course-level accommodation record per student; this is not per-quiz. For Classic Quizzes, use list_student_quiz_accommodations instead. Provide user_id as the real Canvas user ID. If CANVAS_PSEUDONYMIZE_STUDENTS is enabled, call resolve_pseudonym first.',
|
|
5920
5981
|
inputSchema: {
|
|
5921
|
-
course_id:
|
|
5922
|
-
user_id:
|
|
5982
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
5983
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Real Canvas user ID of the student")
|
|
5923
5984
|
},
|
|
5924
5985
|
annotations: {
|
|
5925
5986
|
readOnlyHint: true,
|
|
@@ -6012,7 +6073,7 @@ function newQuizTools(canvas) {
|
|
|
6012
6073
|
title: "Create New Quiz",
|
|
6013
6074
|
description: "Create a New Quiz (LTI) in a Canvas course. New Quizzes is the modern quiz engine; for Classic quizzes use create_quiz.",
|
|
6014
6075
|
inputSchema: {
|
|
6015
|
-
course_id:
|
|
6076
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6016
6077
|
title: _zod.z.string().describe("Title of the quiz"),
|
|
6017
6078
|
instructions: _zod.z.string().nullable().optional().describe("HTML instructions shown before the quiz starts"),
|
|
6018
6079
|
points_possible: _zod.z.number().optional().describe("Total points; defaults to sum of item points"),
|
|
@@ -6040,8 +6101,8 @@ function newQuizTools(canvas) {
|
|
|
6040
6101
|
title: "Update New Quiz",
|
|
6041
6102
|
description: "Update an existing New Quiz (LTI) in a Canvas course.",
|
|
6042
6103
|
inputSchema: {
|
|
6043
|
-
course_id:
|
|
6044
|
-
assignment_id:
|
|
6104
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6105
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz"),
|
|
6045
6106
|
title: _zod.z.string().optional().describe("Title of the quiz"),
|
|
6046
6107
|
instructions: _zod.z.string().nullable().optional().describe("HTML instructions shown before the quiz starts"),
|
|
6047
6108
|
points_possible: _zod.z.number().optional().describe("Total points"),
|
|
@@ -6070,8 +6131,8 @@ function newQuizTools(canvas) {
|
|
|
6070
6131
|
title: "Delete New Quiz",
|
|
6071
6132
|
description: "Delete a New Quiz (LTI) from a Canvas course. This action is permanent. Use assignment_id (not quiz_id).",
|
|
6072
6133
|
inputSchema: {
|
|
6073
|
-
course_id:
|
|
6074
|
-
assignment_id:
|
|
6134
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6135
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz")
|
|
6075
6136
|
},
|
|
6076
6137
|
annotations: { destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
6077
6138
|
handler: async (params) => {
|
|
@@ -6086,8 +6147,8 @@ function newQuizTools(canvas) {
|
|
|
6086
6147
|
title: "List New Quiz Items",
|
|
6087
6148
|
description: "List all items (questions) in a New Quiz (LTI).",
|
|
6088
6149
|
inputSchema: {
|
|
6089
|
-
course_id:
|
|
6090
|
-
assignment_id:
|
|
6150
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6151
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz")
|
|
6091
6152
|
},
|
|
6092
6153
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
6093
6154
|
handler: async (params) => {
|
|
@@ -6101,8 +6162,8 @@ function newQuizTools(canvas) {
|
|
|
6101
6162
|
title: "Get New Quiz Item",
|
|
6102
6163
|
description: "Get a single item (question) from a New Quiz (LTI) by item ID.",
|
|
6103
6164
|
inputSchema: {
|
|
6104
|
-
course_id:
|
|
6105
|
-
assignment_id:
|
|
6165
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6166
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz"),
|
|
6106
6167
|
item_id: _zod.z.string().describe("The New Quiz item ID (string, not numeric)")
|
|
6107
6168
|
},
|
|
6108
6169
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -6118,8 +6179,8 @@ function newQuizTools(canvas) {
|
|
|
6118
6179
|
title: "Create New Quiz Item",
|
|
6119
6180
|
description: "Create an item (question) in a New Quiz (LTI). Supports 5 types: choice (MCQ), true-false, essay, matching, numeric. Canvas may rate-limit rapid sequential creates. Call serially (not in parallel). For >50 items, chunk and pause between batches.",
|
|
6120
6181
|
inputSchema: {
|
|
6121
|
-
course_id:
|
|
6122
|
-
assignment_id:
|
|
6182
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6183
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz"),
|
|
6123
6184
|
points_possible: _zod.z.number().describe("Points awarded for a fully correct answer"),
|
|
6124
6185
|
position: _zod.z.number().int().optional().describe("1-based position in the quiz; appended if omitted"),
|
|
6125
6186
|
item: itemDiscriminatedUnion
|
|
@@ -6140,8 +6201,8 @@ function newQuizTools(canvas) {
|
|
|
6140
6201
|
title: "Update New Quiz Item",
|
|
6141
6202
|
description: "Update an existing item (question) in a New Quiz (LTI). All fields are optional; supply only what changes. Canvas may rate-limit rapid sequential updates. Call serially (not in parallel). For >50 items, chunk and pause between batches.",
|
|
6142
6203
|
inputSchema: {
|
|
6143
|
-
course_id:
|
|
6144
|
-
assignment_id:
|
|
6204
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6205
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz"),
|
|
6145
6206
|
item_id: _zod.z.string().describe("The New Quiz item ID (string, not numeric)"),
|
|
6146
6207
|
points_possible: _zod.z.number().optional().describe("Updated point value"),
|
|
6147
6208
|
position: _zod.z.number().int().optional().describe("Updated 1-based position"),
|
|
@@ -6164,8 +6225,8 @@ function newQuizTools(canvas) {
|
|
|
6164
6225
|
title: "Delete New Quiz Item",
|
|
6165
6226
|
description: "Delete an item (question) from a New Quiz (LTI). This action is permanent.",
|
|
6166
6227
|
inputSchema: {
|
|
6167
|
-
course_id:
|
|
6168
|
-
assignment_id:
|
|
6228
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6229
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The assignment ID of the New Quiz"),
|
|
6169
6230
|
item_id: _zod.z.string().describe("The New Quiz item ID (string, not numeric)")
|
|
6170
6231
|
},
|
|
6171
6232
|
annotations: { destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
@@ -6189,7 +6250,7 @@ function rubricTools(canvas) {
|
|
|
6189
6250
|
title: "List Rubrics",
|
|
6190
6251
|
description: "List all rubrics in a course.",
|
|
6191
6252
|
inputSchema: {
|
|
6192
|
-
course_id:
|
|
6253
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
6193
6254
|
},
|
|
6194
6255
|
annotations: {
|
|
6195
6256
|
readOnlyHint: true,
|
|
@@ -6205,8 +6266,8 @@ function rubricTools(canvas) {
|
|
|
6205
6266
|
title: "Get Rubric",
|
|
6206
6267
|
description: "Get details for a single rubric by ID, including criteria.",
|
|
6207
6268
|
inputSchema: {
|
|
6208
|
-
course_id:
|
|
6209
|
-
rubric_id:
|
|
6269
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6270
|
+
rubric_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas rubric ID")
|
|
6210
6271
|
},
|
|
6211
6272
|
annotations: {
|
|
6212
6273
|
readOnlyHint: true,
|
|
@@ -6223,9 +6284,9 @@ function rubricTools(canvas) {
|
|
|
6223
6284
|
title: "Get Rubric Assessment",
|
|
6224
6285
|
description: "Get the rubric assessment for a specific student submission on an assignment.",
|
|
6225
6286
|
inputSchema: {
|
|
6226
|
-
course_id:
|
|
6227
|
-
assignment_id:
|
|
6228
|
-
user_id:
|
|
6287
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6288
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
6289
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID")
|
|
6229
6290
|
},
|
|
6230
6291
|
annotations: {
|
|
6231
6292
|
readOnlyHint: true,
|
|
@@ -6243,8 +6304,8 @@ function rubricTools(canvas) {
|
|
|
6243
6304
|
title: "Submit Rubric Assessment",
|
|
6244
6305
|
description: "Submit a rubric assessment with scores and comments for each criterion.",
|
|
6245
6306
|
inputSchema: {
|
|
6246
|
-
course_id:
|
|
6247
|
-
association_id:
|
|
6307
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6308
|
+
association_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The rubric association ID"),
|
|
6248
6309
|
data: _zod.z.array(
|
|
6249
6310
|
_zod.z.object({
|
|
6250
6311
|
criterion_id: _zod.z.string().describe("The rubric criterion ID"),
|
|
@@ -6270,7 +6331,7 @@ function rubricTools(canvas) {
|
|
|
6270
6331
|
title: "Create Rubric",
|
|
6271
6332
|
description: "Create a new rubric in a course with criteria and rating levels. Optionally link it to an assignment immediately.",
|
|
6272
6333
|
inputSchema: {
|
|
6273
|
-
course_id:
|
|
6334
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6274
6335
|
title: _zod.z.string().describe("The rubric title"),
|
|
6275
6336
|
criteria: _zod.z.array(
|
|
6276
6337
|
_zod.z.object({
|
|
@@ -6285,7 +6346,7 @@ function rubricTools(canvas) {
|
|
|
6285
6346
|
})
|
|
6286
6347
|
).min(1, "At least one criterion is required").describe("Rubric criteria"),
|
|
6287
6348
|
association: _zod.z.object({
|
|
6288
|
-
assignment_id:
|
|
6349
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Assignment ID to link this rubric to"),
|
|
6289
6350
|
use_for_grading: _zod.z.boolean().optional().describe("Whether to use this rubric for grading"),
|
|
6290
6351
|
purpose: _zod.z.string().optional().describe('Purpose of the association (e.g., "grading")')
|
|
6291
6352
|
}).optional().describe("Optional assignment association")
|
|
@@ -6361,7 +6422,7 @@ function studentTools(canvas, pseudonymizer) {
|
|
|
6361
6422
|
title: "Get My Grades",
|
|
6362
6423
|
description: "Get grade data for the authenticated student. If course_id is omitted, returns grades across all enrolled courses.",
|
|
6363
6424
|
inputSchema: {
|
|
6364
|
-
course_id:
|
|
6425
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("The Canvas course ID (omit for all courses)")
|
|
6365
6426
|
},
|
|
6366
6427
|
annotations: {
|
|
6367
6428
|
readOnlyHint: true,
|
|
@@ -6377,7 +6438,7 @@ function studentTools(canvas, pseudonymizer) {
|
|
|
6377
6438
|
title: "Get My Submissions",
|
|
6378
6439
|
description: "List all submissions for the authenticated student in a course.",
|
|
6379
6440
|
inputSchema: {
|
|
6380
|
-
course_id:
|
|
6441
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
6381
6442
|
},
|
|
6382
6443
|
annotations: {
|
|
6383
6444
|
readOnlyHint: true,
|
|
@@ -6406,7 +6467,7 @@ function studentTools(canvas, pseudonymizer) {
|
|
|
6406
6467
|
title: "Get My Submission Feedback",
|
|
6407
6468
|
description: "List the authenticated student's own submissions that carry feedback comments from an instructor or a peer reviewer \u2014 comments left by the student themselves do not count as feedback and submissions with no non-self comments are omitted. Omit `course_id` to scan every active course; a course that errors during a scan is skipped and reported in `courses_failed` rather than failing the whole call. Sorted most-recent-feedback-first. Comment author role is best-effort: 'teacher' is only identified when the author is the submission's recorded grader; other non-self authors are labeled 'peer', including any staff member who comments without being the recorded grader.",
|
|
6408
6469
|
inputSchema: {
|
|
6409
|
-
course_id:
|
|
6470
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("The Canvas course ID. Omit to scan all of the student's active courses."),
|
|
6410
6471
|
unread_only: _zod.z.boolean().optional().describe(
|
|
6411
6472
|
"Only include submissions the student hasn't opened yet (Canvas read_status). Defaults to false."
|
|
6412
6473
|
)
|
|
@@ -6447,8 +6508,8 @@ function studentTools(canvas, pseudonymizer) {
|
|
|
6447
6508
|
} else {
|
|
6448
6509
|
coursesFailed.push({
|
|
6449
6510
|
course_id: result.courseId,
|
|
6450
|
-
status: result.err instanceof
|
|
6451
|
-
message: result.err instanceof
|
|
6511
|
+
status: result.err instanceof _chunkSVXYCCZ4cjs.CanvasApiError ? result.err.status : null,
|
|
6512
|
+
message: result.err instanceof _chunkSVXYCCZ4cjs.CanvasApiError ? result.err.message : String(result.err)
|
|
6452
6513
|
});
|
|
6453
6514
|
}
|
|
6454
6515
|
}
|
|
@@ -6718,7 +6779,7 @@ function studentSearchTools(canvas, pseudonymizer) {
|
|
|
6718
6779
|
const coursesToScan = truncated ? sorted.slice(0, maxCourses) : sorted;
|
|
6719
6780
|
const coursesFailed = [];
|
|
6720
6781
|
const perCourseMatches = [];
|
|
6721
|
-
const scanResults = await
|
|
6782
|
+
const scanResults = await _chunkV25MGZFNcjs.mapWithConcurrency.call(void 0,
|
|
6722
6783
|
coursesToScan,
|
|
6723
6784
|
CONCURRENT_COURSE_LIMIT,
|
|
6724
6785
|
async (course) => {
|
|
@@ -6741,8 +6802,8 @@ function studentSearchTools(canvas, pseudonymizer) {
|
|
|
6741
6802
|
} else {
|
|
6742
6803
|
coursesFailed.push({
|
|
6743
6804
|
course_id: r.course.id,
|
|
6744
|
-
status: r.err instanceof
|
|
6745
|
-
message: r.err instanceof
|
|
6805
|
+
status: r.err instanceof _chunkSVXYCCZ4cjs.CanvasApiError ? r.err.status : null,
|
|
6806
|
+
message: r.err instanceof _chunkSVXYCCZ4cjs.CanvasApiError ? r.err.message : String(r.err)
|
|
6746
6807
|
});
|
|
6747
6808
|
}
|
|
6748
6809
|
}
|
|
@@ -6820,18 +6881,18 @@ function submissionTools(canvas, pseudonymizer) {
|
|
|
6820
6881
|
title: "List Submissions",
|
|
6821
6882
|
description: "List all submissions for an assignment. Use `include` to attach user, assignment, rubric_assessment, submission_history, or visibility. Filter with `student_ids`, `workflow_state`, or `grading_period_id`. Defaults to including submission_comments.",
|
|
6822
6883
|
inputSchema: {
|
|
6823
|
-
course_id:
|
|
6824
|
-
assignment_id:
|
|
6884
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6885
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
6825
6886
|
include: _zod.z.array(_zod.z.enum(SUBMISSION_LIST_INCLUDE)).optional().describe(
|
|
6826
6887
|
'Extra fields to include (Canvas include[] param). Defaults to ["submission_comments"] when omitted.'
|
|
6827
6888
|
),
|
|
6828
|
-
student_ids:
|
|
6889
|
+
student_ids: _chunkV25MGZFNcjs.canvasIdList.call(void 0, { sentinels: ["all", "self"] }).optional().describe(
|
|
6829
6890
|
'Restrict to submissions for these user IDs (pass large IDs as strings). Use "all" or "self" for shortcuts.'
|
|
6830
6891
|
),
|
|
6831
|
-
section_ids: _zod.z.array(
|
|
6892
|
+
section_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Restrict to submissions in these sections"),
|
|
6832
6893
|
grouped: _zod.z.boolean().optional().describe("Return one submission per group rather than per student"),
|
|
6833
6894
|
workflow_state: _zod.z.enum(SUBMISSION_WORKFLOW_STATE).optional().describe("Only include submissions in this workflow state"),
|
|
6834
|
-
grading_period_id:
|
|
6895
|
+
grading_period_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).optional().describe("Restrict to a grading period")
|
|
6835
6896
|
},
|
|
6836
6897
|
annotations: {
|
|
6837
6898
|
readOnlyHint: true,
|
|
@@ -6865,9 +6926,9 @@ function submissionTools(canvas, pseudonymizer) {
|
|
|
6865
6926
|
title: "Get Submission",
|
|
6866
6927
|
description: "Get a single submission for a specific user on an assignment. Defaults to including submission_comments. Pass `include` to add rubric_assessment, submission_history, visibility, course, user, or read_status.",
|
|
6867
6928
|
inputSchema: {
|
|
6868
|
-
course_id:
|
|
6869
|
-
assignment_id:
|
|
6870
|
-
user_id:
|
|
6929
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6930
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
6931
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID"),
|
|
6871
6932
|
include: _zod.z.array(_zod.z.enum(SUBMISSION_GET_INCLUDE)).optional().describe(
|
|
6872
6933
|
'Extra fields to include (Canvas include[] param). Defaults to ["submission_comments"] when omitted.'
|
|
6873
6934
|
)
|
|
@@ -6896,9 +6957,9 @@ function submissionTools(canvas, pseudonymizer) {
|
|
|
6896
6957
|
title: "Grade Submission",
|
|
6897
6958
|
description: "Post or update a grade for a submission. Requires grading permissions.",
|
|
6898
6959
|
inputSchema: {
|
|
6899
|
-
course_id:
|
|
6900
|
-
assignment_id:
|
|
6901
|
-
user_id:
|
|
6960
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6961
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
6962
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID"),
|
|
6902
6963
|
grade: _zod.z.string().describe('The grade to assign (e.g. "95", "A", "pass")')
|
|
6903
6964
|
},
|
|
6904
6965
|
annotations: {
|
|
@@ -6919,9 +6980,9 @@ function submissionTools(canvas, pseudonymizer) {
|
|
|
6919
6980
|
title: "Comment on Submission",
|
|
6920
6981
|
description: "Add a text comment to a submission.",
|
|
6921
6982
|
inputSchema: {
|
|
6922
|
-
course_id:
|
|
6923
|
-
assignment_id:
|
|
6924
|
-
user_id:
|
|
6983
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
6984
|
+
assignment_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas assignment ID"),
|
|
6985
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID"),
|
|
6925
6986
|
comment: _zod.z.string().describe("The comment text to add")
|
|
6926
6987
|
},
|
|
6927
6988
|
annotations: {
|
|
@@ -6952,9 +7013,9 @@ function submissionFileTools(canvas, pseudonymizer) {
|
|
|
6952
7013
|
title: "List Course Submission Files",
|
|
6953
7014
|
description: 'List every file attachment submitted by students across all assignments in a course. Returns a manifest \u2014 one entry per file \u2014 including the original filename, a file_id for re-fetching via download_file, content type, and size. Useful for bulk-archiving student work before a course expires or a Free-For-Teacher account is concluded. Outputs are bounded by max_files (default 500); when the limit is hit, truncated is true and truncation_note explains how to retrieve the rest. Download URLs are time-limited (typically 1 hour) \u2014 use the returned file_id with download_file to get a fresh URL at download time. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, user_name is a stable per-course pseudonym (e.g. "Student 1"); user_id (the raw numeric Canvas ID) is always returned and works as a stable per-student folder key.',
|
|
6954
7015
|
inputSchema: {
|
|
6955
|
-
course_id:
|
|
6956
|
-
assignment_ids: _zod.z.array(
|
|
6957
|
-
student_ids: _zod.z.array(
|
|
7016
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID."),
|
|
7017
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Restrict to these assignment IDs. Omit to scan all assignments."),
|
|
7018
|
+
student_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
6958
7019
|
"Restrict to these student user IDs. Omit to include all students. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, pass the real Canvas user_id after resolving the pseudonym via resolve_pseudonym."
|
|
6959
7020
|
),
|
|
6960
7021
|
workflow_state: _zod.z.enum(WORKFLOW_STATE).optional().describe("Only include submissions in this workflow state. Omit to include all states."),
|
|
@@ -7055,10 +7116,10 @@ function submissionsAwaitingGradingTools(canvas, pseudonymizer) {
|
|
|
7055
7116
|
title: "List Submissions Awaiting Grading",
|
|
7056
7117
|
description: "Lists all submissions in a course that still need a human grade, sorted oldest-waiting first.\n\nSurfaces two categories:\n- workflow_state=submitted: assignments submitted by students but not yet graded at all.\n- workflow_state=pending_review: Classic Quiz submissions where Canvas auto-graded the objective questions but left essays or manually-scored questions for the instructor.\n\nReturns a triage list grouped by assignment or Classic Quiz, with per-submission details: student identity, workflow state, submitted_at, and whether the submission has pending manual-grading questions.\n\nParameters:\n- course_id (required): Canvas course ID to scan.\n- assignment_ids (optional): limit the scan to specific assignment IDs.\n- include_quizzes (default true): include Classic Quiz assignments in the scan.\n- include_assignments (default true): include non-quiz assignments.\n- only_pending_review (default false): when true, return only pending_review submissions (quiz essays awaiting manual scoring), omitting regular ungraded assignments.\n\nKnown limitations:\n- New Quizzes (Quizzes.Next) may not appear with 'pending_review' workflow state here; use SpeedGrader or the New Quizzes interface for their grading queue.\n- Fill-in-the-blank answers that Canvas auto-marked are not surfaced.\n- V1 returns submission-level state only; per-question detail is not included.\n- When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, student names are replaced with pseudonyms. Use resolve_pseudonym to look up the real identity.",
|
|
7057
7118
|
inputSchema: {
|
|
7058
|
-
course_id:
|
|
7119
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe(
|
|
7059
7120
|
"Canvas course ID to scan for submissions awaiting grading."
|
|
7060
7121
|
),
|
|
7061
|
-
assignment_ids: _zod.z.array(
|
|
7122
|
+
assignment_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe(
|
|
7062
7123
|
"Limit the scan to these specific assignment IDs (numeric Canvas IDs). When omitted, all assignments in the course are scanned."
|
|
7063
7124
|
),
|
|
7064
7125
|
include_quizzes: _zod.z.boolean().default(true).describe(
|
|
@@ -7212,7 +7273,7 @@ function userTools(canvas, pseudonymizer) {
|
|
|
7212
7273
|
title: "List Students",
|
|
7213
7274
|
description: "List all students enrolled in a course.",
|
|
7214
7275
|
inputSchema: {
|
|
7215
|
-
course_id:
|
|
7276
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID")
|
|
7216
7277
|
},
|
|
7217
7278
|
annotations: {
|
|
7218
7279
|
readOnlyHint: true,
|
|
@@ -7230,7 +7291,7 @@ function userTools(canvas, pseudonymizer) {
|
|
|
7230
7291
|
title: "Get User",
|
|
7231
7292
|
description: "Get details for a single user by ID.",
|
|
7232
7293
|
inputSchema: {
|
|
7233
|
-
user_id:
|
|
7294
|
+
user_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas user ID")
|
|
7234
7295
|
},
|
|
7235
7296
|
annotations: {
|
|
7236
7297
|
readOnlyHint: true,
|
|
@@ -7261,7 +7322,7 @@ function userTools(canvas, pseudonymizer) {
|
|
|
7261
7322
|
title: "Search Users",
|
|
7262
7323
|
description: "Search for users in a Canvas account by name, login, or email. Use `include` to request email, last_login, avatar_url, time_zone, or uuid in the response.",
|
|
7263
7324
|
inputSchema: {
|
|
7264
|
-
account_id:
|
|
7325
|
+
account_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas account ID"),
|
|
7265
7326
|
search_term: _zod.z.string().describe("The search term (name, login, or email)"),
|
|
7266
7327
|
sort: _zod.z.enum(USER_SORT).optional().describe("Sort field"),
|
|
7267
7328
|
order: _zod.z.enum(["asc", "desc"]).optional().describe("Sort order"),
|
|
@@ -7288,7 +7349,7 @@ function userTools(canvas, pseudonymizer) {
|
|
|
7288
7349
|
title: "List Course Users",
|
|
7289
7350
|
description: "List users in a course with optional Canvas filters. Use `include` to request email, enrollments, avatar_url, bio, and other fields otherwise omitted from the default response. Use `enrollment_type` / `enrollment_state` to narrow by role or status, `search_term` to filter by name/login, `user_ids` to fetch a specific subset, and `sort`/`order` to control ordering.",
|
|
7290
7351
|
inputSchema: {
|
|
7291
|
-
course_id:
|
|
7352
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID"),
|
|
7292
7353
|
enrollment_type: _zod.z.array(_zod.z.enum(COURSE_USER_ENROLLMENT_TYPE)).optional().describe("Filter by one or more enrollment types"),
|
|
7293
7354
|
enrollment_state: _zod.z.array(_zod.z.enum(COURSE_USER_ENROLLMENT_STATE)).optional().describe("Filter by enrollment state (e.g. active, invited)"),
|
|
7294
7355
|
include: _zod.z.array(_zod.z.enum(COURSE_USER_INCLUDE)).optional().describe("Extra fields to include on each user (Canvas include[] param)"),
|
|
@@ -7297,7 +7358,7 @@ function userTools(canvas, pseudonymizer) {
|
|
|
7297
7358
|
// forbids an ID field that accepts arbitrary strings, so this narrows to the
|
|
7298
7359
|
// canonical ID forms plus the one SIS prefix the rest of this repo documents
|
|
7299
7360
|
// (`sis_user_id:`, as in outcomes.ts). Called out in the PR as a narrowing.
|
|
7300
|
-
user_ids:
|
|
7361
|
+
user_ids: _chunkV25MGZFNcjs.canvasIdList.call(void 0, { prefixes: ["sis_user_id"] }).optional().describe(
|
|
7301
7362
|
'Restrict the result to the given user IDs (pass large IDs as strings). SIS user IDs may be given as "sis_user_id:<sis id>".'
|
|
7302
7363
|
),
|
|
7303
7364
|
search_term: _zod.z.string().optional().describe("Partial name or full login/SIS ID to filter users by"),
|
|
@@ -7429,7 +7490,7 @@ async function scanQuizzes(canvas, courseId, warnings) {
|
|
|
7429
7490
|
canvas.assignments.list(courseId)
|
|
7430
7491
|
]);
|
|
7431
7492
|
const classicQuizzes = quizzes.filter((quiz) => CLASSIC_QUIZ_TYPES3.has(quiz.quiz_type));
|
|
7432
|
-
const classicFindings = await
|
|
7493
|
+
const classicFindings = await _chunkV25MGZFNcjs.mapWithConcurrency.call(void 0,
|
|
7433
7494
|
classicQuizzes,
|
|
7434
7495
|
QUIZ_SCAN_CONCURRENCY_LIMIT,
|
|
7435
7496
|
async (quiz) => {
|
|
@@ -7455,7 +7516,7 @@ async function scanQuizzes(canvas, courseId, warnings) {
|
|
|
7455
7516
|
}
|
|
7456
7517
|
);
|
|
7457
7518
|
const newQuizAssignments = assignments.filter((a) => a.is_quiz_lti_assignment === true);
|
|
7458
|
-
const newQuizFindings = await
|
|
7519
|
+
const newQuizFindings = await _chunkV25MGZFNcjs.mapWithConcurrency.call(void 0,
|
|
7459
7520
|
newQuizAssignments,
|
|
7460
7521
|
QUIZ_SCAN_CONCURRENCY_LIMIT,
|
|
7461
7522
|
async (assignment) => {
|
|
@@ -7480,7 +7541,7 @@ function linkAuditTools(canvas) {
|
|
|
7480
7541
|
title: "Audit Course Links",
|
|
7481
7542
|
description: 'Scan a course\'s content (pages, assignments, syllabus, announcements, and optionally quizzes) for broken or outdated links and images. Returns structured findings: cross-course references (links that still point at a previous copy of the course \u2014 the canonical stale-copy failure after a course import) and empty/malformed URLs. Pass "quizzes" in `include` to also scan Classic quiz descriptions/questions and New Quiz item stems \u2014 these break silently for students while still rendering in the instructor\u2019s own preview. `quizzes` is opt-in (off by default). Structural checks only \u2014 no outbound HTTP requests. Requires instructor permissions in the course.',
|
|
7482
7543
|
inputSchema: {
|
|
7483
|
-
course_id:
|
|
7544
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
7484
7545
|
include: _zod.z.array(_zod.z.enum(["pages", "assignments", "syllabus", "announcements", "quizzes"])).optional().describe(
|
|
7485
7546
|
"Content sources to scan. Omit to scan the default four: pages, assignments, syllabus, announcements. `quizzes` is opt-in \u2014 pass it explicitly to also scan Classic quiz descriptions/questions and New Quiz item stems; it issues one extra Canvas API call per quiz/New Quiz in the course."
|
|
7486
7547
|
)
|
|
@@ -7805,7 +7866,7 @@ async function scanQuizzesAccessibility(canvas, courseId, warnings) {
|
|
|
7805
7866
|
canvas.assignments.list(courseId)
|
|
7806
7867
|
]);
|
|
7807
7868
|
const classicQuizzes = quizzes.filter((quiz) => CLASSIC_QUIZ_TYPES4.has(quiz.quiz_type));
|
|
7808
|
-
const classicFindings = await
|
|
7869
|
+
const classicFindings = await _chunkV25MGZFNcjs.mapWithConcurrency.call(void 0,
|
|
7809
7870
|
classicQuizzes,
|
|
7810
7871
|
QUIZ_SCAN_CONCURRENCY_LIMIT2,
|
|
7811
7872
|
async (quiz) => {
|
|
@@ -7830,7 +7891,7 @@ async function scanQuizzesAccessibility(canvas, courseId, warnings) {
|
|
|
7830
7891
|
}
|
|
7831
7892
|
);
|
|
7832
7893
|
const newQuizAssignments = assignments.filter((a) => a.is_quiz_lti_assignment === true);
|
|
7833
|
-
const newQuizFindings = await
|
|
7894
|
+
const newQuizFindings = await _chunkV25MGZFNcjs.mapWithConcurrency.call(void 0,
|
|
7834
7895
|
newQuizAssignments,
|
|
7835
7896
|
QUIZ_SCAN_CONCURRENCY_LIMIT2,
|
|
7836
7897
|
async (assignment) => {
|
|
@@ -7859,7 +7920,7 @@ function accessibilityAuditTools(canvas) {
|
|
|
7859
7920
|
title: "Audit Course Accessibility",
|
|
7860
7921
|
description: 'Scan a course\'s content (pages, assignments, syllabus, announcements, and optionally quizzes) for structurally-detectable WCAG 2.1 accessibility problems: images missing alt text or with low-quality (filename/generic) alt text, non-descriptive link text ("click here"), adjacent duplicate links, skipped/empty/overlong headings, and tables missing headers, header scope, or captions. Each finding carries a WCAG success criterion and a severity (error = unambiguous failure, advisory = needs human review). Structural checks only \u2014 no color-contrast checking (requires rendered theme CSS this tool cannot see) and no list-misuse detection in this version. Pass "quizzes" in `include` to also scan Classic quiz descriptions/questions and New Quiz item stems (opt-in, off by default). Complements \u2014 does not replace \u2014 Canvas\'s own in-app Accessibility Checker (course navigation \u2192 Accessibility \u2192 Scan Course), which covers the same WCAG areas plus rendered color contrast and offers in-UI remediation. Requires instructor permissions in the course.',
|
|
7861
7922
|
inputSchema: {
|
|
7862
|
-
course_id:
|
|
7923
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("Canvas course ID"),
|
|
7863
7924
|
include: _zod.z.array(_zod.z.enum(["pages", "assignments", "syllabus", "announcements", "quizzes"])).optional().describe(
|
|
7864
7925
|
"Content sources to scan. Omit to scan the default four: pages, assignments, syllabus, announcements. `quizzes` is opt-in \u2014 pass it explicitly to also scan Classic quiz descriptions/questions and New Quiz item stems."
|
|
7865
7926
|
)
|
|
@@ -7978,7 +8039,7 @@ function appointmentGroupTools(canvas, pseudonymizer) {
|
|
|
7978
8039
|
title: "Get Appointment Group",
|
|
7979
8040
|
description: "Get a single appointment group by ID, including its time slots and participant counts.",
|
|
7980
8041
|
inputSchema: {
|
|
7981
|
-
appointment_group_id:
|
|
8042
|
+
appointment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The appointment group ID"),
|
|
7982
8043
|
include: includeSchema
|
|
7983
8044
|
},
|
|
7984
8045
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
@@ -8031,7 +8092,7 @@ function appointmentGroupTools(canvas, pseudonymizer) {
|
|
|
8031
8092
|
title: "Update Appointment Group",
|
|
8032
8093
|
description: "Update an existing appointment group. Use publish=true to make a draft group visible to participants, or add new time slots via new_appointments.",
|
|
8033
8094
|
inputSchema: {
|
|
8034
|
-
appointment_group_id:
|
|
8095
|
+
appointment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The appointment group ID"),
|
|
8035
8096
|
title: _zod.z.string().optional().describe("New title"),
|
|
8036
8097
|
description: _zod.z.string().optional().describe("New description"),
|
|
8037
8098
|
location_name: _zod.z.string().optional().describe("Location name"),
|
|
@@ -8056,7 +8117,7 @@ function appointmentGroupTools(canvas, pseudonymizer) {
|
|
|
8056
8117
|
title: "Delete Appointment Group",
|
|
8057
8118
|
description: "Delete an appointment group and cancel any existing reservations. Provide cancel_reason to notify participants.",
|
|
8058
8119
|
inputSchema: {
|
|
8059
|
-
appointment_group_id:
|
|
8120
|
+
appointment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The appointment group ID"),
|
|
8060
8121
|
cancel_reason: _zod.z.string().optional().describe("Message to include in cancellation notifications")
|
|
8061
8122
|
},
|
|
8062
8123
|
annotations: { destructiveHint: true, openWorldHint: true },
|
|
@@ -8070,7 +8131,7 @@ function appointmentGroupTools(canvas, pseudonymizer) {
|
|
|
8070
8131
|
title: "List Appointment Group Users",
|
|
8071
8132
|
description: "List participants (users) who have reserved a slot in an appointment group.",
|
|
8072
8133
|
inputSchema: {
|
|
8073
|
-
appointment_group_id:
|
|
8134
|
+
appointment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The appointment group ID")
|
|
8074
8135
|
},
|
|
8075
8136
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
8076
8137
|
handler: async (params) => {
|
|
@@ -8089,7 +8150,7 @@ function appointmentGroupTools(canvas, pseudonymizer) {
|
|
|
8089
8150
|
title: "List Appointment Group Groups",
|
|
8090
8151
|
description: "List student groups that have reserved a slot in an appointment group (when participant_type=Group).",
|
|
8091
8152
|
inputSchema: {
|
|
8092
|
-
appointment_group_id:
|
|
8153
|
+
appointment_group_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The appointment group ID")
|
|
8093
8154
|
},
|
|
8094
8155
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
8095
8156
|
handler: async (params) => canvas.appointmentGroups.listGroups(params.appointment_group_id)
|
|
@@ -8099,7 +8160,7 @@ function appointmentGroupTools(canvas, pseudonymizer) {
|
|
|
8099
8160
|
title: "Next Appointment",
|
|
8100
8161
|
description: "Get the current user's next upcoming appointment across all (or specified) appointment groups.",
|
|
8101
8162
|
inputSchema: {
|
|
8102
|
-
appointment_group_ids: _zod.z.array(
|
|
8163
|
+
appointment_group_ids: _zod.z.array(_chunkV25MGZFNcjs.canvasIdInput.call(void 0, )).optional().describe("Limit to specific appointment group IDs")
|
|
8103
8164
|
},
|
|
8104
8165
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
8105
8166
|
audience: "shared",
|
|
@@ -8336,7 +8397,7 @@ function pseudonymTools(pseudonymizer) {
|
|
|
8336
8397
|
audience: "educator",
|
|
8337
8398
|
description: 'Resolve a stable pseudonym (e.g. "Student 7") back to a Canvas user_id within a course. Use only when a teacher has explicitly asked to identify a specific student in an artifact. Every call is audit-logged.',
|
|
8338
8399
|
inputSchema: {
|
|
8339
|
-
course_id:
|
|
8400
|
+
course_id: _chunkV25MGZFNcjs.canvasIdInput.call(void 0, ).describe("The Canvas course ID the pseudonym was assigned in"),
|
|
8340
8401
|
pseudonym: _zod.z.string().describe('The pseudonym to resolve, e.g. "Student 7"')
|
|
8341
8402
|
},
|
|
8342
8403
|
annotations: {
|
|
@@ -8443,7 +8504,7 @@ function buildHandler(tool, pseudonymizer) {
|
|
|
8443
8504
|
}
|
|
8444
8505
|
return response;
|
|
8445
8506
|
} catch (error) {
|
|
8446
|
-
if (!(error instanceof
|
|
8507
|
+
if (!(error instanceof _chunkSVXYCCZ4cjs.CanvasApiError)) {
|
|
8447
8508
|
console.error(`Unexpected error in tool "${tool.name}":`, error);
|
|
8448
8509
|
}
|
|
8449
8510
|
return {
|
|
@@ -8506,8 +8567,8 @@ function registerSyllabusResource(server, canvas) {
|
|
|
8506
8567
|
const rawCourseId = String(variables.courseId);
|
|
8507
8568
|
let courseId;
|
|
8508
8569
|
try {
|
|
8509
|
-
courseId =
|
|
8510
|
-
} catch (
|
|
8570
|
+
courseId = _chunkV25MGZFNcjs.normalizeCanvasIdInput.call(void 0, rawCourseId);
|
|
8571
|
+
} catch (e7) {
|
|
8511
8572
|
return {
|
|
8512
8573
|
contents: [
|
|
8513
8574
|
{
|
|
@@ -8534,7 +8595,7 @@ function registerSyllabusResource(server, canvas) {
|
|
|
8534
8595
|
]
|
|
8535
8596
|
};
|
|
8536
8597
|
} catch (error) {
|
|
8537
|
-
if (!(error instanceof
|
|
8598
|
+
if (!(error instanceof _chunkSVXYCCZ4cjs.CanvasApiError)) {
|
|
8538
8599
|
console.error("Unexpected error in syllabus resource:", error);
|
|
8539
8600
|
}
|
|
8540
8601
|
return {
|
|
@@ -8573,9 +8634,9 @@ function registerAssignmentDescriptionResource(server, canvas) {
|
|
|
8573
8634
|
let courseId;
|
|
8574
8635
|
let assignmentId;
|
|
8575
8636
|
try {
|
|
8576
|
-
courseId =
|
|
8577
|
-
assignmentId =
|
|
8578
|
-
} catch (
|
|
8637
|
+
courseId = _chunkV25MGZFNcjs.normalizeCanvasIdInput.call(void 0, rawCourseId);
|
|
8638
|
+
assignmentId = _chunkV25MGZFNcjs.normalizeCanvasIdInput.call(void 0, rawAssignmentId);
|
|
8639
|
+
} catch (e8) {
|
|
8579
8640
|
return {
|
|
8580
8641
|
contents: [{ uri, mimeType: "text/plain", text: "Invalid course or assignment ID" }]
|
|
8581
8642
|
};
|
|
@@ -8593,7 +8654,7 @@ function registerAssignmentDescriptionResource(server, canvas) {
|
|
|
8593
8654
|
]
|
|
8594
8655
|
};
|
|
8595
8656
|
} catch (error) {
|
|
8596
|
-
if (!(error instanceof
|
|
8657
|
+
if (!(error instanceof _chunkSVXYCCZ4cjs.CanvasApiError)) {
|
|
8597
8658
|
console.error("Unexpected error in assignment-description resource:", error);
|
|
8598
8659
|
}
|
|
8599
8660
|
return {
|
|
@@ -9993,14 +10054,14 @@ function resolvePseudonymizer(config) {
|
|
|
9993
10054
|
});
|
|
9994
10055
|
}
|
|
9995
10056
|
function createCanvasMCPServer(config) {
|
|
9996
|
-
const canvas = new (0,
|
|
10057
|
+
const canvas = new (0, _chunkV25MGZFNcjs.CanvasClient)({
|
|
9997
10058
|
token: config.token,
|
|
9998
10059
|
baseUrl: config.baseUrl
|
|
9999
10060
|
});
|
|
10000
10061
|
const pseudonymizer = resolvePseudonymizer(config);
|
|
10001
10062
|
const server = new (0, _mcpjs.McpServer)({
|
|
10002
10063
|
name: "canvas-lms-mcp",
|
|
10003
|
-
version:
|
|
10064
|
+
version: _chunkSVXYCCZ4cjs.version
|
|
10004
10065
|
});
|
|
10005
10066
|
const features = {
|
|
10006
10067
|
assignmentSubmission: config.enableAssignmentSubmission,
|
|
@@ -10021,4 +10082,4 @@ function createCanvasMCPServer(config) {
|
|
|
10021
10082
|
|
|
10022
10083
|
|
|
10023
10084
|
exports.Pseudonymizer = Pseudonymizer; exports.createSharedPseudonymizer = createSharedPseudonymizer; exports.createCanvasMCPServer = createCanvasMCPServer;
|
|
10024
|
-
//# sourceMappingURL=chunk-
|
|
10085
|
+
//# sourceMappingURL=chunk-6VFRPUTQ.cjs.map
|