Skip to main content
Glama

canvas_create_quiz

Create and manage quizzes in Canvas courses by specifying course ID, title, type, time limit, and due date. Publish quizzes directly with a description for structured assessments.

Instructions

Create a new quiz in a course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course
descriptionNoDescription of the quiz
due_atNoDue date (ISO format)
publishedNoIs the quiz published
quiz_typeNoType of the quiz (e.g., graded)
time_limitNoTime limit in minutes
titleYesTitle of the quiz

Implementation Reference

  • src/index.ts:570-623 (registration)
    Registration of canvas quiz tools including canvas_create_quiz with input schema
    // Quizzes
    {
      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"]
      }
    },
    {
      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"]
      }
    },
    {
      name: "canvas_create_quiz",
      description: "Create a new quiz in a course",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" },
          title: { type: "string", description: "Title of the quiz" },
          quiz_type: { type: "string", description: "Type of the quiz (e.g., graded)" },
          time_limit: { type: "number", description: "Time limit in minutes" },
          published: { type: "boolean", description: "Is the quiz published" },
          description: { type: "string", description: "Description of the quiz" },
          due_at: { type: "string", description: "Due date (ISO format)" }
        },
        required: ["course_id", "title"]
      }
    },
    {
      name: "canvas_start_quiz_attempt",
      description: "Start a new quiz attempt",
      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"]
      }
    },
  • Handler logic for creating a quiz using Canvas API POST request
    async createQuiz(courseId: number, quizData: Partial<CanvasQuiz>): Promise<CanvasQuiz> {
      const response = await this.client.post(`/courses/${courseId}/quizzes`, {
        quiz: quizData
      });
      return response.data;
    }
  • Type definition for CanvasQuiz used in createQuiz
    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;
    }
  • Input schema definition for the canvas_create_quiz tool
      name: "canvas_create_quiz",
      description: "Create a new quiz in a course",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" },
          title: { type: "string", description: "Title of the quiz" },
          quiz_type: { type: "string", description: "Type of the quiz (e.g., graded)" },
          time_limit: { type: "number", description: "Time limit in minutes" },
          published: { type: "boolean", description: "Is the quiz published" },
          description: { type: "string", description: "Description of the quiz" },
          due_at: { type: "string", description: "Due date (ISO format)" }
        },
        required: ["course_id", "title"]
      }
    },
  • src/index.ts:1071-1075 (registration)
    Registration of all tools list handler which includes canvas_create_quiz
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS
    }));
    
    // Handle tool calls with comprehensive error handling
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, it doesn't mention permission requirements, whether the quiz is immediately available to students, what happens on failure, or any rate limits. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that states the core purpose without unnecessary words. It's appropriately sized for a straightforward creation tool and front-loads the essential information.

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?

For a creation tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after creation, what values are returned, or provide any context about the quiz lifecycle. The agent must rely entirely on the schema for operational details.

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?

The description mentions no parameters at all, but the input schema has 100% description coverage, providing clear documentation for all 7 parameters. This meets the baseline of 3 where the schema does the heavy lifting, though the description adds no additional semantic context about parameter relationships or usage patterns.

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 clearly states the action ('Create') and resource ('new quiz in a course'), making the purpose immediately understandable. However, it doesn't differentiate this from other creation tools like canvas_create_assignment or canvas_create_course, which would require mentioning specific quiz characteristics to earn a perfect score.

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 like canvas_create_assignment or canvas_update_assignment. It doesn't mention prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the tool name alone.

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