Skip to main content

Drive Download File

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

READgoogle.drive_download_file
  • Contract tier: agent_ready
  • Risk: read
  • Catalog version: google-2026.07.12.2
  • Descriptor hash: 459a8e5a9ace4a7446eaca541d3bd9a3dd4b10fcf4fa93cbafeb561d43e427fb

Use this read-only Google Drive tool to get a download/export URL or bounded base64 content for a file. Prefer return_mode='url' unless bytes are required. It reads the configured user's Google data through per-request OAuth, does not mutate provider state, and returns a normalized bounded envelope.

Request Body

{
"jsonrpc": "2.0",
"id": "google-drive-download-file-example",
"method": "tools/call",
"params": {
"name": "google.drive_download_file",
"arguments": {
"file_id": "file_id_123",
"max_bytes": 1,
"range_end": "",
"range_start": "",
"return_mode": "",
"include_content": false,
"export_mime_type": "export_mime_type_example"
}
}
}

Arguments Schema

{
"type": "object",
"title": "drive_download_fileArguments",
"required": [
"file_id"
],
"properties": {
"file_id": {
"type": "string",
"title": "File Id",
"description": "Google Drive file ID."
},
"max_bytes": {
"type": "integer",
"title": "Max Bytes",
"default": 5000000,
"description": "Maximum bytes to return when including file content."
},
"range_end": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Range End",
"default": null,
"description": "Optional byte-range end for downloads."
},
"range_start": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Range Start",
"default": null,
"description": "Optional byte-range start for downloads."
},
"return_mode": {
"enum": [
"",
"url",
"base64",
"both"
],
"type": "string",
"title": "Return Mode",
"default": "",
"description": "Return mode for Drive downloads."
},
"include_content": {
"type": "boolean",
"title": "Include Content",
"default": false,
"description": "Set true to include bounded base64 content in the response."
},
"export_mime_type": {
"type": "string",
"title": "Export Mime Type",
"default": "",
"description": "MIME type to export Google-native files as."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the local or Google provider operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Bounded local navigation or Google provider result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe timing, pagination, cache, request, and truncation metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe structured error when ok is false."
}
},
"description": "Google MCP normalized operation envelope.",
"additionalProperties": false
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "google-drive-download-file-example",
"method": "tools/call",
"params": {
"name": "google.drive_download_file",
"arguments": {
"file_id": "file_id_123",
"max_bytes": 1,
"range_end": "",
"range_start": "",
"return_mode": "",
"include_content": false,
"export_mime_type": "export_mime_type_example"
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool google.drive_download_file executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}