工具:unlabel_message
从经过身份验证的用户的 Gmail 账号中的特定邮件中移除一个或多个标签。如需查找消息 ID,请使用 search_threads 或 get_thread 等工具。如果不确定用户标签的 ID,请先使用 list_labels 工具发现可用的标签及其 ID。
以下示例演示了如何使用 curl 调用 unlabel_message MCP 工具。
| Curl 请求 |
|---|
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 }' |
输入架构
针对 UnlabelMessage RPC 的请求消息。
UnlabelMessageRequest
| JSON 表示法 |
|---|
{ "messageId": string, "labelIds": [ string ] } |
| 字段 | |
|---|---|
messageId |
必需。要从中移除标签的邮件的 ID。 |
labelIds[] |
必需。要移除的标签的 ID。 |
输出架构
针对 UnlabelMessage RPC 的响应消息。
工具注释
破坏性提示:✅ | 等幂性提示:✅ | 只读提示:❌ | 开放世界提示:❌