MCP Tools Reference: developerknowledge.googleapis.com

工具:get_documents

您可以使用此工具检索单个文档的完整内容,也可以通过一次调用检索最多 20 个文档的完整内容。文档名称应从对 search_documents 工具的调用结果的 parent 字段中获取。将 names 参数设置为文档名称列表。

以下示例演示了如何使用 curl 调用 get_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": "get_documents",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

get_documents 的请求架构。

GetDocumentsRequest

JSON 表示法
{
  "names": [
    string
  ]
}
字段
names[]

string

必需。要检索的文档的名称,由 search_documents 返回。一次调用最多可检索 20 篇文档。返回的文档与请求中的 names 顺序相同。格式:documents/{uri_without_scheme} 示例:documents/docs.cloud.google.com/storage/docs/creating-buckets

输出架构

get_documents 的响应架构。

GetDocumentsResponse

JSON 表示法
{
  "documents": [
    {
      object (Document)
    }
  ]
}
字段
documents[]

object (Document)

已请求文件。

文档

JSON 表示法
{
  "name": string,
  "uri": string,
  "content": string,
  "description": string,
  "title": string
}
字段
name

string

标识符。文档的资源名称。格式:documents/{uri_without_scheme} 示例:documents/docs.cloud.google.com/storage/docs/creating-buckets

uri

string

仅限输出。内容的 URI,例如 https://cloud.google.com/storage/docs/creating-buckets

content

string

仅限输出。文档的内容(采用 Markdown 格式)。

description

string

仅限输出。文档的说明。

title

string

仅限输出。文档标题。

工具注释

破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌