Read Course File
read_course_fileReads a Canvas course file and returns its content as base64 directly in the response, so clients on different machines can access files without server filesystem downloads.
Instructions
Read a file from a Canvas course and return its content as base64.
Unlike download_course_file which saves to the server's local filesystem, this tool returns the file content directly in the response. This is useful when the MCP server runs on a different machine than the client.
Use list_course_files or list_module_items to find file IDs.
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_identifier": "<course_identifier>",
"file_id": "<file_id>"
},
"name": "read_course_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | Canvas file ID | |
| max_size_mb | No | Maximum file size in MB to read (default: 25). Clamped server-side to READ_FILE_MAX_SIZE_MB (default 100). Files larger than the effective limit are rejected to avoid excessive memory usage. | |
| course_identifier | Yes | Course code or Canvas ID |