Skip to main content
Glama

canvas_get_quiz

Retrieve detailed information about a specific quiz in a Canvas course by providing the course ID and quiz ID, enabling efficient quiz management and analysis.

Instructions

Get details of a specific quiz

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course
quiz_idYesID of the quiz

Implementation Reference

  • Executes the core logic to fetch detailed information about a specific quiz from the Canvas API using the provided course ID and quiz ID.
    async getQuiz(courseId: string, quizId: number): Promise<CanvasQuiz> {
      const response = await this.client.get(`/courses/${courseId}/quizzes/${quizId}`);
      return response.data;
    }
  • src/index.ts:583-593 (registration)
    Registers the canvas_get_quiz tool in the MCP server's TOOLS array, providing its name, description, and input schema for validation.
      name: "canvas_get_quiz",
      description: "Get details of a specific quiz",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" },
          quiz_id: { type: "number", description: "ID of the quiz" }
        },
        required: ["course_id", "quiz_id"]
      }
    },
  • Defines the TypeScript interface for the CanvasQuiz object, specifying the expected output structure and types for the tool response.
    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