Skip to main content
Glama

Read file contents

canvas_read_file
Read-only

Download and extract readable text from Canvas course files (PDF, PPTX, DOCX, text, ZIP listings) server-side, returning page, slide, or section ranges so you can read course content directly.

Instructions

Download a course file server-side and return its text: PDF (per page), PPTX (per slide, with speaker notes), DOCX (per section), plain text/code, ZIP (listing). Give file_id, or url = any Canvas file link (e.g. https://canvas.school.edu/courses/1/files/2?verifier=…&wrap=1). Long documents: use pages (e.g. "1-5", "3,8-10") — the output says when it was truncated and which range to request next.

Input Schema

NameRequiredDescriptionDefault
urlNoCanvas file URL or (file:<id>) reference, instead of file_id
pagesNoPage/slide/section range, e.g. "1-5". Default: all
file_idNo
course_idYes
max_charsNoDefault 40000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/non-destructive, so the bar is lower, yet the description still adds real behavioral context: the download happens server-side, output is rendered as text per format, and truncation is self-reported with a suggested next range. It does not mention permission requirements or failure modes for unsupported binaries, keeping it at 4.

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?

Three sentences, zero filler: capability and return formats first, input alternatives second, paging/truncation contract last. The parenthetical concrete examples (URL, "3,8-10") are load-bearing rather than decorative.

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?

With no output schema, the description correctly takes on the return-value burden by describing per-format text extraction and truncation signaling. It is nearly complete for a read tool; only unsupported-file behavior and any size/permission constraints are unstated.

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?

At 60% schema coverage the description compensates well: it defines the file_id-vs-url alternative, shows a literal URL shape with verifier/wrap query params that the schema does not, and illustrates the `pages` range syntax beyond the schema's "1-5" example. `max_chars` and `course_id` are left to the schema, and `file_id` carries no description in either place.

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?

Specific verb ('Download ... server-side and return its text') plus resource (course file), with the output shape broken down per format (PDF per page, PPTX per slide with speaker notes, DOCX per section, plain text, ZIP listing). This clearly separates it from canvas_list_files, which only enumerates files.

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?

Gives concrete selection guidance between the two identifying inputs ('Give file_id, or url = any Canvas file link') and tells the agent to use `pages` for long documents. It stops short of naming when to prefer a sibling (e.g., canvas_get_page for wiki pages) or when this tool is not applicable, so it is clear context without explicit exclusions.

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