add_module_item
Add a File, Page, Discussion, Assignment, Quiz, SubHeader, ExternalUrl, or ExternalTool item to a Canvas module using the course code and module ID, with support for completion requirements and positioning.
Instructions
Add an item to a module.
IMPORTANT: content_id required for File, Discussion, Assignment, Quiz, ExternalTool. page_url required for Page. title required for SubHeader, ExternalUrl.
Args:
course_identifier: Course code or Canvas ID
module_id: Target module ID
item_type: One of: File, Page, Discussion, Assignment, Quiz, SubHeader, ExternalUrl, ExternalTool
content_id: Canvas ID of the content (required for File, Discussion, Assignment, Quiz, ExternalTool)
title: Item title (required for SubHeader, ExternalUrl; optional for others)
position: Position within module (1-indexed)
indent: Indentation level (0-4)
page_url: URL slug of the page (required for Page type)
external_url: URL for ExternalUrl items
new_tab: Open external links in new tab (default: False)
completion_requirement_type: One of: must_view, must_submit, must_contribute, min_score, must_mark_done
completion_requirement_min_score: Minimum score (only for min_score type)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_identifier | Yes | ||
| module_id | Yes | ||
| item_type | Yes | ||
| content_id | No | ||
| title | No | ||
| position | No | ||
| indent | No | ||
| page_url | No | ||
| external_url | No | ||
| new_tab | No | ||
| completion_requirement_type | No | ||
| completion_requirement_min_score | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |