Narzędzie: get_documents
Za pomocą tego narzędzia możesz pobrać pełną treść jednego dokumentu lub maksymalnie 20 dokumentów w ramach jednego wywołania. Nazwy dokumentów powinny pochodzić z pola parent w wynikach wywołania narzędzia search_documents. Ustaw parametr names na listę nazw dokumentów.
Poniższy przykład pokazuje, jak za pomocą znaku curl wywołać narzędzie get_documents MCP.
| Żądanie 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": "get_documents", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Schemat wejściowy
Schemat żądania dla get_documents.
GetDocumentsRequest
| Zapis JSON |
|---|
{ "names": [ string ] } |
| Pola | |
|---|---|
names[] |
Wymagane. Nazwy dokumentów do pobrania zwrócone przez funkcję search_documents. W jednym wywołaniu można pobrać maksymalnie 20 dokumentów. Dokumenty są zwracane w tej samej kolejności co |
Schemat wyjściowy
Schemat odpowiedzi dla metody get_documents.
GetDocumentsResponse
| Zapis JSON |
|---|
{
"documents": [
{
object ( |
| Pola | |
|---|---|
documents[] |
Wysłano prośbę o dokumenty. |
Dokument
| Zapis JSON |
|---|
{ "name": string, "uri": string, "content": string, "description": string, "title": string } |
| Pola | |
|---|---|
name |
Identyfikator. Nazwa zasobu dokumentu. Format: |
uri |
Tylko dane wyjściowe. Identyfikator URI treści, np. |
content |
Tylko dane wyjściowe. Treść dokumentu w formacie Markdown. |
description |
Tylko dane wyjściowe. Opis dokumentu. |
title |
Tylko dane wyjściowe. Tytuł dokumentu. |
Adnotacje narzędzi
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌