# deleteCollection

Mutation

Delete a Collection (strips the tag from items; does not delete items).

Available to agents as MCP tool `deleteCollection` — see [Write tools](/api/v2/docs/mcp/write-tools#delete-collection).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `ID!` | Yes | — | UUID of the Collection to delete (as returned by `collections`). Collection management is available only in workspaces whose Collections use the standard storage; where they use an older format the ids `collections` returns are not accepted here and the call returns a userError without changing anything. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `deletedCollectionId` | `ID` | The id of the deleted Collection. Null when the Collection did not exist. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | List of user-facing errors. Populated only when deletion failed. |

## Examples

### Delete a collection

Delete a Collection; strips the tag from items without deleting them.

```graphql
mutation DeleteCollectionDefault($id: ID!) {
  deleteCollection(id: $id) {
    deletedCollectionId
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "id": "e51b749b-1344-535f-a4c5-f878b69d143b"
}
```

Response — HTTP 200:

```json
{
  "data": {
    "deleteCollection": {
      "deletedCollectionId": "e51b749b-1344-535f-a4c5-f878b69d143b",
      "userErrors": []
    }
  }
}
```
