Skip to main content

Gmail List Labels

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

READgoogle.gmail_list_labels
  • Contract tier: agent_ready
  • Risk: read
  • Catalog version: google-2026.07.12.2
  • Descriptor hash: b37c389bd65b86a2c156c33532b8bb96fbb67de4e5b8acde648187917387357f

Use this read-only Gmail tool to list labels for the authenticated mailbox. It defaults to compact label IDs and names. It reads the configured user's Google data through per-request OAuth, does not mutate provider state, and returns a normalized bounded envelope.

Request Body

{
"jsonrpc": "2.0",
"id": "google-gmail-list-labels-example",
"method": "tools/call",
"params": {
"name": "google.gmail_list_labels",
"arguments": {
"fields": "",
"minimal": false,
"include_visibility": false
}
}
}

Arguments Schema

{
"type": "object",
"title": "gmail_list_labelsArguments",
"properties": {
"fields": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"title": "Fields",
"default": "",
"description": "Optional Google partial-response fields selector for compact output."
},
"minimal": {
"type": "boolean",
"title": "Minimal",
"default": true,
"description": "Argument for gmail_list_labels."
},
"include_visibility": {
"type": "boolean",
"title": "Include Visibility",
"default": false,
"description": "Argument for gmail_list_labels."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the local or Google provider operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Bounded local navigation or Google provider result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe timing, pagination, cache, request, and truncation metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe structured error when ok is false."
}
},
"description": "Google MCP normalized operation envelope.",
"additionalProperties": false
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "google-gmail-list-labels-example",
"method": "tools/call",
"params": {
"name": "google.gmail_list_labels",
"arguments": {
"fields": "",
"minimal": false,
"include_visibility": false
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool google.gmail_list_labels executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}