brightspace-mcp-server 5.1.36 → 5.1.38

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.
@@ -6,7 +6,7 @@
6
6
  import { DEFAULT_CACHE_TTLS } from "../api/index.js";
7
7
  import { fetchAllObjects } from "../api/paginate.js";
8
8
  import { GetClasslistEmailsSchema } from "./schemas.js";
9
- import { toolResponse, sanitizeError } from "./tool-helpers.js";
9
+ import { toolResponse, toolResponseWithNotice, sanitizeError } from "./tool-helpers.js";
10
10
  import { log } from "../utils/logger.js";
11
11
  /**
12
12
  * Register get_classlist_emails tool
@@ -37,6 +37,16 @@ export function registerGetClasslistEmails(server, apiClient) {
37
37
  role: user.ClasslistRoleDisplayName,
38
38
  }));
39
39
  log("INFO", `get_classlist_emails: ${emails.length} emails from ${users.length} users in course ${courseId}`);
40
+ // People whose email Brightspace hides are left out of the list. Say
41
+ // so, or a partial list reads as the whole class and an all-hidden
42
+ // course reads as an empty one.
43
+ const hidden = users.length - emails.length;
44
+ if (hidden > 0) {
45
+ const who = hidden === 1 ? "person" : "people";
46
+ const has = hidden === 1 ? "has" : "have";
47
+ return toolResponseWithNotice(emails, `${hidden} of ${users.length} ${who} in this course ${has} no email visible to you ` +
48
+ `(Brightspace hides it), so they are not listed.`);
49
+ }
40
50
  return toolResponse(emails);
41
51
  }
42
52
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brightspace-mcp-server",
3
- "version": "5.1.36",
3
+ "version": "5.1.38",
4
4
  "mcpName": "io.github.RohanMuppa/brightspace",
5
5
  "description": "MCP server for Brightspace (D2L). Check grades, due dates, assignments, announcements, syllabus, rosters and more via Claude, ChatGPT, Cursor, Windsurf, or any MCP client.",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "file-type": "^22.1.1",
36
36
  "playwright": "^1.58.2",
37
37
  "sanitize-filename": "^1.6.3",
38
- "trash": "^9.0.0",
38
+ "trash": "^10.1.1",
39
39
  "turndown": "^7.2.2",
40
40
  "unpdf": "^1.4.0",
41
41
  "zod": "^4.0.0"