list_course_folders to map the folder structure, list_course_files to list files (optionally filtered to a specific folder), and download_course_file to save a file to your local machine.
list_course_folders
Lists all folders in a course. Each folder object includes its ID, full path, parent folder ID, and counts of the files and subfolders it contains. Use the folder id returned here to filter list_course_files to a specific folder.
Parameters
The Canvas course ID.
Maximum number of folders to return. Accepted range: 1–300.
Return value
The course ID as provided.
Number of folders returned.
Examples
list_course_files
Lists files in a course. Results can be narrowed by a search string and optionally sorted. Each file in the response includes a folder_id field you can use to correlate files with folders from list_course_folders.
Parameters
The Canvas course ID.
Substring filter matched against file names. Case-insensitive.
Field to sort results by. Accepted values:
name, size, created_at, updated_at, content_type, user.Sort direction. Accepted values:
asc, desc.Maximum number of files to return. Accepted range: 1–300.
Return value
The course ID as provided.
Number of files returned.
Examples
Browsing files by folder
list_course_files does not accept a folder_id parameter — it returns files across the entire course. To find files in a specific folder, first call list_course_folders to list all folders and their IDs, then cross-reference the folder_id field on each file in the list_course_files response.
download_course_file
Downloads a course file and saves it to local temp storage. Returns the local file path so the calling agent or CLI command can read or process the file. If the file was already downloaded in a previous call, the cached copy is returned immediately without re-downloading unless force_refresh is set.
Parameters
The Canvas course ID.
The Canvas file ID. Obtain this from
list_course_files.When
true, the existing cached file is deleted before downloading a fresh copy.Local temp storage
Downloaded files are written to a temp directory managed by Canvas MCP. The exact path is returned in thelocal_path field of the response. The path format follows the pattern:
force_refresh is used or the temp directory is cleared manually.
Return value
The course ID as provided.
The file ID as provided.
The display name of the downloaded file.
Absolute path to the downloaded file on the local filesystem. Use this path to open, read, or further process the file.
Size of the file on disk in bytes.
MIME type of the file.
true when the file was already cached and no network request was made. false when the file was freshly downloaded.Examples
Related tools
Course tools
Browse course metadata, syllabus, and enrollment.
Pages and modules
Navigate course pages, tabs, and module content.
