Skip to main content

Gmail Modify Message Labels

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

DESTRUCTIVEgoogle.gmail_modify_message_labels
  • Contract tier: agent_ready
  • Risk: destructive
  • Catalog version: google-2026.07.12.2
  • Descriptor hash: 6752d6d4eac4e439b8636344b96dcd964c3b094ac968c0dbbe96a29d848ed3a7

Use this destructive Gmail tool to add or remove labels from a message. It changes mailbox organization for the target message. It can overwrite, send, move, remove, or permanently delete Google data. Use it only after preview and the manifest-defined confirmation; it requires per-request Google OAuth.

Request Body

{
"jsonrpc": "2.0",
"id": "google-gmail-modify-message-labels-example",
"method": "tools/call",
"params": {
"name": "google.gmail_modify_message_labels",
"arguments": {
"message_id": "message_id_123",
"add_label_ids": "",
"remove_label_ids": ""
}
}
}

Arguments Schema

{
"type": "object",
"title": "gmail_modify_message_labelsArguments",
"required": [
"message_id"
],
"properties": {
"message_id": {
"type": "string",
"title": "Message Id",
"description": "Gmail message ID."
},
"add_label_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"title": "Add Label Ids",
"default": null,
"description": "Gmail label IDs to add."
},
"remove_label_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"title": "Remove Label Ids",
"default": null,
"description": "Gmail label IDs to remove."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the local or Google provider operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Bounded local navigation or Google provider result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe timing, pagination, cache, request, and truncation metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe structured error when ok is false."
}
},
"description": "Google MCP normalized operation envelope.",
"additionalProperties": false
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "google-gmail-modify-message-labels-example",
"method": "tools/call",
"params": {
"name": "google.gmail_modify_message_labels",
"arguments": {
"message_id": "message_id_123",
"add_label_ids": "",
"remove_label_ids": ""
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool google.gmail_modify_message_labels executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}