Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course

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"]
      }
    },
  • 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;
    }
  • 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"]
  • 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;
    }
Install Server

Other Tools

Related Tools

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/DMontgomery40/mcp-canvas-lms'

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