canvas-lms-mcp 1.13.0 → 1.14.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.
@@ -4,12 +4,12 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkHWTFTJQKcjs = require('../chunk-HWTFTJQK.cjs');
7
+ var _chunkL2SG4A6Vcjs = require('../chunk-L2SG4A6V.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
12
 
13
13
 
14
- exports.CanvasApiError = _chunkHWTFTJQKcjs.CanvasApiError; exports.CanvasClient = _chunkHWTFTJQKcjs.CanvasClient; exports.CanvasHttpClient = _chunkHWTFTJQKcjs.CanvasHttpClient; exports.appendCanvasQuery = _chunkHWTFTJQKcjs.appendCanvasQuery; exports.toCanvasQuery = _chunkHWTFTJQKcjs.toCanvasQuery;
14
+ exports.CanvasApiError = _chunkL2SG4A6Vcjs.CanvasApiError; exports.CanvasClient = _chunkL2SG4A6Vcjs.CanvasClient; exports.CanvasHttpClient = _chunkL2SG4A6Vcjs.CanvasHttpClient; exports.appendCanvasQuery = _chunkL2SG4A6Vcjs.appendCanvasQuery; exports.toCanvasQuery = _chunkL2SG4A6Vcjs.toCanvasQuery;
15
15
  //# sourceMappingURL=index.cjs.map
@@ -4,7 +4,7 @@ import {
4
4
  CanvasHttpClient,
5
5
  appendCanvasQuery,
6
6
  toCanvasQuery
7
- } from "../chunk-RSXSIOKB.js";
7
+ } from "../chunk-QQ2HT5HK.js";
8
8
  export {
9
9
  CanvasApiError,
10
10
  CanvasClient,
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkHWTFTJQKcjs = require('./chunk-HWTFTJQK.cjs');
12
+ var _chunkL2SG4A6Vcjs = require('./chunk-L2SG4A6V.cjs');
13
13
 
14
14
  // src/server.ts
15
15
  var _mcpjs = require('@modelcontextprotocol/sdk/server/mcp.js');
@@ -114,7 +114,7 @@ function accountTools(canvas) {
114
114
 
115
115
  // src/tools/errors.ts
116
116
  function formatError(error) {
117
- if (error instanceof _chunkHWTFTJQKcjs.CanvasApiError) {
117
+ if (error instanceof _chunkL2SG4A6Vcjs.CanvasApiError) {
118
118
  const status = error.status;
119
119
  const message = error.message;
120
120
  switch (status) {
@@ -158,7 +158,7 @@ function analyticsTools(canvas) {
158
158
  inputSchema: {
159
159
  course_id: _zod.z.number().describe("The Canvas course ID"),
160
160
  search_term: _zod.z.string().describe("The keyword or phrase to search for"),
161
- content_types: _zod.z.array(_zod.z.enum(_chunkHWTFTJQKcjs.SEARCH_CONTENT_TYPES)).optional().describe(
161
+ content_types: _zod.z.array(_zod.z.enum(_chunkL2SG4A6Vcjs.SEARCH_CONTENT_TYPES)).optional().describe(
162
162
  "Content types to search. Defaults to all types: pages, discussions, assignments, announcements."
163
163
  )
164
164
  },
@@ -170,7 +170,7 @@ function analyticsTools(canvas) {
170
170
  const courseId = params.course_id;
171
171
  const searchTerm = params.search_term;
172
172
  const types = _nullishCoalesce(params.content_types, () => ( [
173
- ..._chunkHWTFTJQKcjs.SEARCH_CONTENT_TYPES
173
+ ..._chunkL2SG4A6Vcjs.SEARCH_CONTENT_TYPES
174
174
  ]));
175
175
  if (types.length === 0) return { results: [] };
176
176
  const settled = await Promise.allSettled(
@@ -1477,7 +1477,7 @@ function outcomeTools(canvas) {
1477
1477
  name: "get_root_outcome_group",
1478
1478
  description: "Get the root outcome group for an account or course context.",
1479
1479
  inputSchema: {
1480
- context_type: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcomes from an account or course context."),
1480
+ context_type: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcomes from an account or course context."),
1481
1481
  context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context.")
1482
1482
  },
1483
1483
  annotations: { readOnlyHint: true, openWorldHint: true },
@@ -1490,7 +1490,7 @@ function outcomeTools(canvas) {
1490
1490
  name: "list_outcome_groups",
1491
1491
  description: "List all outcome groups for an account or course context.",
1492
1492
  inputSchema: {
1493
- context_type: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome groups from an account or course context."),
1493
+ context_type: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome groups from an account or course context."),
1494
1494
  context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context.")
1495
1495
  },
1496
1496
  annotations: { readOnlyHint: true, openWorldHint: true },
@@ -1503,10 +1503,10 @@ function outcomeTools(canvas) {
1503
1503
  name: "list_outcome_group_links",
1504
1504
  description: "List all outcome links in an account or course context.",
1505
1505
  inputSchema: {
1506
- context_type: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome links from an account or course context."),
1506
+ context_type: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_CONTEXT_TYPES).describe("Whether to read outcome links from an account or course context."),
1507
1507
  context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
1508
- outcome_style: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.'),
1509
- outcome_group_style: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_DETAIL_LEVELS).optional().describe(
1508
+ outcome_style: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.'),
1509
+ outcome_group_style: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_DETAIL_LEVELS).optional().describe(
1510
1510
  'Outcome group detail level. Use "full" to include expanded outcome group fields.'
1511
1511
  )
1512
1512
  },
@@ -1524,7 +1524,7 @@ function outcomeTools(canvas) {
1524
1524
  name: "get_outcome_group",
1525
1525
  description: "Get details for a specific outcome group in an account or course context.",
1526
1526
  inputSchema: {
1527
- context_type: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
1527
+ context_type: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
1528
1528
  context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
1529
1529
  outcome_group_id: _zod.z.number().describe("The Canvas outcome group ID.")
1530
1530
  },
@@ -1539,10 +1539,10 @@ function outcomeTools(canvas) {
1539
1539
  name: "list_outcome_group_outcomes",
1540
1540
  description: "List the linked outcomes directly under a specific outcome group.",
1541
1541
  inputSchema: {
1542
- context_type: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
1542
+ context_type: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
1543
1543
  context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
1544
1544
  outcome_group_id: _zod.z.number().describe("The Canvas outcome group ID."),
1545
- outcome_style: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.')
1545
+ outcome_style: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_DETAIL_LEVELS).optional().describe('Outcome detail level. Use "full" to include expanded outcome fields.')
1546
1546
  },
1547
1547
  annotations: { readOnlyHint: true, openWorldHint: true },
1548
1548
  handler: async (params) => canvas.outcomes.listGroupOutcomes(
@@ -1558,7 +1558,7 @@ function outcomeTools(canvas) {
1558
1558
  name: "list_outcome_group_subgroups",
1559
1559
  description: "List the immediate child outcome groups under a specific outcome group.",
1560
1560
  inputSchema: {
1561
- context_type: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
1561
+ context_type: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_CONTEXT_TYPES).describe("The outcome group context type."),
1562
1562
  context_id: _zod.z.number().describe("The Canvas account ID or course ID for the context."),
1563
1563
  outcome_group_id: _zod.z.number().describe("The Canvas outcome group ID.")
1564
1564
  },
@@ -1619,14 +1619,14 @@ function outcomeTools(canvas) {
1619
1619
  inputSchema: {
1620
1620
  course_id: _zod.z.number().describe("The Canvas course ID."),
1621
1621
  aggregate: _zod.z.enum(["course"]).optional().describe("Aggregate all student rollups into a single course-level rollup."),
1622
- aggregate_stat: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_ROLLUP_AGGREGATE_STATS).optional().describe('Statistic to use when aggregate="course".'),
1622
+ aggregate_stat: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_ROLLUP_AGGREGATE_STATS).optional().describe('Statistic to use when aggregate="course".'),
1623
1623
  user_ids: _zod.z.array(_zod.z.union([_zod.z.number(), _zod.z.string()])).optional().describe('Optional Canvas user IDs or SIS user IDs prefixed with "sis_user_id:".'),
1624
1624
  outcome_ids: _zod.z.array(_zod.z.number()).optional().describe("Optional outcome IDs to restrict the rollups."),
1625
1625
  include_courses: _zod.z.boolean().optional().describe("Include linked course details in the response payload."),
1626
- exclude: _zod.z.array(_zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional rollup exclusions for missing users or missing outcome results."),
1627
- sort_by: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_ROLLUP_SORT_BY).optional().describe("Sort rollups by student name or by a specific outcome score."),
1626
+ exclude: _zod.z.array(_zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional rollup exclusions for missing users or missing outcome results."),
1627
+ sort_by: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_ROLLUP_SORT_BY).optional().describe("Sort rollups by student name or by a specific outcome score."),
1628
1628
  sort_outcome_id: _zod.z.number().optional().describe('Outcome ID to sort by when sort_by="outcome".'),
1629
- sort_order: _zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_SORT_ORDER).optional().describe("Sort order to apply when sorting rollups."),
1629
+ sort_order: _zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_SORT_ORDER).optional().describe("Sort order to apply when sorting rollups."),
1630
1630
  add_defaults: _zod.z.boolean().optional().describe("Include default mastery colors and levels when Canvas supports it.")
1631
1631
  },
1632
1632
  annotations: { readOnlyHint: true, openWorldHint: true },
@@ -1669,7 +1669,7 @@ function outcomeTools(canvas) {
1669
1669
  description: "Get mastery distribution analytics for outcomes in a course, optionally filtered by students or outcomes.",
1670
1670
  inputSchema: {
1671
1671
  course_id: _zod.z.number().describe("The Canvas course ID."),
1672
- exclude: _zod.z.array(_zod.z.enum(_chunkHWTFTJQKcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional exclusions for missing users or missing outcome results."),
1672
+ exclude: _zod.z.array(_zod.z.enum(_chunkL2SG4A6Vcjs.OUTCOME_EXCLUDE_OPTIONS)).optional().describe("Optional exclusions for missing users or missing outcome results."),
1673
1673
  outcome_ids: _zod.z.array(_zod.z.number()).optional().describe("Optional outcome IDs to restrict the distribution results."),
1674
1674
  student_ids: _zod.z.array(_zod.z.union([_zod.z.number(), _zod.z.string()])).optional().describe('Optional Canvas student IDs or SIS user IDs prefixed with "sis_user_id:".'),
1675
1675
  include_alignment_distributions: _zod.z.boolean().optional().describe("Include contributing score distributions for alignments."),
@@ -2593,7 +2593,7 @@ function registerAllTools(server, canvas) {
2593
2593
  content: [{ type: "text", text }]
2594
2594
  };
2595
2595
  } catch (error) {
2596
- if (error instanceof _chunkHWTFTJQKcjs.CanvasApiError) {
2596
+ if (error instanceof _chunkL2SG4A6Vcjs.CanvasApiError) {
2597
2597
  } else {
2598
2598
  console.error(`Unexpected error in tool "${tool.name}":`, error);
2599
2599
  }
@@ -2641,7 +2641,7 @@ function registerSyllabusResource(server, canvas) {
2641
2641
  ]
2642
2642
  };
2643
2643
  } catch (error) {
2644
- if (!(error instanceof _chunkHWTFTJQKcjs.CanvasApiError)) {
2644
+ if (!(error instanceof _chunkL2SG4A6Vcjs.CanvasApiError)) {
2645
2645
  console.error("Unexpected error in syllabus resource:", error);
2646
2646
  }
2647
2647
  return {
@@ -2690,7 +2690,7 @@ function registerAssignmentDescriptionResource(server, canvas) {
2690
2690
  ]
2691
2691
  };
2692
2692
  } catch (error) {
2693
- if (!(error instanceof _chunkHWTFTJQKcjs.CanvasApiError)) {
2693
+ if (!(error instanceof _chunkL2SG4A6Vcjs.CanvasApiError)) {
2694
2694
  console.error("Unexpected error in assignment-description resource:", error);
2695
2695
  }
2696
2696
  return {
@@ -2709,13 +2709,13 @@ function registerAllResources(server, canvas) {
2709
2709
 
2710
2710
  // src/server.ts
2711
2711
  function createCanvasMCPServer(config) {
2712
- const canvas = new (0, _chunkHWTFTJQKcjs.CanvasClient)({
2712
+ const canvas = new (0, _chunkL2SG4A6Vcjs.CanvasClient)({
2713
2713
  token: config.token,
2714
2714
  baseUrl: config.baseUrl
2715
2715
  });
2716
2716
  const server = new (0, _mcpjs.McpServer)({
2717
2717
  name: "canvas-lms-mcp",
2718
- version: _chunkHWTFTJQKcjs.version
2718
+ version: _chunkL2SG4A6Vcjs.version
2719
2719
  });
2720
2720
  registerAllTools(server, canvas);
2721
2721
  registerAllResources(server, canvas);
@@ -2725,4 +2725,4 @@ function createCanvasMCPServer(config) {
2725
2725
 
2726
2726
 
2727
2727
  exports.createCanvasMCPServer = createCanvasMCPServer;
2728
- //# sourceMappingURL=chunk-LFTLZFDC.cjs.map
2728
+ //# sourceMappingURL=chunk-2HVJF2NH.cjs.map