MCP Tools Reference: docsmcp.googleapis.com

Outil : read_doc

Cet outil récupère une représentation JSON du document Google Docs en fonction de son ID.

La représentation JSON inclut à la fois le texte et des informations structurelles sur le document.

Correspond à documents.get dans l'API REST.

L'exemple suivant montre comment utiliser curl pour appeler l'outil MCP read_doc.

Requête 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
}'
                

Schéma d'entrée

ReadDocRequest

Représentation JSON
{
  "documentId": string
}
Champs
documentId

string

Obligatoire. ID du document à lire. Identique à file_id dans les outils Drive.

Schéma de sortie

ReadDocResponse

Représentation JSON
{
  "content": string
}
Champs
content

string

Contenu textuel verbalisé du document.

Annotations d'outil

Indication destructive : ❌ | Indication idempotente : ✅ | Indication en lecture seule : ✅ | Indication Open World : ✅