ツール: read_doc
このツールは、ドキュメント ID を指定して Google ドキュメントの JSON 表現を取得します。
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 |
必須。読み取るドキュメントの ID。これは、ドライブ ツールの file_id と同じです。 |
出力スキーマ
ReadDocResponse
| JSON 表現 |
|---|
{ "content": string } |
| フィールド | |
|---|---|
content |
ドキュメントの音声化されたテキスト コンテンツ。 |
ツールのアノテーション
破壊的ヒント: ❌ | べき等ヒント: ✅ | 読み取り専用ヒント: ✅ | オープン ワールド ヒント: ✅