get_file_url
Generate a short-lived presigned S3 URL to download or preview a file from the user's Drive. The URL embeds the correct Content-Type and Content-Disposition headers, and the actual transfer happens directly between the client and S3 (no data transfer cost on this endpoint).
get_file_url
When to use
Generate a short-lived presigned S3 URL to download or preview a file from the user's Drive. The URL embeds the correct Content-Type and Content-Disposition headers, and the actual transfer happens directly between the client and S3 (no data transfer cost on this endpoint).
Parameters to validate before calling
file_token (string, required) — The file token (UUID) of the file to generate a URL for. Get via fetch_files.
mode (string, optional) — one of: preview, download — URL behavior: "preview" (inline, default) opens the file in the browser; "download" forces a file attachment download.
expires_in (number, optional) — range: 60–3600 — URL lifetime in seconds. Range: 60-3600. Default: 900 (15 minutes).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_token": "<file_token>"
},
"name": "get_file_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | URL behavior: "preview" (inline, default) opens the file in the browser; "download" forces a file attachment download. | |
| expires_in | No | URL lifetime in seconds. Range: 60-3600. Default: 900 (15 minutes). | |
| file_token | Yes | The file token (UUID) of the file to generate a URL for. Get via fetch_files. |