Tool: search_documents
Use this tool to find documentation about Google developer products. The documents contain official APIs, code snippets, release notes, best practices, guides, debugging info, and more. It covers the following products and domains: * Android: developer.android.com * Apigee: docs.apigee.com * Chrome: developer.chrome.com * Firebase: firebase.google.com * Fuchsia: fuchsia.dev * Google AI: ai.google.dev * Google Cloud: docs.cloud.google.com * Google Developers, Ads, Search, Google Maps, Youtube: developers.google.com * Google Home: developers.home.google.com * TensorFlow: www.tensorflow.org * Web: web.dev This tool returns chunks of text, names, and URLs for matching documents. If the returned chunks are not detailed enough to answer the user's question, use get_document or batch_get_documents with the parent from this tool's output to retrieve the full document content.
The following sample demonstrate how to use curl to invoke the search_documents MCP tool.
| Curl Request |
|---|
curl --location 'https://developerknowledge.googleapis.com' \ --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 }' |
Input Schema
Request schema for search_documents. Use the query field to search for related Google developer documentation.
SearchDocumentChunksRequest
| JSON representation |
|---|
{ "query": string } |
| Fields | |
|---|---|
query |
Required. The raw query string provided by the user, such as "How to create a Cloud Storage bucket?". |
Output Schema
Response schema for search_documents.
SearchDocumentChunksResponse
| JSON representation |
|---|
{
"results": [
{
object ( |
| Fields | |
|---|---|
results[] |
The search results for the given query. Each Document in this list contains a snippet of content relevant to the search query. Use the Document.name field of each result with get_document or batch_get_documents to retrieve the full document content. |
DocumentChunk
| JSON representation |
|---|
{ "parent": string, "id": string, "content": string } |
| Fields | |
|---|---|
parent |
Output only. The resource name of the document this chunk is from. Format: |
id |
Output only. The ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time. |
content |
Output only. The content of the document chunk. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌