工具:unlabel_thread
從已驗證使用者 Gmail 帳戶的整個郵件串中移除標籤。如果不確定執行緒 ID,請先使用 search_threads 工具。如果不確定使用者標籤的 ID,請先使用 list_labels 工具。
下列範例示範如何使用 curl 叫用 unlabel_thread MCP 工具。
| Curl 要求 |
|---|
curl --location 'https://gmailmcp.googleapis.com/mcp/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "unlabel_thread", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
輸入內容的結構定義
UnlabelThread RPC 的要求訊息。
UnlabelThreadRequest
| JSON 表示法 |
|---|
{ "threadId": string, "labelIds": [ string ] } |
| 欄位 | |
|---|---|
threadId |
必填。要移除標籤的執行緒專屬 ID。 |
labelIds[] |
必填。要移除的標籤專屬 ID。可以是系統標籤 ID (例如「INBOX」、「TRASH」、「SPAM」、「STARRED」、「UNREAD」、「IMPORTANT」),也可以是使用者定義的標籤 ID。這項工具接受 |
輸出內容的結構定義
UnlabelThread RPC 的回應訊息。
工具註解
破壞性提示:✅ | 等冪提示:✅ | 唯讀提示:❌ | 開放世界提示:❌
授權範圍
需要下列其中一種 OAuth 範圍:
https://mail.google.com/https://www.googleapis.com/auth/gmail.modify