Skip to main content
Glama

delete_file

Destructive

Move a file or folder to trash for recovery, or permanently delete it by file ID when removal is required. Permanent deletion cannot be undone.

Instructions

Move a file to the trash or permanently delete it.

Args: file_id: The ID of the file or folder to remove. permanent: If False (default), moves to trash (recoverable). If True, permanently deletes — this cannot be undone. Raises ValueError, without deleting anything, if the caller can't permanently delete the file (e.g. a Content manager on a Shared Drive, who can only trash).

Returns: Confirmation with fileId and action taken ('trashed' or 'deleted').

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": {
      "file_id": "<file_id>"
    },
    "name": "delete_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYes
permanentNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses that the default action is recoverable trashing, that permanent deletion is irreversible, and that permission failures raise ValueError without deleting anything. This is exactly the behavioral context an agent needs before invoking a destructive mutation.

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?

The definition is front-loaded with the core operation and then breaks parameters and return behavior into compact sections. The Args and Returns blocks earn their place because the schema itself provides no parameter descriptions.

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 destructive file operation with sparse annotations, the description covers recoverability, irreversibility, permission failures, and the return confirmation. An output schema also exists, so the brief Returns note is sufficient without over-explaining.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden and does so well: file_id is identified as the file or folder ID, and permanent is explained with its default, its irreversible consequence, and the permission-error condition. No parameter meaning is left unclear.

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?

The description states a specific verb and resource: moving a file to trash or permanently deleting it. It clearly distinguishes the two modes of the operation, though it does not explicitly differentiate this tool from sibling file-management tools such as restore_file or move_file.

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

Usage Guidelines3/5

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

The description implies when to use the tool through its trash-versus-permanent behavior, and it names the permission condition that triggers a ValueError. However, it gives no explicit guidance on when to choose delete_file over related siblings such as move_file or restore_file.

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