Skip to main content
Glama

Delete File

delete_file
DestructiveIdempotent

Permanently delete a file by ID, and return the deleted file object (its last known metadata) — the content is gone and there is no undelete.

Instructions

Permanently delete a file by ID, and return the deleted file object (its last known metadata) — the content is gone and there is no undelete. Use upload_file to put a replacement back afterward; Canvas assigns the new file a different ID rather than reusing the deleted one. Requires permission to manage files in the course.

Input Schema

NameRequiredDescriptionDefault
file_idYesThe Canvas file ID

Schema Changelog

Changes observed during successful MCP inspections.

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

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, it explains that the deletion is permanent, there is no undelete, a deleted file object with last known metadata is returned, and a replacement upload receives a different Canvas ID. These are substantive behavioral details that an agent could not infer from the annotations alone.

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

Conciseness5/5

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

Three sentences, front-loaded with the destructive action and irreversibility, followed by the replacement alternative and permission requirement. Every sentence contributes actionable information with no waste.

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?

For a single-parameter destructive tool with no output schema, the description covers deletion semantics, return value, permission prerequisites, and replacement workflow. Nothing material is missing for an agent to call it safely and correctly.

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 single parameter is fully documented by the input schema at 100% coverage, where file_id is described as 'The Canvas file ID'. The description only restates 'by ID' and adds no syntax, format, or validation details beyond the schema, so the baseline 3 is appropriate.

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 and resource ('Permanently delete a file by ID') and distinguishes the operation from siblings like upload_file, get_file, and download_file by emphasizing permanence and replacement behavior. An agent can identify the tool's role 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 Guidelines4/5

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

It gives clear usage conditions: requires permission to manage files in the course, cannot be undone, and upload_file is the alternative for restoring a replacement. It does not explicitly say when not to delete or recommend inspecting a file first, so it falls just short of a 5.

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