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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Get details' which implies a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'details' include (e.g., format, depth). For a tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—'Get details of a specific quiz' is front-loaded and appropriately sized for its purpose. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't explain what 'details' are returned, potential errors, or behavioral aspects, leaving gaps for an AI agent to invoke the tool correctly in complex scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for 'course_id' and 'quiz_id'. The description adds no meaning beyond the schema, as it doesn't explain parameter relationships or usage context. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate or enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get details of a specific quiz' clearly states the verb ('Get') and resource ('quiz'), making the purpose evident. However, it doesn't differentiate from sibling tools like 'canvas_get_assignment' or 'canvas_get_course', which follow a similar pattern, so it lacks explicit sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as 'canvas_list_quizzes' for listing quizzes or other 'canvas_get_*' tools for different resources. There's no mention of prerequisites, context, or exclusions, leaving usage unclear beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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