Tool: read_doc
Mit diesem Tool wird eine JSON-Darstellung des Google-Dokuments anhand seiner Dokument-ID abgerufen.
Die JSON-Darstellung enthält sowohl den Text als auch Strukturinformationen zum Dokument.
Entspricht documents.get in der REST API.
Im folgenden Beispiel wird gezeigt, wie Sie curl verwenden, um das MCP-Tool read_doc aufzurufen.
| Curl-Anfrage |
|---|
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 }' |
Eingabeschema
ReadDocRequest
| JSON-Darstellung |
|---|
{ "documentId": string } |
| Felder | |
|---|---|
documentId |
Erforderlich. Die ID des zu lesenden Dokuments. Entspricht der file_id aus Drive-Tools. |
Ausgabeschema
ReadDocResponse
| JSON-Darstellung |
|---|
{ "content": string } |
| Felder | |
|---|---|
content |
Der verbalisierte Textinhalt des Dokuments. |
Tool-Anmerkungen
Destruktiver Hinweis: ❌ | Idempotenter Hinweis: ✅ | Schreibgeschützter Hinweis: ✅ | Open-World-Hinweis: ✅