gmail_list_messages
Pack: gmail · Endpoint: https://gateway.pipeworx.io/gmail/mcp
List messages in your inbox with optional filtering by label or read status. Returns message IDs, thread IDs, and preview text. Use gmail_search for complex queries like date ranges or attachments.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | no | Gmail search query to filter messages (e.g., “from:alice subject:meeting”) |
max_results | number | no | Maximum number of messages to return (default 10, max 100) |
page_token | string | no | Token for fetching the next page of results |
Example call
Arguments
{
"max_results": 10
}
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_messages","arguments":{"max_results":10}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('gmail_list_messages', {
"max_results": 10
});
More examples
{
"query": "from:alice subject:meeting",
"max_results": 20
}
Response shape
| Field | Type | Description |
|---|---|---|
messages | array | Array of message summaries |
nextPageToken | string | Token for fetching next page of results |
resultSizeEstimate | number | Estimated total number of matching messages |
error | string | Error code if connection not authenticated |
message | string | Error message if connection not authenticated |
Full JSON Schema
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"description": "Array of message summaries",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Message ID"
},
"threadId": {
"type": "string",
"description": "Thread ID"
},
"labelIds": {
"type": "array",
"description": "Applied label IDs",
"items": {
"type": "string"
}
}
}
}
},
"nextPageToken": {
"type": "string",
"description": "Token for fetching next page of results"
},
"resultSizeEstimate": {
"type": "number",
"description": "Estimated total number of matching messages"
},
"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.