Skip to main content
Glama

Update New Quiz Item

update_new_quiz_item
DestructiveIdempotent

Modify a question in a New Quiz by item ID. Send only position, points, or a complete item body to rebuild; use it to fix wording, answers, or scoring without recreating the quiz.

Instructions

Update one existing item (question) in a New Quiz (LTI) by its item_id. Returns the updated item. Only the parts you pass are sent (position, points_possible, or item). When item is given, the whole item body (type, stem, choices, and answer) is rebuilt from it and sent, so pass the complete item, not only the changed field. It takes the same 8 types as create_new_quiz_item. Find item_id with list_new_quiz_items or get_new_quiz_item. Use create_new_quiz_item to add an item, delete_new_quiz_item to remove one, and update_new_quiz for quiz-level fields. 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 updates, so call serially. 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>",
      "item_id": "<item_id>"
    },
    "name": "update_new_quiz_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemNo
item_idYesThe New Quiz item ID (string, not numeric)
positionNoUpdated 1-based position
course_idYesThe Canvas course ID
assignment_idYesThe assignment ID of the New Quiz
points_possibleNoUpdated point value

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?

Goes well beyond the annotations (openWorldHint/idempotentHint/destructiveHint) by explaining the partial-update contract: only passed fields are sent, but if item is given the entire item body is rebuilt and sent, so the complete item must be supplied. It also discloses rate-limit risk ('call serially') and the required permission, which are operational facts an agent must know to succeed.

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-loads the core action and the return value in the first two sentences, then layers constraints. Every sentence is substantive, though the block is dense at nine sentences and could be split into a short 'what/when' paragraph plus a 'gotchas' paragraph for faster scanning.

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?

For a 6-param mutation tool with a deeply nested 8-variant oneOf item schema and no output schema, the description covers everything an agent needs: entry point for the ID, partial-vs-full replacement contract, sibling routing, ID-type trap, rate limits, and permission requirements. The type-specific payload detail is correctly left to the 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 83%, so the baseline is 3, and the description adds real meaning: it groups the three updatable fields (position, points_possible, item), explains the rebuild semantics of item, and clarifies item_id is a string ID sourced from the list/get tools. It adds clarity beyond the schema but stops short of explaining position/points_possible interaction with quiz scoring.

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 - update one existing item (question) in a New Quiz (LTI) by item_id - and immediately distinguishes it from create_new_quiz_item, delete_new_quiz_item, and update_new_quiz. An agent can pick this tool over its siblings without opening any 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 the agent: create_new_quiz_item to add, delete_new_quiz_item to remove, update_new_quiz for quiz-level fields, and list_new_quiz_items/get_new_quiz_item to find the item_id. It also pre-empts a likely mistake by stating assignment_id is the New Quiz 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