Skip to main content
Glama

read_file

Read-only

Retrieve text from Canvas files—PDFs, Word docs, code, or plain text—such as assignment briefs, lecture slides, and starter code; long files return in slices.

Instructions

Read a Canvas file's text (PDF, Word, code or plain text): assignment briefs, lecture slides, starter code. File ids come from get_assignment or course_materials. Long files come back in slices.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "course_id": "<course_id>",
      "file_id": "<file_id>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNo
file_idYes
course_idYes
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuine behavioral context beyond that: the return is text extraction across several document formats, and "Long files come back in slices" warns the agent that results are truncated/paginated. It stops short of describing slice size limits or failure modes for unsupported files.

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 short sentences, front-loaded with the core action and formats, then the id-source guidance, then the slicing caveat. No filler or redundant restatement of the tool name.

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

Completeness3/5

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

There is no output schema, so the description should clarify what comes back and how slicing interacts with offset/max_chars, which it only hints at. For a four-parameter, zero-coverage schema, the definition is workable but leaves an agent guessing about pagination mechanics and the role of course_id.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, so the description carries the full burden. It only clarifies file_id's provenance and vaguely gestures at slicing; offset, max_chars (with its default of 6000), and course_id are never explained in meaning or effect.

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

Purpose4/5

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

The description gives a specific verb and resource ("Read a Canvas file's text") and enumerates the supported formats (PDF, Word, code, plain text) plus example artifacts (assignment briefs, lecture slides, starter code). It never explicitly contrasts itself with download_file, which is the closest sibling, so an agent must infer that distinction.

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

Usage Guidelines3/5

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

It usefully tells the agent where file ids originate ("File ids come from get_assignment or course_materials"), which is real workflow guidance. However, there is no statement of when to prefer this over download_file or read_page, and no exclusions or prerequisites are given.

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