brightspace-mcp-server 5.1.6 → 5.1.7
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.
|
@@ -23,7 +23,8 @@ function tooLargeResponse(bytes) {
|
|
|
23
23
|
export function registerDownloadDropboxSubmissionFile(server, apiClient) {
|
|
24
24
|
server.registerTool("download_dropbox_submission_file", {
|
|
25
25
|
title: "Download Dropbox Submission File",
|
|
26
|
-
description: "Download a specific file from a student's (or group's) dropbox submission to
|
|
26
|
+
description: "Download a specific file from a student's (or group's) dropbox submission to an existing local directory " +
|
|
27
|
+
"(it is not created for you), " +
|
|
27
28
|
"for an instructor or TA. Use get_dropbox_submissions or get_dropbox_user_submissions first to " +
|
|
28
29
|
"find submissionId and fileId. Requires instructor or TA access to the course. " +
|
|
29
30
|
"IMPORTANT: Ask the user where they want to save the file before calling this tool. " +
|
|
@@ -48,7 +49,7 @@ export function registerDownloadDropboxSubmissionFile(server, apiClient) {
|
|
|
48
49
|
}
|
|
49
50
|
catch (error) {
|
|
50
51
|
if (error?.code === "ENOENT") {
|
|
51
|
-
return errorResponse(`Download directory does not exist: ${downloadPath}
|
|
52
|
+
return errorResponse(`Download directory does not exist: ${downloadPath}. Create it, then retry, or choose an existing directory.`, "destination");
|
|
52
53
|
}
|
|
53
54
|
throw error;
|
|
54
55
|
}
|
|
@@ -267,7 +267,7 @@ function extensionNote(requestedFilename, saved) {
|
|
|
267
267
|
export function registerDownloadFile(server, apiClient) {
|
|
268
268
|
server.registerTool("download_file", {
|
|
269
269
|
title: "Download File",
|
|
270
|
-
description: "Download a file from course content, files linked by path inside a module description (coursePath, from get_course_content's quickLink URLs with type=coursefile), instructor assignment attachments (source: assignmentAttachment with folderId + fileId), assignment submissions, or an announcement's attachments. Use this when the user wants a file from Brightspace course content, dropbox submissions, or an announcement (newsId + fileId, from get_announcements). Two response modes: (1) INLINE (default — omit downloadPath): the file comes back directly in the tool response — extracted text for PDFs and Office documents, an image block for jpeg/png/gif/webp, or a short description for anything else — so it can be read immediately without touching any filesystem. This is the right choice in clients like Claude Desktop, whose analysis/sandbox tools cannot see a file the MCP server writes to its own host filesystem. (2) DISK (set downloadPath to an absolute path on the HOST filesystem the MCP server runs on): the file is saved there. Ask the user where to save it before using disk mode — never guess a directory. After identifying the file, suggest a clean readable filename (e.g., 'Lecture 7 - Memory Management.pdf' instead of 'L07_CS251_2026SP_v2.pdf') and pass it as customFilename, or omit it to keep the original. If a content-topic download fails because the file isn't released yet, the response explains why when Brightspace's module/topic metadata supports it (not yet open, ended, locked, or hidden).",
|
|
270
|
+
description: "Download a file from course content, files linked by path inside a module description (coursePath, from get_course_content's quickLink URLs with type=coursefile), instructor assignment attachments (source: assignmentAttachment with folderId + fileId), assignment submissions, or an announcement's attachments. Use this when the user wants a file from Brightspace course content, dropbox submissions, or an announcement (newsId + fileId, from get_announcements). Two response modes: (1) INLINE (default — omit downloadPath): the file comes back directly in the tool response — extracted text for PDFs and Office documents, an image block for jpeg/png/gif/webp, or a short description for anything else — so it can be read immediately without touching any filesystem. This is the right choice in clients like Claude Desktop, whose analysis/sandbox tools cannot see a file the MCP server writes to its own host filesystem. (2) DISK (set downloadPath to an absolute path on the HOST filesystem the MCP server runs on): the file is saved there. The directory must already exist; it is not created for you. Ask the user where to save it before using disk mode — never guess a directory. After identifying the file, suggest a clean readable filename (e.g., 'Lecture 7 - Memory Management.pdf' instead of 'L07_CS251_2026SP_v2.pdf') and pass it as customFilename, or omit it to keep the original. If a content-topic download fails because the file isn't released yet, the response explains why when Brightspace's module/topic metadata supports it (not yet open, ended, locked, or hidden).",
|
|
271
271
|
inputSchema: DownloadFileSchema,
|
|
272
272
|
}, async (args) => {
|
|
273
273
|
try {
|
|
@@ -299,7 +299,7 @@ export function registerDownloadFile(server, apiClient) {
|
|
|
299
299
|
}
|
|
300
300
|
catch (error) {
|
|
301
301
|
if (error?.code === "ENOENT") {
|
|
302
|
-
return errorResponse(`Download directory does not exist: ${downloadPath}
|
|
302
|
+
return errorResponse(`Download directory does not exist: ${downloadPath}. Create it, then retry, or choose an existing directory.`, "destination");
|
|
303
303
|
}
|
|
304
304
|
throw error;
|
|
305
305
|
}
|
|
@@ -110,7 +110,7 @@ async function discoverExternalSyllabusSources(apiClient, courseId) {
|
|
|
110
110
|
export function registerGetSyllabus(server, apiClient) {
|
|
111
111
|
server.registerTool("get_syllabus", {
|
|
112
112
|
title: "Get Course Syllabus",
|
|
113
|
-
description: "Fetch the syllabus/overview text and optional attachment for a course. Returns the course overview description as markdown. When the syllabus lives in an external LTI tool (e.g. Simple Syllabus), lists those sources in externalSyllabusSources; their contents cannot be read. If some of those lookups could not be completed (e.g. permission denied), externalSyllabusDiscovery says which, and an empty result is then not proof the course has no syllabus. If downloadPath is provided, also downloads the syllabus attachment (e.g. PDF). IMPORTANT: You MUST ask the user where they want to save the file before calling this tool with a downloadPath.",
|
|
113
|
+
description: "Fetch the syllabus/overview text and optional attachment for a course. Returns the course overview description as markdown. When the syllabus lives in an external LTI tool (e.g. Simple Syllabus), lists those sources in externalSyllabusSources; their contents cannot be read. If some of those lookups could not be completed (e.g. permission denied), externalSyllabusDiscovery says which, and an empty result is then not proof the course has no syllabus. If downloadPath is provided, also downloads the syllabus attachment (e.g. PDF); the directory must already exist, since it is not created for you. IMPORTANT: You MUST ask the user where they want to save the file before calling this tool with a downloadPath.",
|
|
114
114
|
inputSchema: GetSyllabusSchema,
|
|
115
115
|
}, async (args) => {
|
|
116
116
|
try {
|
|
@@ -129,7 +129,7 @@ export function registerGetSyllabus(server, apiClient) {
|
|
|
129
129
|
}
|
|
130
130
|
catch (error) {
|
|
131
131
|
if (error?.code === "ENOENT") {
|
|
132
|
-
return errorResponse(`Download directory does not exist: ${downloadPath}
|
|
132
|
+
return errorResponse(`Download directory does not exist: ${downloadPath}. Create it, then retry, or choose an existing directory.`, "destination");
|
|
133
133
|
}
|
|
134
134
|
throw error;
|
|
135
135
|
}
|
package/build/tools/schemas.js
CHANGED
|
@@ -78,7 +78,7 @@ export const DownloadFileSchema = z.object({
|
|
|
78
78
|
newsId: z.coerce.number().int().positive().optional()
|
|
79
79
|
.describe("Announcement (news item) ID whose attachment to download. Requires fileId."),
|
|
80
80
|
downloadPath: z.string().min(1).optional()
|
|
81
|
-
.describe("Absolute path to
|
|
81
|
+
.describe("Absolute path to an existing directory where the file should be saved on disk. The directory must already exist; it is not created for you, so create it first if needed. Omit this to receive the file inline in the tool response instead — the right choice in clients like Claude Desktop, whose analysis/sandbox tools cannot see files an MCP server writes to its own host filesystem. Inline mode returns extracted text for PDFs and Office documents, an image block for jpeg/png/gif/webp, and a short description (pointing back to disk mode) for anything else, capped at 10MB and 400,000 characters of extracted text."),
|
|
82
82
|
customFilename: z.string().max(255).optional()
|
|
83
83
|
.describe("Custom filename for the downloaded file (include extension). If not provided, uses the original filename from Brightspace."),
|
|
84
84
|
});
|
|
@@ -86,7 +86,7 @@ export const GetSyllabusSchema = z.object({
|
|
|
86
86
|
courseId: z.coerce.number().int().positive()
|
|
87
87
|
.describe("Course ID to get syllabus for."),
|
|
88
88
|
downloadPath: z.string().min(1).optional()
|
|
89
|
-
.describe("Absolute path to
|
|
89
|
+
.describe("Absolute path to an existing directory where the attachment should be saved. The directory must already exist; it is not created for you, so create it first if needed."),
|
|
90
90
|
});
|
|
91
91
|
export const GetDiscussionsSchema = z.object({
|
|
92
92
|
courseId: z.coerce.number().int().positive()
|
|
@@ -219,7 +219,7 @@ export const DownloadDropboxSubmissionFileSchema = z.object({
|
|
|
219
219
|
fileId: z.coerce.number().int().positive()
|
|
220
220
|
.describe("File ID within that submission."),
|
|
221
221
|
downloadPath: z.string().min(1)
|
|
222
|
-
.describe("Absolute path to
|
|
222
|
+
.describe("Absolute path to an existing local directory where the file should be saved. The directory must already exist; it is not created for you, so create it first if needed."),
|
|
223
223
|
customFilename: z.string().max(255).optional()
|
|
224
224
|
.describe("Custom filename for the downloaded file (include extension). If omitted, uses the original submission filename."),
|
|
225
225
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brightspace-mcp-server",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
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",
|