Tool: unlabel_message
Removes one or more labels from 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 unlabel_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": "unlabel_message", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for UnlabelMessage RPC.
UnlabelMessageRequest
| JSON representation |
|---|
{ "messageId": string, "labelIds": [ string ] } |
| Fields | |
|---|---|
messageId |
Required. The ID of the message to remove the labels from. |
labelIds[] |
Required. The IDs of the labels to remove. |
Output Schema
Response message for UnlabelMessage RPC.
Tool Annotations
Destructive Hint: ✅ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌