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/v1' \ --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' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
Request message for LabelMessage RPC.
LabelMessageRequest
| JSON representation |
|---|
{ "messageId" : string , "labelIds" : [ string ] } |
| Fields | |
|---|---|
messageId
|
Required. The ID of the message to add the labels to. |
labelIds[]
|
Required. The IDs of the labels to add. Can be a system label ID (e.g., 'INBOX', 'TRASH', 'SPAM', 'STARRED', 'UNREAD', 'IMPORTANT') or a user-defined label ID. The tool accepts |
Output Schema
Response message for LabelMessage RPC.
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌

