canvas_list_quizzes
Retrieve a detailed list of quizzes within a specific course using the Canvas LMS API, enabling efficient management and review of course assessments.
Instructions
List all quizzes in a course
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/index.ts:572-581 (registration)Registration of the 'canvas_list_quizzes' tool in the TOOLS array, including name, description, and input schema requiring a course_id.name: "canvas_list_quizzes", description: "List all quizzes in a course", inputSchema: { type: "object", properties: { course_id: { type: "number", description: "ID of the course" } }, required: ["course_id"] } },
- src/client.ts:697-700 (handler)Core handler function in CanvasClient that executes the tool logic by fetching quizzes from the Canvas API endpoint `/courses/{course_id}/quizzes`.async listQuizzes(courseId: string): Promise<CanvasQuiz[]> { const response = await this.client.get(`/courses/${courseId}/quizzes`); return response.data; }
- src/index.ts:574-579 (schema)Input schema for the tool, defining the required course_id parameter of type number.inputSchema: { type: "object", properties: { course_id: { type: "number", description: "ID of the course" } }, required: ["course_id"]
- src/types.ts:292-316 (schema)Type definition for CanvasQuiz, used for output validation and typing of the quizzes returned by the tool.export interface CanvasQuiz { id: number; title: string; html_url: string; quiz_type: CanvasQuizType; assignment_id?: number; time_limit: number | null; published: boolean; description: string | null; due_at: string | null; lock_at: string | null; unlock_at: string | null; points_possible: number; question_count: number; allowed_attempts: number; scoring_policy: 'keep_highest' | 'keep_latest'; show_correct_answers: boolean; show_correct_answers_at: string | null; hide_correct_answers_at: string | null; shuffle_answers: boolean; has_access_code: boolean; ip_filter?: string; locked_for_user: boolean; lock_explanation?: string; }