gmail_get_message

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

Fetch full email details by message ID. Returns headers, subject, body text, sender, recipients, attachments, and applied labels.

Parameters

NameTypeRequiredDescription
message_idstringyesThe ID of the message to retrieve
formatstringnoFormat of the returned message (default: full)

Example call

Arguments

{
  "message_id": "18c1b1f187221e2d"
}

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_get_message","arguments":{"message_id":"18c1b1f187221e2d"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('gmail_get_message', {
  "message_id": "18c1b1f187221e2d"
});

More examples

{
  "message_id": "18c1b1f187221e2d",
  "format": "full"
}

Response shape

FieldTypeDescription
idstringMessage ID
threadIdstringThread ID
labelIdsarrayApplied label IDs
snippetstringShort plain text snippet of message body
payloadobjectMessage structure and content
sizeEstimatenumberEstimated message size in bytes
historyIdstringHistory ID of message
internalDatestringInternal date timestamp in milliseconds
errorstringError code if connection not authenticated
messagestringError message if connection not authenticated
Full JSON Schema
{
  "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"
      }
    },
    "snippet": {
      "type": "string",
      "description": "Short plain text snippet of message body"
    },
    "payload": {
      "type": "object",
      "description": "Message structure and content",
      "properties": {
        "headers": {
          "type": "array",
          "description": "Email headers",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Header name"
              },
              "value": {
                "type": "string",
                "description": "Header value"
              }
            }
          }
        },
        "body": {
          "type": "object",
          "description": "Message body",
          "properties": {
            "data": {
              "type": "string",
              "description": "Base64url encoded body text"
            },
            "size": {
              "type": "number",
              "description": "Body size in bytes"
            }
          }
        },
        "parts": {
          "type": "array",
          "description": "Message parts for multipart messages",
          "items": {
            "type": "object",
            "properties": {
              "mimeType": {
                "type": "string",
                "description": "MIME type"
              },
              "filename": {
                "type": "string",
                "description": "Attachment filename"
              }
            }
          }
        }
      }
    },
    "sizeEstimate": {
      "type": "number",
      "description": "Estimated message size in bytes"
    },
    "historyId": {
      "type": "string",
      "description": "History ID of message"
    },
    "internalDate": {
      "type": "string",
      "description": "Internal date timestamp in milliseconds"
    },
    "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