Skip to main content
Glama

Upload File

upload_file
Destructive

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

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. Changed2 schema fields changedv1.18.15
    • addedInput schema / properties / course_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / course_id / type
      Removed value: -"number"
  2. 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"
  3. First observedv1.18.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare openWorldHint and destructiveHint, so the write/open-world nature is covered structurally. The description adds one genuinely useful behavioral note — that Canvas performs a multi-step upload internally — but omits overwrite behavior, permission requirements, and size/type limits that matter for a destructive operation.

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?

Three short sentences, front-loaded with the core action. The base64 sentence is redundant with the schema, so it is not perfectly waste-free, but overall it is tightly sized and readable.

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 mutation tool with no output schema, the description covers the essential mechanics but leaves gaps: what happens if a file with the same name exists, whether the destination folder is created if missing, and any size or MIME restrictions. Annotations carry the safety profile, so the omission is not fatal, but it is incomplete for a destructive upload.

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 name, content, course_id, content_type and parent_folder_path are all documented in the schema itself. The description's only parameter remark, 'Content must be base64-encoded', duplicates the schema's content description. Baseline 3 applies.

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?

Clear specific verb+resource: 'Upload a file to a course', which an agent can easily distinguish from the sibling read-side tools (get_file, download_file, list_files, delete_file). It does not explicitly name an alternative, but the action itself is unambiguous.

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

Usage Guidelines2/5

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

No statement of when to use this versus alternatives, no prerequisites (permissions, role, course enrollment), no constraints on file size or type. The only hint is 'to a course', which is implied by the required course_id rather than stated as guidance.

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