Skip to main content
Glama

get_course_content

Retrieve the complete course syllabus including modules, topics, lectures, assignments, and learning materials to understand course structure and available content.

Instructions

Get the complete course syllabus/structure including all modules, topics, lectures, and learning materials. Returns module titles, descriptions, topic names with URLs, and linked assignments. Use to answer: "What's in this course?", "Show me the syllabus", "What topics are covered?", "What lectures are available?", "What reading materials do I have?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgUnitIdNoThe course ID. Optional if D2L_COURSE_ID env var is set.

Implementation Reference

  • The async handler function that implements the core logic of the get_course_content tool. It retrieves the course table of contents (TOC) using the client and marshals it into a formatted JSON string.
    handler: async ({ orgUnitId }: { orgUnitId?: number }) => { const toc = await client.getContentToc(getOrgUnitId(orgUnitId)) as { Modules: RawTocModule[] }; return JSON.stringify(marshalToc(toc), null, 2); },
  • Zod input schema defining the optional orgUnitId parameter for the get_course_content tool.
    schema: { orgUnitId: z.number().optional().describe('The course ID. Optional if D2L_COURSE_ID env var is set.'), },
  • src/index.ts:56-64 (registration)
    MCP server registration of the get_course_content tool, which wraps the handler and formats the response as MCP content.
    server.tool( 'get_course_content', contentTools.get_course_content.description, { orgUnitId: contentTools.get_course_content.schema.orgUnitId }, async (args) => { const result = await contentTools.get_course_content.handler(args as { orgUnitId?: number }); return { content: [{ type: 'text', text: result }] }; } );
  • Helper utility function used by the handler to resolve the course orgUnitId from parameter or environment variable.
    function getOrgUnitId(orgUnitId?: number): number { const id = orgUnitId ?? DEFAULT_COURSE_ID; if (!id) { throw new Error('No course ID provided and D2L_COURSE_ID environment variable not set'); } return id; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bencered/d2l-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server