Skip to main content
Glama

Create Module Item

create_module_item
Destructive

Add an item to a module: Assignment, Page, Quiz, File, Discussion, ExternalUrl, ExternalTool or SubHeader. Returns the created module item, including its new Canvas ID.

Instructions

Add an item to a module: Assignment, Page, Quiz, File, Discussion, ExternalUrl, ExternalTool or SubHeader. Returns the created module item, including its new Canvas ID. Each call adds a new item — calling it twice with the same title adds two items, not one. Which identifying field to pass depends on type: page_url for Page (addressed by slug, not ID), content_id for File, Discussion, Assignment or Quiz, external_url for ExternalUrl or ExternalTool, and neither for SubHeader. Use list_module_items to see what is already in the module, and update_module_item or delete_module_item to change or remove an item afterward. Requires instructor/TA permission to manage course content.

Input Schema

NameRequiredDescriptionDefault
typeYesType of content to add
titleYesTitle of the module item
page_urlNoPage URL slug (required for Page items, which are addressed by slug, not ID)
positionNoPosition within the module
course_idYesThe Canvas course ID
module_idYesThe Canvas module ID
content_idNoCanvas ID of the content (required for File, Discussion, Assignment, Quiz)
external_urlNoURL for ExternalUrl or ExternalTool items

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.18.15
    • addedInput schema / properties / content_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / content_id / description
      Previous value: -"Canvas ID of the content (required for File, Page, Discussion, Assignment, Quiz)"New value: +"Canvas ID of the content (required for File, Discussion, Assignment, Quiz)"
    • removedInput schema / properties / content_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"
    • addedInput schema / properties / module_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / module_id / type
      Removed value: -"number"
    • addedInput schema / properties / page_url
      Added value: +{
      +  "description": "Page URL slug (required for Page items, which are addressed by slug, not ID)",
      +  "type": "string"
      +}
  2. 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"
  3. First observedv1.18.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the sparse annotations by disclosing non-idempotency ('calling it twice with the same title adds two items, not one'), the return payload ('returns the created module item, including its new Canvas ID'), and the authorization requirement. These are exactly the behavioral traits an agent needs before firing a write call.

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?

Front-loads purpose, then idempotency warning, then the type-to-field mapping, then sibling routing, then permissions — a logical order with no filler sentences.

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 an 8-parameter mutation tool with no output schema, the description covers what is created, what comes back, how to identify content per type, permission requirements, and follow-up operations. Nothing material is missing.

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 100%, so baseline is 3, but the description adds real value by mapping each `type` value to its required identifying field (`page_url`, `content_id`, `external_url`, or none for SubHeader) and notes Pages are addressed by slug rather than ID. Only `position` is left unexplained, which the schema handles.

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?

Opens with a specific verb and resource ('Add an item to a module') and enumerates the eight item types, so the agent knows exactly what it creates and what scope it covers. Clearly separable from sibling tools like create_module or create_page.

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 to `list_module_items` to inspect existing items and to `update_module_item`/`delete_module_item` for changes, which distinguishes this tool from its closest siblings. It also states the permission precondition (instructor/TA).

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