publ betaReference (MCP guide)
Open publ console

email_label_apply

# email_label_apply

Create, rename or remove a label in the Email app (pApp F00003). Names 1–30, at most 20 labels; removal needs DELETE_EMAIL_LABEL. Removal cannot be undone and detaches it from emails. A lost receipt stays pending and is never resent; task_resume only observes, and prepared work needs the identical apply. Called without confirmToken it previews and returns a confirmToken; repeating the same input with it executes once.

## Inputs

| Field | Required here | Contract |
| --- | --- | --- |
| `action` | Yes | one of: `create`, `rename`, `remove` |
| `name` | Yes | When `action` is `create`: string; min length 1; max length 30 |
| `confirmToken` | No | When `action` is `create`: string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |
| `labelId` | Yes | When `action` is `rename`: string; pattern `^[A-Za-z0-9_-]{1,200}$`; Exact email identifier returned by email_drafts_get. |
| `name` | Yes | When `action` is `rename`: string; min length 1; max length 30 |
| `confirmToken` | No | When `action` is `rename`: string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |
| `labelId` | Yes | When `action` is `remove`: string; pattern `^[A-Za-z0-9_-]{1,200}$`; Exact email identifier returned by email_drafts_get. |
| `confirmation` | Yes | When `action` is `remove`: `DELETE_EMAIL_LABEL` |
| `confirmToken` | No | When `action` is `remove`: string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |