Skip to main content
Glama

Drive Delete File

drive_delete_file
DestructiveIdempotent

Remove a Drive file or folder by moving it to trash for reversible cleanup, or delete it permanently after confirmation. Use trash mode by default to keep recovery possible.

Instructions

Delete a Drive file or folder: move it to the trash (default) or delete it permanently. Prefer the default trash mode, which is reversible from Drive's trash; to only revoke someone's access use drive_unshare_file instead. Returns status 'ok' with mode 'trash' and file (id, name, kind, mime_type, size, size_bytes, parent_ids, drive_id, web_url, trashed; null where the change does not report it), or mode 'permanent' and file_id. A permanent delete cannot be undone, asks the user to confirm first and returns status 'cancelled' if they decline.

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": "drive_delete_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesDrive file ID: the id field of Drive and search_workspace results, or the long ID in a Drive, Docs, Sheets or Slides URL.
delete_modeNo'trash' moves the file to Drive's trash, where it can be restored; 'permanent' deletes it irreversibly after asking the user to confirm.trash

Output Schema

NameRequiredDescriptionDefault
fileNo
modeNo
statusNoMachine-readable operation status.
file_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description goes further by disclosing the reversibility gradient between modes, that the permanent path blocks on user confirmation, and that declining yields status 'cancelled' rather than throwing. This is exactly the extra context an agent needs before invoking an irreversible write.

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?

Front-loads the core action and the reversible-by-default guidance before the alternative and the return detail. The parenthetical enumeration of returned file fields is long and likely duplicates the output schema, but the substance is dense and non-repetitive overall.

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?

Covers everything material for a destructive two-mode delete tool: default behavior, alternatives, confirmation flow, cancellation outcome, and the shape of both return modes. With annotations and an output schema present, no significant decision-relevant gap remains.

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%, and the enum values already document the trash/permanent distinction including the irreversibility and confirmation. The description's parameter discussion largely restates the same semantics plus a default preference, so it adds limited meaning beyond the schema.

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?

Names a specific verb and resource ('Delete a Drive file or folder') and immediately scopes it into two modes (trash vs permanent). It explicitly distinguishes itself from the sibling drive_unshare_file by stating that access revocation is a different operation, so an agent can route correctly without opening either 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?

Gives an explicit preference ('Prefer the default trash mode'), the reason (reversible from Drive's trash), and a named alternative for a different intent ('to only revoke someone's access use drive_unshare_file instead'). It also flags the precondition for the irreversible path (user confirmation).

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