files.delete
Delete obsolete files permanently by ID (max 500 per call). Removes from storage and search index, with per-ID error isolation so partial batches still succeed.
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
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | File IDs to delete. Single-element array = one-file case. Max 500 per call. |