Read a file
get_fileRead a Canvas file by ID to get text for plain text, CSV, JSON, and HTML files, or metadata for PDFs, Word docs, slides, and images; files over 5 MB are skipped.
Instructions
Read one file from Canvas by its file ID, such as a file found with get_assignment_files or get_course_content. Plain text, CSV, JSON and HTML files come back as text. PDF, Word, slide deck and image files return the name, type and size with a note, because their text is not extracted. Files over 5 MB are not downloaded. Example: "Open Canvas file 501 and summarize it."
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | The Canvas file ID, the number in a file link such as /files/501. |