Skip to main content
Glama

canvas_download_file

Destructive

Downloads a Canvas course file from a valid Canvas file URL, saving it to the local download directory or returning a signed download link on hosted servers.

Instructions

Download a Canvas file. url is the absolute URL from canvas_list_course_files (only file URLs on the configured Canvas host are accepted). On a local install the file is written to disk inside the download directory (CANVAS_OUTPUT_DIR, default ~/Downloads) — at destinationPath if given, else under its own name. On a hosted server it comes back as a signed, expiring download link (an image small enough is shown inline); give the link to the user.

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": {
      "url": "<url>"
    },
    "name": "canvas_download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe url field returned by canvas_list_course_files (an https /files/ URL on the configured Canvas host; anything else is refused).
overwriteNo
destinationPathNoLocal installs: where to write the file. Must be inside the download directory (CANVAS_OUTPUT_DIR, default ~/Downloads); a relative path is resolved against it. Omit it to save under the file's own name there. Ignored on a hosted server, which returns a download link instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.3
    • changedInput schema / properties / destinationPath / description
      Previous value: -"Where to write the file. Must be inside the download directory (CANVAS_OUTPUT_DIR, default ~/Downloads); a relative path is resolved against it."New value: +"Local installs: where to write the file. Must be inside the download directory (CANVAS_OUTPUT_DIR, default ~/Downloads); a relative path is resolved against it. Omit it to save under the file's own name there. Ignored on a hosted server, which returns a download link instead."
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "destinationPath"
      -]New value: +[
      +  "url"
      +]
  2. Changed2 schema fields changedv2.1.3
    • changedInput schema / properties / destinationPath / description
      Previous value: -"Absolute path where the file should be written."New value: +"Where to write the file. Must be inside the download directory (CANVAS_OUTPUT_DIR, default ~/Downloads); a relative path is resolved against it."
    • changedInput schema / properties / url / description
      Previous value: -"The url field returned by canvas_list_course_files (absolute https URL)."New value: +"The url field returned by canvas_list_course_files (an https /files/ URL on the configured Canvas host; anything else is refused)."
  3. Changed1 schema field changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. Addedv1.2.5

TDQS

A4.3/5.0
Behavior4/5

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

Annotations (readOnly=false, destructive=true, openWorld=true) already signal a filesystem-writing, externally-reaching operation; the description adds the real behavioral detail the agent needs — files are written on local installs under CANVAS_OUTPUT_DIR or returned as a signed expiring link on hosted servers, with small images inlined. It does not explain what `overwrite` does when a file already exists at the target path, which is the main remaining behavioral gap.

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?

One dense but front-loaded paragraph: purpose, input provenance, then local vs hosted outcomes in order. Every sentence carries information, though the em-dash-heavy phrasing compresses several distinct facts into one long run-on.

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 rightly explains both possible return shapes (a written file path vs. a signed link) and the inline-image case. Combined with the path constraint and URL validation, an agent has enough to call this correctly, modulo the unexplained `overwrite` flag.

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 67%, and the description compensates by explaining that `destinationPath` is a local-install-only path that must resolve inside the download directory and is ignored on hosted servers — meaning beyond the schema's own wording. The `overwrite` parameter is undocumented in both schema and description, leaving one of three parameters semantically empty.

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 ('Download a Canvas file') and immediately ties the `url` input to its origin in the sibling tool canvas_list_course_files, so the agent knows both what it does and where its input comes from.

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?

Clearly scopes usage: url must be a file URL on the configured Canvas host, other URLs are refused, and on hosted servers the result should be handed to the user rather than treated as a local file. It lacks an explicit 'use X instead' routing statement, but the entry conditions are clear.

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