Tool: read_doc
This tool retrieves a JSON representation of the Google Doc given its document ID.
The JSON representation includes both the text as well as structural information about the document.
Corresponds to documents.get in the REST API.
The following sample demonstrate how to use curl to invoke the read_doc MCP tool.
| Curl Request |
|---|
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 }' |
Input Schema
ReadDocRequest
| JSON representation |
|---|
{ "documentId": string } |
| Fields | |
|---|---|
documentId |
Required. The ID of the document to read. This is the same as file_id from Drive tools. |
Output Schema
ReadDocResponse
| JSON representation |
|---|
{ "content": string } |
| Fields | |
|---|---|
content |
The verbalized text content of the document. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ✅