## Tool: `download_file_content`

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

Call this tool to download the content of a Drive file as a base64 encoded string.

If the file is a Google Drive first-party mime type, the `exportMimeType` field is required and will determine the format of the downloaded file.

If the file is not found, try using other tools like `search_files` to find the file the user is requesting.

If the user wants a natural language representation of their Drive content, use the `read_file_content` tool (`read_file_content` should be smaller and easier to parse).

The following sample demonstrate how to use `curl` to invoke the `download_file_content` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://drivemcp.googleapis.com/mcp/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "download_file_content", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

Defines a request to download a file's content.

### DownloadFileRequest

| JSON representation |
|---|
| ``` { "fileId": string, "exportMimeType": string } ``` |

| Fields ||
|---|---|
| `fileId` | `string` Required. The ID of the file to retrieve. |
| `exportMimeType` | `string` Optional. For Google native files, the MIME type to export the file to, ignored otherwise. Defaults to text if not specified. |

## Output Schema

The response for a file download request.

### FileContent

| JSON representation |
|---|
| ``` { "id": string, "title": string, "mimeType": string, "content": string } ``` |

| Fields ||
|---|---|
| `id` | `string` The ID of the file. |
| `title` | `string` The title of the file. |
| `mimeType` | `string` The MIME type of the file. |
| `content` | `string` The base64 encoded content of the file. |

### Tool Annotations

Destructive Hint: ❌ \| Idempotent Hint: ✅ \| Read Only Hint: ✅ \| Open World Hint: ❌

## Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/drive`
- `https://www.googleapis.com/auth/drive.appdata`
- `https://www.googleapis.com/auth/drive.file`
- `https://www.googleapis.com/auth/drive.meet.readonly`
- `https://www.googleapis.com/auth/drive.metadata`
- `https://www.googleapis.com/auth/drive.metadata.readonly`
- `https://www.googleapis.com/auth/drive.photos.readonly`
- `https://www.googleapis.com/auth/drive.readonly`