MCP Tools Reference: gmailmcp.googleapis.com

工具:create_label

在经过身份验证的用户的 Gmail 账号中创建新标签。

以下示例演示了如何使用 curl 调用 create_label 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": "create_label",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

CreateLabel RPC 的请求消息。

CreateLabelRequest

JSON 表示法
{
  "displayName": string
}
字段
displayName

string

必需。要创建的标签的显示名称。

输出架构

标签的详细信息。

标签

JSON 表示法
{
  "labelId": string,
  "name": string
}
字段
labelId

string

标签的唯一标识符。

name

string

标签的人类可读显示名称。

工具注释

破坏性提示:❌ | 等幂性提示:❌ | 只读提示:❌ | 开放世界提示:❌