canvas_get_syllabus
Retrieve course syllabus from Canvas LMS by inputting the course ID, enabling efficient access to course details and materials.
Instructions
Get course syllabus
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | ID of the course |
Input Schema (JSON Schema)
{
"properties": {
"course_id": {
"description": "ID of the course",
"type": "number"
}
},
"required": [
"course_id"
],
"type": "object"
}
Implementation Reference
- src/client.ts:490-500 (handler)Core handler function in CanvasClient that fetches the course syllabus from Canvas API by requesting the course with syllabus_body include parameter and extracting the syllabus content.async getSyllabus(courseId: number): Promise<CanvasSyllabus> { const response = await this.client.get(`/courses/${courseId}`, { params: { include: ['syllabus_body'] } }); return { course_id: courseId, syllabus_body: response.data.syllabus_body }; }
- src/index.ts:700-710 (registration)MCP tool registration in the TOOLS array, defining the tool name, description, and input schema.{ name: "canvas_get_syllabus", description: "Get course syllabus", inputSchema: { type: "object", properties: { course_id: { type: "number", description: "ID of the course" } }, required: ["course_id"] } },
- src/types.ts:501-504 (schema)TypeScript interface defining the structure of the syllabus response (course_id and syllabus_body).export interface CanvasSyllabus { course_id: number; syllabus_body: string; }
- src/index.ts:703-709 (schema)Input schema validation for the tool, requiring a numeric course_id.inputSchema: { type: "object", properties: { course_id: { type: "number", description: "ID of the course" } }, required: ["course_id"] }
- src/client.ts:32-32 (helper)Import of CanvasSyllabus type used in the getSyllabus method.CanvasSyllabus,