Skip to main content
Glama

Upload Comment Attachment

upload_comment_attachment

Upload a local file and get a file ID to attach to a submission comment. Nothing is shared 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.

Input Schema

NameRequiredDescriptionDefault
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.2
    • 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\"."
  2. First observedv1.0.1

TDQS

A3.9/5.0
Behavior3/5

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

With annotations already declaring a non-readonly, non-idempotent, non-destructive, open-world write, the description adds genuinely useful behavior: it returns a file ID and the upload is inert until post_submission_comment references it in file_ids. It says nothing about permissions, whether uploading the same file twice leaves an orphaned duplicate, size or type limits, or how failures surface, which matters for an upload tool with idempotentHint=false.

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, both front-loaded with the essential purpose and then the critical postcondition. Nothing is wasted, but the structure could separate the preconditions for the call from the return value for easier scanning.

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 three-parameter tool with no output schema, the description covers the return value (a file ID) and the required next step that actually makes the upload meaningful. It is nearly complete for an agent to call it correctly, missing only limits and re-upload behavior.

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?

The schema documents all three parameters, and each field description says where to obtain the ID (list_courses, list_assignments). Baseline 3 applies: the description mentions a 'local file' but adds no constraint or format detail beyond the schema, so the schema does the real work.

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 names a specific verb and resource (upload a local file destined for a comment attachment on your submission) and pins down where it belongs: the comment flow, not the submission-file flow. That single scoping clause separates it in practice from upload_submission_file and upload_to_my_files, which sit nearby in the catalog.

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?

The description gives the agent the condition that makes this tool the right one: the uploaded file is later referenced via post_submission_comment, and the required follow-up call is named explicitly. It does not, however, say when not to use it, such as when the file belongs to a submission upload instead of a comment, so the agent has no explicit exclusion.

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