gmail_list_labels
Pack: gmail · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/gmail_list_labels for the schema, then POST the same URL with its arguments for the data.
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
| Field | Type | Description |
|---|---|---|
labels | array | Array of all labels |
error | string | Error code if connection not authenticated |
message | string | Error 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 — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the gmail pack
{
"mcpServers": {
"gmail": {
"url": "https://gateway.pipeworx.io/gmail/mcp"
}
}
}
See Getting Started for client-specific install steps.