MCP Tools Reference: gmailmcp.googleapis.com

Tool: label_message

Adds one or more labels to a specific message in the authenticated user's Gmail account.

To find the message ID, use tools like search_threads or get_thread. If unsure of a user label's ID, use the list_labels tool first to discover available labels and their IDs.

The following sample demonstrate how to use curl to invoke the label_message MCP tool.

Curl Request
curl --location 'https://gmailmcp.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "label_message",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Request message for LabelMessage RPC.

LabelMessageRequest

JSON representation
{
  "messageId": string,
  "labelIds": [
    string
  ]
}
Fields
messageId

string

Required. The ID of the message to add the labels to.

labelIds[]

string

Required. The IDs of the labels to add.

Output Schema

Response message for LabelMessage RPC.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌