Skip to main content

Gmail Modify Thread Labels

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEgoogle.gmail_modify_thread_labels
  • Contract tier: agent_ready
  • Risk: write
  • Catalog version: google-2026.07.12.2
  • Descriptor hash: c882a05d5ea7ebd9d204a27c9ce3740370abc164cb21bef79820fe5bdc07806b

Add or remove labels on a Gmail thread. It creates or updates Google provider state and requires per-request Google OAuth. The result is returned in a normalized bounded envelope.

Request Body

{
"jsonrpc": "2.0",
"id": "google-gmail-modify-thread-labels-example",
"method": "tools/call",
"params": {
"name": "google.gmail_modify_thread_labels",
"arguments": {
"thread_id": "thread_id_123",
"confirm": false,
"dry_run": false,
"add_label_ids": "",
"remove_label_ids": ""
}
}
}

Arguments Schema

{
"type": "object",
"title": "gmail_modify_thread_labelsArguments",
"required": [
"thread_id"
],
"properties": {
"confirm": {
"type": "boolean",
"title": "Confirm",
"default": false,
"description": "Required true for high-risk operations when confirmation is enforced."
},
"dry_run": {
"type": "boolean",
"title": "Dry Run",
"default": true,
"description": "When true, return the planned operation without mutating provider data."
},
"thread_id": {
"type": "string",
"title": "Thread Id",
"description": "Gmail thread 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-thread-labels-example",
"method": "tools/call",
"params": {
"name": "google.gmail_modify_thread_labels",
"arguments": {
"thread_id": "thread_id_123",
"confirm": false,
"dry_run": false,
"add_label_ids": "",
"remove_label_ids": ""
}
}
}'

Example Responses

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