Skip to main content
Glama

Submit Assignment File

submit_assignment_file
Destructive

Upload a local file and submit it to a Canvas assignment in one step, creating a submission attempt visible to the instructor.

Instructions

Upload a local file and submit it to an assignment in one step. Your instructor sees it and it counts as a submission attempt. To upload now and submit later, use upload_submission_file. [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": "submit_assignment_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
commentNoComment text, visible to your instructor.
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 to the local file
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.3.0
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true to actually execute. Omit or set false to get a dry-run preview first."New value: +"Set to true together with confirm_token to carry out a request you already previewed."
    • 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.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."
    • addedInput schema / properties / comment / description
      Added value: +"Comment text, visible to your instructor."
    • 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."
  3. First observedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is partly covered. The description adds genuinely new behavior: the instructor sees the file, it consumes a submission attempt, and a preview/confirm_token two-phase flow is required. The bracketed '[NEEDS CONFIRMATION: ...]' phrasing is awkward and reads as an unresolved note, which slightly undercuts the otherwise strong disclosure.

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?

The core purpose and the sibling routing are front-loaded in the first two sentences with no waste. The trailing bracketed confirmation block is longer than needed and its meta-commentary about apps that can ask the user directly is somewhat tangential, but it is not padding.

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 destructive, non-idempotent mutation with no output schema, the description covers the confirmation protocol, visibility to the instructor, and attempt consumption. It does not say what happens to a prior submission on resubmission or what errors to expect, which are the remaining gaps for a tool of this risk level.

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 course_id, assignment_id, file_path, comment, confirm and confirm_token are all documented in the schema itself. The description restates the confirm/confirm_token mechanics but adds no format, constraint, or edge-case detail (e.g. file size limits, overwrite behavior) beyond the schema. Baseline 3 applies.

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 and submit it to an assignment') plus the key scope detail 'in one step', and explicitly contrasts with the sibling upload_submission_file. An agent can distinguish it from submit_assignment_text and submit_assignment_url without opening any schema.

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

Usage Guidelines5/5

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

Names the alternative tool and the exact condition that selects it ('To upload now and submit later, use upload_submission_file'), and spells out the two-call confirmation protocol with the condition for the second call. Both when-to-use and when-not-to-use are covered.

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