Skip to main content
Glama

delete_file

Delete a file by id. It moves to a 30-day trash, and its old link stops working immediately. Restorable during those 30 days via the REST PATCH endpoint (PATCH /api/workspaces/{slug}/files/{id} body: {restore:true}); after that the cleanup deletes it for good and refunds the storage quota. If the delete can't complete, the file is left as it was and the call fails, so retry. Editor role required.

Input Schema

NameRequiredDescriptionDefault
slugYesThe workspace slug. Accepts either the bare slug or the org-prefixed form ('my-org/my-workspace') as shown in the dashboard URL.
file_idYesThe file cuid (from list_files).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses the 30-day soft-delete, immediate link invalidation, restoration path, permanent deletion after 30 days, storage quota refund, atomic failure behavior, retry guidance, and required editor role.

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 description is front-loaded with the core action and then adds only high-value behavioral details. Despite being longer than a one-liner, every sentence contributes useful context for a destructive operation with no annotations.

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?

Given a simple two-parameter delete tool with no annotations and no output schema, the description is complete: it covers destructiveness, reversibility, permission requirements, failure semantics, and restoration. No critical agent-facing information is missing.

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 the schema already documents both slug and file_id thoroughly. The description adds only 'by id,' which is redundant with the schema, so the baseline score of 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 opens with a specific verb and resource: 'Delete a file by id.' The resource 'file' clearly distinguishes it from sibling delete tools such as delete_row, delete_surface, delete_webhook, and delete_workspace.

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?

Usage is implied by the purpose and the stated prerequisite ('Editor role required'), plus the retry guidance on failure. However, the description does not explicitly say when to choose this tool over alternatives such as revoke_file_share or remove_video, nor does it state clear when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.