Skip to main content
Glama

Read a file

get_file
Read-only

Read 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

NameRequiredDescriptionDefault
file_idYesThe Canvas file ID, the number in a file link such as /files/501.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.10

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing the actual behavior per file type: text-based formats return content, while PDF, Word, slide deck and image files return only name, type and size because text is not extracted. It also states the 5 MB download ceiling, which prevents failed calls an agent could not otherwise predict.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then type-handling, then limits, then an example — every sentence carries operational information. The trailing example sentence is the only mildly expendable element and it reinforces the ID syntax rather than repeating it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the burden of explaining returns and does so for both the success case (text) and the unsupported-type case (metadata plus note). Size limits and ID provenance are both covered, leaving no significant gap for a single-parameter read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning by giving the concrete form of the identifier ('/files/501') and naming the sibling tools that produce such IDs. This reduces the risk of passing a course ID or name instead of a file ID.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read one file from Canvas by its file ID') and immediately scopes it to a single file, which distinguishes it from the listing tools in the sibling set. An agent knows exactly what it gets back without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly points to get_assignment_files and get_course_content as the way to discover a file_id, which is the main prerequisite for calling this tool. It gives clear context for use but stops short of stating when not to use it (e.g., preferring a listing tool when the target file is unknown).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.