List Gmail Labels
list_gmail_labelsLists Gmail labels for a specified Google account, with options to filter by prefix, include or exclude system labels, and return compact JSON for parsing.
Instructions
Lists labels in the user's Gmail account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_google_email": "<user_google_email>"
},
"name": "list_gmail_labels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prefix | No | Return only labels whose name starts with this exact (case-sensitive) string. users.labels.list accepts no filter, so the full list is fetched and narrowed here: this shrinks what the caller receives, not the API call. | |
| compact | No | Return minimal JSON {"count", "labels": [{"id", "name"}]} sorted by name, instead of the formatted text list. For callers that parse the result, e.g. a label cache refresh. | |
| include_system | No | Include Gmail system labels (INBOX, SENT, ...). Set False to return user labels only. | |
| user_google_email | Yes | The user's Google email address. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |