Skip to main content
Glama

create_quiz_item

Create a question for a Canvas New Quiz, supporting 13 question types such as multiple choice, true/false, and essay.

Instructions

Create a question (item) in a New Quiz. This is the primary tool for adding questions.

INTERACTION TYPES AND THEIR DATA FORMATS:

  1. "choice" (Multiple Choice) - Single correct answer from choices interaction_data: { "choices": [ { "item_body": "Answer A", "position": 1 }, { "item_body": "Answer B", "position": 2 }, { "item_body": "Answer C", "position": 3 } ] } scoring_data: { "value": "" } NOTE: Create with placeholder scoring_data first. The API returns choices with generated IDs. Then use update_quiz_item to set the correct answer ID. Alternatively, scoring_data can reference by position index.

  2. "true-false" (True/False) interaction_data: { "choices": [ { "item_body": "True", "position": 1 }, { "item_body": "False", "position": 2 } ] } scoring_data: { "value": "" } Same approach as "choice" - create first, then update with correct choice ID.

  3. "multi-answer" (Multiple Answer / Select All That Apply) interaction_data: { "choices": [ { "item_body": "Option A", "position": 1 }, { "item_body": "Option B", "position": 2 }, { "item_body": "Option C", "position": 3 } ] } scoring_data: { "value": ["", ""] }

  4. "essay" (Essay / Free Response) interaction_data: {} scoring_data: { "value": "" }

  5. "file-upload" (File Upload) interaction_data: {} scoring_data: { "value": "" }

  6. "matching" (Matching) interaction_data: { "choices": [ { "item_body": "Term 1", "position": 1, "match_id": "m1" }, { "item_body": "Term 2", "position": 2, "match_id": "m2" } ], "matches": [ { "item_body": "Definition 1", "id": "m1", "position": 1 }, { "item_body": "Definition 2", "id": "m2", "position": 2 } ] } scoring_data: { "value": [{ "id": "", "match_id": "m1" }] }

  7. "ordering" (Ordering) interaction_data: { "choices": [ { "item_body": "First item", "position": 1 }, { "item_body": "Second item", "position": 2 } ] } scoring_data: { "value": ["", ""] }

  8. "categorization" (Categorization) interaction_data: { "categories": [ { "item_body": "Category A", "id": "cat1" }, { "item_body": "Category B", "id": "cat2" } ], "choices": [ { "item_body": "Item 1", "position": 1 }, { "item_body": "Item 2", "position": 2 } ] } scoring_data: { "value": [{ "id": "", "category_id": "cat1" }] }

  9. "numeric" (Numeric Answer) interaction_data: {} scoring_data: { "value": "42" } or { "value": { "exact": 42, "margin": 0.1 } }

  10. "fill-blank" (Fill in the Blank) interaction_data: {} scoring_data: { "value": ["acceptable answer 1", "acceptable answer 2"] }

  11. "rich-fill-blank" (Fill in Multiple Blanks) interaction_data: { "blanks": [{ "id": "b1", "item_body": "blank1" }] } scoring_data: { "value": { "b1": ["answer1", "answer2"] } }

  12. "formula" (Formula / Calculated) interaction_data: { "formula": "x + y", "variables": [{ "name": "x", "min": 1, "max": 10 }] } scoring_data: { "value": { "formula": "x + y", "margin": 0.01 } }

  13. "hot-spot" (Hot Spot / Image Click) interaction_data: { "image_url": "...", "regions": [...] } scoring_data: { "value": "" }

TIP: For choice-based questions, it is often easiest to create the item first with an empty or placeholder scoring_data, then GET the item to see the generated choice IDs, and finally UPDATE the item with the correct scoring_data referencing those IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesShort title for the question
positionNoPosition/order of this question in the quiz (1-based)
course_idYesCanvas course ID
item_bodyYesThe question text/prompt (HTML supported, e.g. '<p>What is 2+2?</p>')
scoring_dataYesCorrect answer data. See tool description for format per type.
assignment_idYesThe assignment ID of the New Quiz
points_possibleYesPoint value for this question
feedback_neutralNoFeedback shown to all students after answering (HTML supported)
interaction_dataYesQuestion-type-specific data (choices, matches, etc). See tool description for format per type.
interaction_typeYesThe question type (see tool description for formats)
Behavior5/5

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

No annotations exist, so the description carries full burden. It discloses critical behavioral details beyond the schema: the two-step creation process for choice-based questions ('Create with placeholder scoring_data first... Then use update_quiz_item to set the correct answer ID'), the fact that the API generates choice IDs on creation, and the option to reference by position. This is exactly the kind of non-obvious behavior an agent needs.

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?

Despite its length, every sentence earns its place. The description is front-loaded with the purpose and then organized by interaction type in a numbered, scannable format. The TIP at the end consolidates key workflow guidance without redundancy. Appropriate size given the tool's inherent complexity (13 interaction types).

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?

The tool has 10 parameters, nested objects, and 13 distinct interaction modes. The description comprehensively covers all modes, gives data formats, and explains the return behavior (API returns generated choice IDs). It also includes a workflow tip for handling the most complex case. No output schema exists, but the description adequately conveys the essential return information needed to proceed.

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

Parameters5/5

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

While schema coverage is 100%, the description goes far beyond the schema's terse property descriptions. It provides per-interaction-type structures for both interaction_data and scoring_data, with concrete JSON examples, naming fields like 'item_body', 'position', 'match_id', and 'category_id'. This dramatically enriches parameter understanding and reduces ambiguity for constructing valid inputs.

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?

The description opens with 'Create a question (item) in a New Quiz. This is the primary tool for adding questions.' This is a specific verb ('Create') + resource ('question/item in a New Quiz') and clearly distinguishes the tool from siblings like get_quiz_item, update_quiz_item, and delete_quiz_item.

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

Usage Guidelines4/5

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

It explicitly labels itself as the 'primary tool for adding questions' and includes a detailed TIP that directs users to create first, then use update_quiz_item for scoring_data corrections. This provides clear workflow context. However, it doesn't explicitly list situations where another tool should be used instead, though the context strongly implies it.

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

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/hughsibbele/Canvas-Agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server