工具:answer_query
您可以使用 answer_query 来获取有关 Google 开发者产品的查询的可靠答案。此工具的配额有限。此工具会从语料库中综合信息,以生成查询的答案。answer_query 使用与 search_documents 相同的语料库来提供可靠的答案。如果您收到 429 超出配额错误,请改用 search_documents。
以下示例演示了如何使用 curl 调用 answer_query MCP 工具。
| Curl 请求 |
|---|
curl --location 'https://developerknowledge.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "answer_query", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
输入架构
AnswerQuery 的请求消息。
AnswerQueryRequest
| JSON 表示法 |
|---|
{ "query": string } |
| 字段 | |
|---|---|
query |
必需。要回答的查询。 |
输出架构
AnswerQuery 的响应消息。
AnswerQueryResponse
| JSON 表示法 |
|---|
{ "answerText": string } |
| 字段 | |
|---|---|
answerText |
查询的答案。 |
工具注释
破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌