get_my_courses
Retrieve your enrolled courses from Brightspace LMS to view course details, codes, IDs, and enrollment status for academic management.
Instructions
List all courses you're enrolled in. Returns: course name, course code, org unit ID (needed for other tools), access status, start/end dates. Use to answer: "What courses am I in?", "Show my classes", "What's the course ID for X?", "List my enrollments"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/enrollments.ts:8-11 (handler)The handler function that implements the core logic of the 'get_my_courses' tool. It retrieves the user's enrollments via the client, marshals the data, and returns formatted JSON.handler: async (): Promise<string> => { const enrollments = await client.getMyEnrollments() as { Items: RawEnrollment[] }; return JSON.stringify(marshalEnrollments(enrollments), null, 2); },
- src/index.ts:140-148 (registration)Registers the 'get_my_courses' tool with the MCP server, providing its description, empty schema, and a wrapper around the handler that formats the response for MCP.server.tool( 'get_my_courses', enrollmentTools.get_my_courses.description, {}, async () => { const result = await enrollmentTools.get_my_courses.handler(); return { content: [{ type: 'text', text: result }] }; } );
- src/tools/enrollments.ts:7-7 (schema)The schema definition for the 'get_my_courses' tool, which takes no input parameters.schema: {},