MCP Tools Reference: docsmcp.googleapis.com

工具:read_doc

此工具可检索 Google 文档的 JSON 表示形式(给定文档 ID)。

JSON 表示形式既包含文本,也包含文档的结构信息。

对应于 REST API 中的 documents.get

以下示例演示了如何使用 curl 调用 read_doc MCP 工具。

Curl 请求
curl --location 'https://docsmcp.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "read_doc",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

ReadDocRequest

JSON 表示法
{
  "documentId": string
}
字段
documentId

string

必需。要读取的文档的 ID。与云端硬盘工具中的 file_id 相同。

输出架构

ReadDocResponse

JSON 表示法
{
  "content": string
}
字段
content

string

文档的口述文本内容。

工具注释

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