Skip to main content
Glama

Download File

download_file
Idempotent

Save a Canvas file to the allowed local download folder and return its path and size; provide a file_id from list_course_files, list_my_files, or list_group_files.

Instructions

Download one Canvas file and save it to local disk. Returns the saved path and size. Get file_id from list_course_files or list_my_files.

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": {
      "file_id": "<file_id>"
    },
    "name": "download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesFile ID (numeric string). Get it from list_course_files, list_my_files or list_group_files.
dest_dirNoFolder to save into: the server's download folder (CANVAS_DOWNLOAD_DIR) or a folder inside it, such as "week1". Anywhere else is refused. Leave it out to use the download folder itself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.0
    • changedInput schema / properties / dest_dir / description
      Previous value: -"Local folder to save into. Defaults to the server's download folder (CANVAS_DOWNLOAD_DIR)."New value: +"Folder to save into: the server's download folder (CANVAS_DOWNLOAD_DIR) or a folder inside it, such as \"week1\". Anywhere else is refused. Leave it out to use the download folder itself."
  2. Changed2 schema fields changedv1.0.2
    • addedInput schema / properties / dest_dir / description
      Added value: +"Local folder to save into. Defaults to the server's download folder (CANVAS_DOWNLOAD_DIR)."
    • changedInput schema / properties / file_id / description
      Previous value: -"Canvas ID (numeric string)"New value: +"File ID (numeric string). Get it from list_course_files, list_my_files or list_group_files."
  3. First observedv1.0.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations mark this as non-read-only yet non-destructive; the description clarifies why by stating it saves to local disk, so an agent won't mistake readOnlyHint=false for a Canvas mutation. It also discloses the return payload (saved path and size), which no output schema provides. It does not say what happens if the destination file already exists, despite idempotentHint=true.

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: what it does, what it returns, and where to get the ID. The side effect and return value are front-loaded, and nothing is wasted.

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?

For a two-parameter download tool with full schema coverage and annotations, this is nearly complete: effect, destination constraint and return shape are all covered. The remaining gap is overwrite/collision behavior for an operation flagged idempotent.

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?

Schema coverage is 100%, so both parameters are already documented, including the dest_dir containment rule. The description only adds the file_id sourcing hint and omits list_group_files, which the schema does mention, so it adds little beyond the schema.

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?

"Download one Canvas file and save it to local disk" gives a specific verb, resource and side effect, and "one" implicitly separates it from download_all_course_files. It stops short of naming which sibling to use for bulk downloads or submission attachments, so the distinction is implied rather than stated.

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?

The description tells the agent where to obtain the required file_id (list_course_files, list_my_files), which is real usage guidance, but offers no when-not conditions or explicit routing to siblings such as download_all_course_files or download_submission_attachment.

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

Deploy Server

Other Tools