Skip to main content
Glama

Upload File

upload_file
Destructive

Upload a file to a Canvas course by providing base64-encoded content, file name, MIME type, and course ID. Specify an optional destination folder path.

Instructions

Upload a file to a course. Content must be base64-encoded. Canvas performs a multi-step upload internally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFile name including extension
contentYesBase64-encoded file content
course_idYesThe Canvas course ID
content_typeYesMIME type, e.g. "application/pdf" or "image/png"
parent_folder_pathNoDestination folder path within the course, e.g. "subfolder/nested"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.18.11
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv1.18.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations declare openWorldHint=true and destructiveHint=true, so the agent knows this is a mutating operation with potential side effects. The description adds that Canvas performs a multi-step upload internally, which is useful context beyond the annotations. However, it does not disclose what happens on failure, whether the file is overwritten, or whether parent_folder_path must pre-exist. The description does not contradict the annotations.

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?

Two sentences with no filler. The core action and encoding requirement are front-loaded, and the multi-step note is brief. It earns a 4 rather than 5 because it could have added a short note about parent_folder_path behavior without bloating the text.

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?

For a mutating upload tool with no output schema, the description is adequate but has gaps. It does not mention whether the tool returns the created file object, how to handle large files, or whether parent_folder_path is created automatically. Given the destructiveHint annotation, more cautionary context (e.g., overwrite behavior) would improve completeness.

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 description coverage is 100%, so the schema already documents all five parameters. The description adds the base64-encoding requirement, which reinforces the 'content' parameter's meaning, but does not add detail beyond the schema for other parameters. Baseline 3 is appropriate since the schema carries the heavy lifting.

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?

The description states a specific verb ('Upload'), a resource ('a file to a course'), and the key encoding requirement ('base64-encoded'). It clearly distinguishes from sibling tools like list_files, get_file, download_file, and delete_file, which are all file-related but serve different operations.

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 implies the tool is for uploading files to a course, which is clear from the verb and resource. However, it does not explicitly state when to use this tool versus alternatives like create_content_export or list_course_submission_files, nor does it mention any prerequisites (e.g., folder existence, permissions). The context is clear but exclusions are absent.

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