MCP Tools Reference: developerknowledge.googleapis.com

工具: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

string

必填。要回答的查詢。

輸出內容的結構定義

AnswerQuery 的回應訊息。

AnswerQueryResponse

JSON 表示法
{
  "answerText": string
}
欄位
answerText

string

查詢的答案。

工具註解

破壞性提示:❌ | 等冪提示:✅ | 唯讀提示:✅ | 開放世界提示:❌