Skip to main content
Glama

read_course_file

Read-only

Retrieve a file's content as base64 from a Canvas course, using file IDs from list_course_files or list_module_items. Specify course identifier and optional max size (default 25 MB) to control memory usage.

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.

    Args:
        course_identifier: Course code or Canvas ID
        file_id: Canvas file ID
        max_size_mb: 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.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_identifierYes
file_idYes
max_size_mbNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Adds behavioral details beyond annotations: returns base64 content, clamps max_size_mb server-side, rejects files larger than effective limit to avoid memory issues. No contradiction with readOnlyHint annotation.

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

Conciseness4/5

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

Well-structured: starts with purpose, contrasts with sibling, provides lookup hints, then details parameters. Efficient despite being somewhat lengthy; no unnecessary sentences.

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

Completeness4/5

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

Covers usage context, alternative, behavioral constraints, and parameter details. Output schema exists so return value details are not needed. Minor gap: no mention of error cases, but acceptable for a 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?

Input schema has 0% description coverage, but description explains each parameter (course_identifier, file_id, max_size_mb) with default and clamping behavior, adding value over the schema's titles.

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?

Description clearly states it reads a file and returns base64 content, and distinguishes itself from sibling download_course_file by noting it returns content directly rather than saving to filesystem.

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 guides to use list_course_files or list_module_items to find file IDs, and explains when this tool is preferable (when MCP server runs on different machine). Does not explicitly state when not to use, but provides clear alternative.

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