Skip to main content
Glama
Canvas LMS MCP – Remote Edition

Canvas LMS MCP – Remote Edition

Upload Comment Attachment

upload_comment_attachment
Destructive

Upload a local file to attach to a submission comment and get a file ID; it remains invisible until you post the comment with that ID.

Instructions

Upload a local file so it can be attached to a comment on your submission. Returns a file ID; nothing is visible to anyone until you call post_submission_comment with that ID in file_ids. [NEEDS CONFIRMATION: call it once for a preview and a confirm_token, show the preview to the user, and only if they say yes call it again with the same arguments, confirm=true and that confirm_token. Apps that can ask the user directly show a confirmation instead.]

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>",
      "assignment_id": "<assignment_id>",
      "file_path": "<file_path>"
    },
    "name": "upload_comment_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoSet to true together with confirm_token to carry out a request you already previewed.
course_idYesCanvas course ID, a numeric string such as "12345". Get it from list_courses.
file_pathYesAbsolute path of the local file to upload, e.g. "C:/Users/me/essay.pdf".
assignment_idYesAssignment ID (numeric string). Get it from list_assignments or list_upcoming_assignments.
confirm_tokenNoThe one-time token from the preview. Only use it after the user has said yes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.4.0
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Set to true together with confirm_token to carry out a request you already previewed.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / confirm_token
      Added value: +{
      +  "description": "The one-time token from the preview. Only use it after the user has said yes.",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv1.1.3
    • changedInput schema / properties / assignment_id / description
      Previous value: -"Canvas ID (numeric string)"New value: +"Assignment ID (numeric string). Get it from list_assignments or list_upcoming_assignments."
    • changedInput schema / properties / course_id / description
      Previous value: -"Canvas course ID"New value: +"Canvas course ID, a numeric string such as \"12345\". Get it from list_courses."
    • addedInput schema / properties / file_path / description
      Added value: +"Absolute path of the local file to upload, e.g. \"C:/Users/me/essay.pdf\"."
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the return value (a file ID), the invisibility guarantee before posting, and a two-phase preview/confirm_token confirmation flow. However, the destructiveHint=true annotation is never explained — the description says an upload alone is invisible and harmless, so what the destructive aspect actually refers to (overwrite, quota, irreversibility) is left unaddressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first two sentences are front-loaded and efficient. The bracketed '[NEEDS CONFIRMATION: ...]' block reads as an unresolved internal editorial note leaked into the description, and its conditional instruction ('Apps that can ask the user directly show a confirmation instead') is dense and grammatically tangled.

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

Completeness5/5

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

No output schema exists, and the description supplies the missing return semantics (file ID) plus the follow-up call needed to make the upload useful. For a 5-parameter upload tool with fully documented schema, nothing essential to correct invocation is absent.

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 100%, so the baseline is 3, but the description adds real meaning by tying the returned file ID to post_submission_comment's file_ids and by explaining the preview-then-confirm sequence that gives confirm/confirm_token their purpose. It doesn't add format or validation detail beyond the schema, which caps it below 5.

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 ('Upload a local file') plus the precise destination scope ('attached to a comment on your submission'), which separates it from upload_submission_file and upload_to_my_files in the sibling list. It also names the follow-up tool (post_submission_comment) that consumes the result.

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?

Explains the workflow condition clearly: the upload alone exposes nothing, and the file only becomes visible after post_submission_comment is called with the returned ID in file_ids. It does not explicitly contrast with the sibling upload tools, so an agent must infer which uploader to pick, but the context for using this one is unambiguous.

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