gmail_list_labels

Pack: gmail · Endpoint: https://gateway.pipeworx.io/gmail/mcp

Get all your labels including system folders (INBOX, SENT, TRASH, DRAFTS) and custom labels. Returns label names and IDs for filtering or organizing.

Example call

Arguments

{}

curl

curl -X POST https://gateway.pipeworx.io/gmail/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"gmail_list_labels","arguments":{}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('gmail_list_labels', {});

Response shape

FieldTypeDescription
labelsarrayArray of all labels
errorstringError code if connection not authenticated
messagestringError message if connection not authenticated
Full JSON Schema
{
  "type": "object",
  "properties": {
    "labels": {
      "type": "array",
      "description": "Array of all labels",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Label ID"
          },
          "name": {
            "type": "string",
            "description": "Label name"
          },
          "labelListVisibility": {
            "type": "string",
            "description": "Label visibility in label list"
          },
          "messageListVisibility": {
            "type": "string",
            "description": "Label visibility in message list"
          },
          "messageCount": {
            "type": "number",
            "description": "Number of messages with this label"
          },
          "threadsUnread": {
            "type": "number",
            "description": "Number of unread threads with this label"
          }
        }
      }
    },
    "error": {
      "type": "string",
      "description": "Error code if connection not authenticated"
    },
    "message": {
      "type": "string",
      "description": "Error message if connection not authenticated"
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "gmail": {
      "url": "https://gateway.pipeworx.io/gmail/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026