Skip to main content
Glama

read_course_file

Read-only

Retrieve a Canvas course file as base64 content in the API response, avoiding local file saves. Useful when the client and server are on different machines.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesCanvas file ID
max_size_mbNoMaximum 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_identifierYesCourse code or Canvas ID
Behavior4/5

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

The description transparently states that content is returned as base64 and explains the rationale for using this over downloading to the server. However, it does not mention potential limitations like file size errors or missing files, though the readOnlyHint annotation covers the read-only nature. The absence of explicit error handling or edge cases makes it slightly less transparent, but still adequate.

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?

The description is concise, consisting of three clear sentences. It avoids unnecessary fluff and effectively communicates the core functionality, usage context, and how to locate file IDs. The structure is logical and easy to follow.

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?

The description provides complete context for a read operation: what it does, when to use it, how to find required inputs, and how it differs from the alternative. Given the simplicity of the tool and the absence of an output schema, this is sufficient and does not leave critical gaps.

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

Parameters3/5

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

The description does not add extra meaning to the parameters beyond what is already provided in the input schema. Since schema coverage is 100% (all parameters have descriptive comments), the baseline score of 3 applies. The description's mention of file IDs indirectly references parameters but adds no new semantic detail.

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?

The description clearly states the tool reads a file from a Canvas course and returns its content as base64. It explicitly distinguishes itself from download_course_file, making its purpose unambiguous.

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

Usage Guidelines5/5

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

The description explains when to use this tool (when direct content is needed, especially across different machines) and when to avoid the alternative (download_course_file). It also provides guidance on how to find file IDs via list_course_files or list_module_items, giving clear usage directions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vishalsachdev/canvas-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server