Upload File
upload_fileUpload a new file to a course's Files area from base64-encoded content, and return the created file object (id, display_name, size, content_type, download url).
Instructions
Upload a new file to a course's Files area from base64-encoded content, and return the created file object (id, display_name, size, content_type, download url). Each call performs a new upload; check list_files first if you want to avoid creating a duplicate, and use delete_file to remove a file afterward. Canvas handles the upload as a multi-step hand-off to its storage backend (S3 or local Canvas storage), transparent to the caller. parent_folder_path places the file in that folder, creating any missing folder segment along the way; see list_folders for what already exists. Requires permission to manage files 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>",
"name": "<name>",
"content": "<content>",
"content_type": "<content_type>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name including extension | |
| content | Yes | Base64-encoded file content | |
| course_id | Yes | The Canvas course ID | |
| content_type | Yes | MIME type, e.g. "application/pdf" or "image/png" | |
| parent_folder_path | No | Destination folder path within the course, e.g. "subfolder/nested" |