Skip to main content
Glama

Create New Quiz Item

create_new_quiz_item
Destructive

Add a single question to a Canvas New Quiz, supporting 8 item types. Build quizzes item by item; check existing items before retrying a failed create.

Instructions

Create one item (question) in a New Quiz (LTI). Returns the created item with its item_id, position, points_possible, and full entry body, including scoring_data. Supports 8 types: choice (one correct answer), multi-answer (select all that apply), true-false, essay, matching, numeric, rich-fill-blank (fill in the blank, with typed, dropdown, or word-bank blanks), and ordering (choices listed top-to-bottom in the correct sequence; Canvas shuffles their displayed order for the student). Each call adds another item (not idempotent), so check list_new_quiz_items before retrying a failed or uncertain create. Use update_new_quiz_item to change an existing item, delete_new_quiz_item to remove one, and create_new_quiz to make the quiz first. An item has no publish setting of its own; students see it when the quiz itself is published (update_new_quiz). assignment_id identifies the New Quiz (from list_assignments or get_assignment, filtered on is_quiz_lti_assignment), not a Classic Quiz ID. Canvas may rate-limit rapid creates, so call serially and pause between batches of about 50. Requires permission to manage quizzes in the course.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "course_id": "<course_id>",
      "assignment_id": "<assignment_id>",
      "points_possible": "<points_possible>",
      "item": "<item>"
    },
    "name": "create_new_quiz_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYes
positionNo1-based position in the quiz; appended if omitted
course_idYesThe Canvas course ID
assignment_idYesThe assignment ID of the New Quiz
points_possibleYesPoints awarded for a fully correct answer

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.18.21
    • changedInput schema / properties / item / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "choices": {
      -        "items": {
      -          "properties": {
      -            "id": {
      -              "description": "Stable choice identifier (caller-generated, e.g. \"a\")",
      -              "type": "string"
      -            },
      -            "item_body": {
      -              "description": "HTML choice text",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "item_body"
      -          ],
      -          "type": "object"
      -        },
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "correct_choice_id": {
      -        "description": "id of the correct choice",
      -        "type": "string"
      -      },
      -      "interaction_type_slug": {
      -        "const": "choice",
      -        "type": "string"
      -      },
      -      "item_body": {
      -        "description": "HTML question stem",
      -        "type": "string"
      -      },
      -      "title": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "interaction_type_slug",
      -      "item_body",
      -      "choices",
      -      "correct_choice_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "correct_answer": {
      -        "type": "boolean"
      -      },
      -      "interaction_type_slug": {
      -        "const": "true-false",
      -        "type": "string"
      -      },
      -      "item_body": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "interaction_type_slug",
      -      "item_body",
      -      "correct_answer"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "interaction_type_slug": {
      -        "const": "essay",
      -        "type": "string"
      -      },
      -      "item_body": {
      -        "type": "string"
      -      },
      -      "rich_text": {
      -        "default": true,
      -        "description": "Allow rich text editor",
      -        "type": "boolean"
      -      },
      -      "word_count_max": {
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      },
      -      "word_count_min": {
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "interaction_type_slug",
      -      "item_body"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "distractors": {
      -        "description": "Wrong-answer distractor pool",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "interaction_type_slug": {
      -        "const": "matching",
      -        "type": "string"
      -      },
      -      "item_body": {
      -        "type": "string"
      -      },
      -      "matches": {
      -        "items": {
      -          "properties": {
      -            "answer": {
      -              "type": "string"
      -            },
      -            "question": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "question",
      -            "answer"
      -          ],
      -          "type": "object"
      -        },
      -        "minItems": 2,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "interaction_type_slug",
      -      "item_body",
      -      "matches"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "answers": {
      -        "items": {
      -          "oneOf": [
      -            {
      -              "properties": {
      -                "kind": {
      -                  "const": "exact",
      -                  "type": "string"
      -                },
      -                "margin": {
      -                  "default": 0,
      -                  "type": "number"
      -                },
      -                "value": {
      -                  "type": "number"
      -                }
      -              },
      -              "required": [
      -                "kind",
      -                "value"
      -              ],
      -              "type": "object"
      -            },
      -            {
      -              "properties": {
      -                "kind": {
      -                  "const": "range",
      -                  "type": "string"
      -                },
      -                "max": {
      -                  "type": "number"
      -                },
      -                "min": {
      -                  "type": "number"
      -                }
      -              },
      -              "required": [
      -                "kind",
      -                "min",
      -                "max"
      -              ],
      -              "type": "object"
      -            },
      -            {
      -              "properties": {
      -                "kind": {
      -                  "const": "precision",
      -                  "type": "string"
      -                },
      -                "precision": {
      -                  "maximum": 9007199254740991,
      -                  "minimum": -9007199254740991,
      -                  "type": "integer"
      -                },
      -                "value": {
      -                  "type": "number"
      -                }
      -              },
      -              "required": [
      -                "kind",
      -                "value",
      -                "precision"
      -              ],
      -              "type": "object"
      -            }
      -          ]
      -        },
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "interaction_type_slug": {
      -        "const": "numeric",
      -        "type": "string"
      -      },
      -      "item_body": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "interaction_type_slug",
      -      "item_body",
      -      "answers"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "choices": {
      +        "items": {
      +          "properties": {
      +            "id": {
      +              "description": "Stable choice identifier (caller-generated, e.g. \"a\")",
      +              "type": "string"
      +            },
      +            "item_body": {
      +              "description": "HTML choice text",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "item_body"
      +          ],
      +          "type": "object"
      +        },
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "correct_choice_id": {
      +        "description": "id of the correct choice",
      +        "type": "string"
      +      },
      +      "interaction_type_slug": {
      +        "const": "choice",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "description": "HTML question stem",
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Optional item heading shown above the question stem",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "choices",
      +      "correct_choice_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "correct_answer": {
      +        "type": "boolean"
      +      },
      +      "interaction_type_slug": {
      +        "const": "true-false",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "correct_answer"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "interaction_type_slug": {
      +        "const": "essay",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "type": "string"
      +      },
      +      "rich_text": {
      +        "default": true,
      +        "description": "Allow rich text editor",
      +        "type": "boolean"
      +      },
      +      "word_count_max": {
      +        "description": "Maximum word count. Canvas enables the word limit only with both bounds set, so pass word_count_min too; omit both for no word limit",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "word_count_min": {
      +        "description": "Minimum word count. Canvas enables the word limit only with both bounds set, so pass word_count_max too; omit both for no word limit",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "distractors": {
      +        "description": "Wrong-answer distractor pool. Duplicates, and any entry equal to a correct answer, are dropped",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "interaction_type_slug": {
      +        "const": "matching",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "type": "string"
      +      },
      +      "matches": {
      +        "items": {
      +          "properties": {
      +            "answer": {
      +              "type": "string"
      +            },
      +            "question": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "question",
      +            "answer"
      +          ],
      +          "type": "object"
      +        },
      +        "minItems": 2,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "matches"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "choices": {
      +        "items": {
      +          "properties": {
      +            "id": {
      +              "description": "Stable choice identifier (caller-generated, e.g. \"a\")",
      +              "type": "string"
      +            },
      +            "item_body": {
      +              "description": "HTML choice text",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "item_body"
      +          ],
      +          "type": "object"
      +        },
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "correct_choice_ids": {
      +        "description": "ids of every correct choice (select all that apply); each must be a choice id",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "interaction_type_slug": {
      +        "const": "multi-answer",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "description": "HTML question stem",
      +        "type": "string"
      +      },
      +      "scoring": {
      +        "description": "partial (the default) gives credit per choice (Canvas PartialScore); all_or_nothing gives credit only for exactly the correct set (Canvas AllOrNothing)",
      +        "enum": [
      +          "partial",
      +          "all_or_nothing"
      +        ],
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Optional item heading shown above the question stem",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "choices",
      +      "correct_choice_ids"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "answers": {
      +        "description": "Every accepted answer; all of them are sent to Canvas",
      +        "items": {
      +          "oneOf": [
      +            {
      +              "properties": {
      +                "kind": {
      +                  "const": "exact",
      +                  "type": "string"
      +                },
      +                "margin": {
      +                  "default": 0,
      +                  "description": "Absolute tolerance around the value; 0 requires the exact value",
      +                  "type": "number"
      +                },
      +                "value": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "value"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "properties": {
      +                "kind": {
      +                  "const": "range",
      +                  "type": "string"
      +                },
      +                "max": {
      +                  "type": "number"
      +                },
      +                "min": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "min",
      +                "max"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "properties": {
      +                "kind": {
      +                  "const": "precision",
      +                  "type": "string"
      +                },
      +                "precision": {
      +                  "description": "Decimal places the answer must carry; the value is padded to this many decimals",
      +                  "maximum": 9007199254740991,
      +                  "minimum": -9007199254740991,
      +                  "type": "integer"
      +                },
      +                "value": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "value",
      +                "precision"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "interaction_type_slug": {
      +        "const": "numeric",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "answers"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "blanks": {
      +        "description": "One entry per backticked blank, in the same order they appear in item_body. The count must match",
      +        "items": {
      +          "oneOf": [
      +            {
      +              "properties": {
      +                "answer_type": {
      +                  "const": "open_entry",
      +                  "type": "string"
      +                },
      +                "answers": {
      +                  "description": "Accepted answers. Defaults to the blank's own backticked text, so a blank written as `Paris` needs nothing here. Give several only with match \"any_of\"",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "edit_distance": {
      +                  "description": "close_enough only: how many character edits away an answer may be and still count. Defaults to 1, Canvas's own documented example; pass 0 to require the exact spelling",
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "ignore_case": {
      +                  "description": "close_enough only; defaults to true (case is ignored)",
      +                  "type": "boolean"
      +                },
      +                "match": {
      +                  "description": "How the typed answer is scored: close_enough (the default for a single answer) accepts near-misses within edit_distance; contains accepts an answer containing the correct text; any_of (the default when several answers are given) accepts any one of them; regex treats the answer as a regular expression",
      +                  "enum": [
      +                    "close_enough",
      +                    "contains",
      +                    "any_of",
      +                    "regex"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "answer_type"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "properties": {
      +                "answer_type": {
      +                  "const": "dropdown",
      +                  "type": "string"
      +                },
      +                "choices": {
      +                  "description": "Options shown in the dropdown, in order. One of them must be the blank's backticked text, which is the correct option; the rest are distractors",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "minItems": 2,
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "answer_type",
      +                "choices"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "properties": {
      +                "answer_type": {
      +                  "const": "word_bank",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "answer_type"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "interaction_type_slug": {
      +        "const": "rich-fill-blank",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "description": "HTML question text with every blank written as its correct answer wrapped in backticks, e.g. \"<p>`Roses` are `red`.</p>\". The backticked text is the correct answer and what you see while authoring; a student sees a text box, a dropdown, or a word bank in its place, depending on that blank's answer_type",
      +        "type": "string"
      +      },
      +      "reuse_word_bank_choices": {
      +        "description": "Let one word bank entry answer more than one blank; defaults to false (each word is used once)",
      +        "type": "boolean"
      +      },
      +      "title": {
      +        "description": "Optional item heading shown above the question stem",
      +        "type": "string"
      +      },
      +      "word_bank_choices": {
      +        "description": "The single pool of words shown for every word_bank blank. It must contain each word_bank blank's backticked answer; any extra entries are distractors. Required if any blank is a word_bank, and rejected if none is",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "blanks"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "bottom_label": {
      +        "description": "Label shown below the list, e.g. \"oldest\"",
      +        "type": "string"
      +      },
      +      "choices": {
      +        "description": "Items to order, listed top-to-bottom in the correct sequence. Canvas shuffles their displayed order for the student; this array's order is what scoring is checked against",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "display_answers_paragraph": {
      +        "description": "true renders the choices as a paragraph instead of a list; defaults to false",
      +        "type": "boolean"
      +      },
      +      "include_labels": {
      +        "description": "Show top_label/bottom_label above and below the list; defaults to true when either is given, false otherwise",
      +        "type": "boolean"
      +      },
      +      "interaction_type_slug": {
      +        "const": "ordering",
      +        "type": "string"
      +      },
      +      "item_body": {
      +        "description": "HTML question stem",
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Optional item heading shown above the question stem",
      +        "type": "string"
      +      },
      +      "top_label": {
      +        "description": "Label shown above the list, e.g. \"youngest\"",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "interaction_type_slug",
      +      "item_body",
      +      "choices"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed4 schema fields changedv1.18.15
    • addedInput schema / properties / assignment_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / assignment_id / type
      Removed value: -"number"
    • addedInput schema / properties / course_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / course_id / type
      Removed value: -"number"
  3. Changed1 schema field changedv1.18.11
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. First observedv1.18.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint/openWorldHint annotations it discloses the non-idempotent, append-only behavior ("each call adds another item"), Canvas rate-limiting with a concrete serial/batch-of-50 workaround, the publish-independence rule (an item has no publish setting; visibility follows quiz publish state), and the required permission. These are exactly the traits an agent cannot infer from structured fields.

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

Conciseness4/5

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

Front-loaded with the operation and return shape, then constraints and sibling routing. Dense but nearly all of it earns its place; the type enumeration is long, though it pays for itself by sparing a schema read.

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

Completeness5/5

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

Covers return contents (item_id, position, points_possible, body incl. scoring_data), the create-only semantics, idempotency, rate limits, permissions, and sibling alternatives — everything needed to invoke this 5-parameter mutation correctly without an output schema.

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

Parameters4/5

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

Schema coverage is already 80%, and the description adds real value on top: assignment_id is clarified as a New Quiz identifier rather than a Classic Quiz ID, and the interaction_type_slug variants are explained semantically (e.g. ordering choices are listed in correct sequence and Canvas shuffles display, rich-fill-blank blanks written as backticked correct answers).

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

Purpose5/5

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

States a specific verb and resource ("Create one item (question) in a New Quiz (LTI)") and enumerates all eight supported item types with one-line semantics for each. An agent can distinguish this from update_new_quiz_item, delete_new_quiz_item, and create_new_quiz without opening a schema.

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

Usage Guidelines5/5

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

Explicitly routes to siblings: list_new_quiz_items before retrying an uncertain create, update_new_quiz_item for changes, delete_new_quiz_item for removal, create_new_quiz first if the quiz doesn't exist. It also gives the precondition (permission to manage quizzes) and the assignment_id provenance rule (from list_assignments/get_assignment filtered on is_quiz_lti_assignment, not a Classic Quiz ID).

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

Deploy Server

Other Tools