list_gmail_labels
Retrieve all Gmail labels (system and user) to obtain their IDs for use with label modification and filter management tools.
Instructions
List every label in the user's mailbox, split system vs user.
Use this to discover label IDs before calling modify_gmail_message_labels / batch_modify_gmail_message_labels / manage_gmail_filter — label IDs (not names) are what those tools require. Requires the gmail.readonly OAuth scope.
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 |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |