---
title: document_delete
description: Delete a file attached to a brand, along with its stored bytes.
---

Deletes a **document** and the bytes behind it. Its URL stops resolving.

## Input

| Field         | Type     | Required | Description                       |
| ------------- | -------- | -------- | --------------------------------- |
| `document_id` | `string` | yes      | The id of the document to delete. |

## Output

`{ deleted: true, documentId }`.

:::warning[Deleting a brand takes its documents too]

Removing a brand with [`brand_delete`](/mcp/tools/brand-delete) also removes every document attached to it. You don't need to clear them first.

:::

Requires the `brand:write` scope.

## Reference

Delete a file attached to a brand, along with the stored bytes. The URL stops resolving immediately.

### Input

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `document_id` | string | yes | The id of the document to delete. |

### Failure codes

A failed call has `isError` set, and `structuredContent.error` holds one of these codes. [Errors](/mcp/errors) describes the shape of a failed call.

- `not_found`
- `forbidden`
- `invalid_request`
- `internal_error`

### Scope

The token must hold `brand:write`. [Auth & scopes](/mcp/auth) lists each scope.

### Annotations

A client reads these hints. A hint that the tool does not declare has the default value of the MCP specification.

- **Writes.** The tool can change data.
- **Destructive.** The tool can make a change that you cannot undo. A client can ask you to confirm before it calls the tool.
- **Not idempotent.** A second call with the same arguments can change more.
- **Closed world.** The tool reads and writes the data of AdCrunch only.
