MCP Tools Reference: people.googleapis.com

工具:search_contacts

搜索用户的联系人。

必须遵守的重要规则

  • 如果此工具返回多个结果,您应向用户显示这些结果,并提示用户明确要使用哪个结果,然后再继续操作。

  • 在未获得用户明确确认的情况下,严禁将此工具的输出传递给其他工具(例如发送电子邮件、创建草稿、创建活动等)。

  • 即使只找到一个人物结果,您也必须向用户显示找到的人物详细信息,并提示用户验证此人是否是预期人物,然后才能继续执行后续步骤。

以下示例演示了如何使用 curl 调用 search_contacts MCP 工具。

Curl 请求
curl --location 'https://people.googleapis.com/mcp/v1' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "search_contacts",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

SearchContacts 的请求消息。

SearchContactsMcpRequest

JSON 表示法
{
  "query": string,
  "maxResults": integer
}
字段
query

string

要搜索的查询字符串。

maxResults

integer

结果数量上限。默认值为 10,允许的最大值为 30。

输出架构

SearchContacts 的响应消息。

SearchContactsMcpResponse

JSON 表示法
{
  "results": [
    {
      object (SearchContactsResult)
    }
  ]
}
字段
results[]

object (SearchContactsResult)

与查询匹配的联系人列表。

SearchContactsResult

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

string

联系人的显示名称。

email

string

联系人的账号电子邮件地址。

工具注释

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