canvas_list_module_items
Retrieve all items in a specific Canvas LMS module by providing the course and module IDs, enabling efficient management and organization of educational content.
Instructions
List all items in a module
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | ID of the course | |
| module_id | Yes | ID of the module |
Input Schema (JSON Schema)
{
"properties": {
"course_id": {
"description": "ID of the course",
"type": "number"
},
"module_id": {
"description": "ID of the module",
"type": "number"
}
},
"required": [
"course_id",
"module_id"
],
"type": "object"
}
Implementation Reference
- src/client.ts:631-638 (handler)Core handler function implementing the Canvas API call to list module items for a given course and module, including content_details.async listModuleItems(courseId: number, moduleId: number): Promise<CanvasModuleItem[]> { const response = await this.client.get(`/courses/${courseId}/modules/${moduleId}/items`, { params: { include: ['content_details'] } }); return response.data; }
- src/index.ts:481-490 (registration)Registration of the canvas_list_module_items tool in the TOOLS array, including name, description, and input schema.name: "canvas_list_module_items", description: "List all items in a module", inputSchema: { type: "object", properties: { course_id: { type: "number", description: "ID of the course" }, module_id: { type: "number", description: "ID of the module" } }, required: ["course_id", "module_id"] }
- src/types.ts:252-267 (schema)TypeScript interface defining the structure of CanvasModuleItem objects returned by the tool.export interface CanvasModuleItem { id: number; title: string; type: CanvasModuleItemType; module_id: number; position: number; indent: number; html_url: string; url?: string; page_url?: string; external_url?: string; content_id?: number; content_details?: CanvasModuleItemContentDetails; completion_requirement?: CanvasModuleItemCompletionRequirement; published: boolean; }