Skip to main content
Glama

files_delete

Permanently delete one or more files by ID (up to 500 per call). Use only for obsolete files; KB files are unlinked from disk and index, project reference files only from the index.

Instructions

DESTRUCTIVE. Permanently delete one or more files by ID (up to 500 per call). Pass a single-element ids array for the one-file case. KB files are unlinked from disk AND removed from the FTS5 index; project reference files only have their index entry removed (the file on disk is left alone so the watcher does not fight your editor). Not idempotent: deleting an unknown ID surfaces as a per-item error. No external auth or rate limits. Per-ID failures are isolated to errors[] and the rest of the batch still commits: partial success is the norm, always inspect error_count. Returns {deleted_count, error_count, deleted, errors}. Use only when the file is truly obsolete; to deprioritise without losing data, untag (tags_remove) or unfavorite (tags_set_favorite) instead. To preview the set before deleting, run files_list with the same filter and confirm the IDs.

Input Schema

NameRequiredDescriptionDefault
idsYesFile IDs to delete. Single-element array = one-file case. Max 500 per call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.2

TDQS

A4.6/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses permanence, the KB-vs-project disk/index asymmetry, non-idempotency with per-item errors on unknown IDs, absence of external auth or rate limits, per-ID failure isolation, and the partial-success norm. This is far beyond what a bare schema could convey.

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?

Content is dense and front-loaded with the DESTRUCTIVE warning and the core action, and nearly every sentence carries operational weight. It is on the long side, but for a destructive batch tool the length is largely earned rather than padding.

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?

With no annotations and no output schema, the description still supplies safety profile, per-class behavior, failure semantics, and the response shape `{deleted_count, error_count, deleted, errors}`. An agent has everything needed to call it correctly and interpret partial failures.

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 single `ids` parameter is fully documented including minItems/maxItems, so the baseline is 3. The description restates the single-element-array convention and the 500 cap, adding convenience but little new syntax or format meaning.

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 with scope: 'Permanently delete one or more files by ID (up to 500 per call).' It also distinguishes the two file classes (KB files vs project reference files) and their differing delete semantics, so it is clearly separable from siblings like files_update or tags_remove.

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?

Explicit 'Use only when the file is truly obsolete' gating, two named alternatives for the deprioritise case (tags_remove, tags_set_favorite), and a preview workflow via files_list with the same filter. When-to-use, when-not, and alternatives are all covered.

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