ツール: search_documents
このツールを使用して、Google デベロッパー プロダクトに関するドキュメントを検索します。ドキュメントには、公式 API、コード スニペット、リリースノート、ベスト プラクティス、ガイド、デバッグ情報などが含まれています。次のプロダクトとドメインを対象としています。
ADK: adk.dev
Android: developer.android.com
Apigee: docs.apigee.com
Chrome: developer.chrome.com
Dart: dart.dev
Firebase: firebase.google.com
Flutter: docs.flutter.dev
Fuchsia: fuchsia.dev
Gemini CLI: geminicli.com
Go: go.dev
Google AI: ai.google.dev
Google Antigravity: antigravity.google
Google Cloud: cloud.google.com &docs.cloud.google.com
Google Developers、広告、検索、Google マップ、YouTube: developers.google.com
Google Home: developers.home.google.com
Google Maps Platform: mapsplatform.google.com
TensorFlow: www.tensorflow.org
ウェブ: web.dev
このツールは、一致するドキュメントのテキストのチャンク、名前、URL を返します。返されたチャンクがユーザーの質問に答えるのに十分な詳細でない場合は、このツールの出力の parent を使用して get_documents を使用し、ドキュメントのコンテンツ全体を取得します。
次のサンプルは、curl を使用して search_documents 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": "search_documents", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
入力スキーマ
search_documents のリクエスト スキーマ。query フィールドを使用して、関連する Google デベロッパー ドキュメントを検索します。
SearchDocumentChunksRequest
| JSON 表現 |
|---|
{ "query": string } |
| フィールド | |
|---|---|
query |
必須。ユーザーが指定した未加工のクエリ文字列(「Cloud Storage バケットを作成する方法」など)。 |
出力スキーマ
search_documents のレスポンス スキーマ。
SearchDocumentChunksResponse
| JSON 表現 |
|---|
{
"results": [
{
object ( |
| フィールド | |
|---|---|
results[] |
指定されたクエリの検索結果。このリストの各ドキュメントには、検索クエリに関連するコンテンツのスニペットが含まれています。ドキュメントのコンテンツ全体を取得するには、各結果の DocumentChunk.name フィールドを get_documents で使用します。 |
DocumentChunk
| JSON 表現 |
|---|
{ "parent": string, "id": string, "content": string } |
| フィールド | |
|---|---|
parent |
出力専用。このチャンクの元のドキュメントのリソース名。形式: |
id |
出力専用。ドキュメント内のこのチャンクの ID。チャンク ID はドキュメント内で一意ですが、ドキュメント間でグローバルに一意ではありません。チャンク ID は固定されておらず、時間の経過とともに変更される可能性があります。 |
content |
出力専用。ドキュメント チャンクのコンテンツ。 |
ツールのアノテーション
破壊的ヒント: ❌ | べき等ヒント: ✅ | 読み取り専用ヒント: ✅ | オープン ワールド ヒント: ❌