工具:search_documentation
搜索并检索 Google Pay 和 Google 钱包官方开发者文档和代码示例中最相关、最新的部分。
以下示例演示了如何使用 curl 调用 search_documentation MCP 工具。
| Curl 请求 |
|---|
curl --location 'https://paydeveloper.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "search_documentation", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
输入架构
用于搜索文档的请求消息。
SearchDocumentationRequest
| JSON 表示法 |
|---|
{ "userQuery": string, "languageCode": string } |
| 字段 | |
|---|---|
userQuery |
可选。要搜索的查询。 |
languageCode |
可选。搜索查询的 IETF BCP-47 语言代码。 |
输出架构
用于搜索文档的响应消息。
SearchDocumentationResponse
| JSON 表示法 |
|---|
{
"results": [
{
object ( |
| 字段 | |
|---|---|
results[] |
与搜索查询匹配的文档块,并使用相关性得分进行排序,该得分用于评估用户查询与块内容之间的相似性。 |
DocumentChunk
| JSON 表示法 |
|---|
{ "title": string, "uri": string, "content": string } |
| 字段 | |
|---|---|
title |
指定块所属文档的标题。 |
uri |
指定块所属文档的 URI。 |
content |
包含块的内容。 |
工具注释
破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌