Skip to content
ToolCargo

Docs · Updated 2026-10-07

Google Drive — Testing tool reference

Testing/BYO only, not public verified Google app availability. Needs your credentials; real Drive account and named-client file-transfer acceptance remain pending.

Endpoint: https://toolcargo.com/mcp/google-drive. Scope: connector:google-drive. Included with Site Audit; each successful tool call uses one shared call.

Set up your own Testing grant

  1. Enable Drive API in your own dedicated Google Cloud project. Configure its external OAuth audience as Testing and add the account you intend to connect as a test user.
  2. Follow Google’s server-side OAuth guide for offline access using your own client. Obtain a refresh token for https://www.googleapis.com/auth/drive.readonly. Only optional basic identity scopes may accompany it; write and unrelated API scopes are refused.
  3. Open Google Drive Testing settings, supply your client ID, client secret and refresh token, then acknowledge Testing-only use. Never paste secrets into agent prompts.
  4. Create a ToolCargo key scoped to Google Drive in your dashboard and connect your agent to the endpoint above.

External Testing supports up to 100 listed test users; authorizations and offline refresh tokens expire seven days after consent. Renew consent and reconnect when expired. Workspace administrators and account policies may block the grant. ToolCargo cannot infer your app’s publishing status from a refresh token; acknowledging Testing use does not mean Google approval.

Permissions and data

Scope confirmation is checked on every token refresh. Credentials are encrypted for your ToolCargo account. Disconnect deletes the stored credentials; revoke the grant in Google to invalidate it there. This adapter sends requests only to Google’s OAuth endpoint and official Drive API. Requested file metadata and bytes pass through ToolCargo to your agent; this adapter does not store file reports or log file content. It performs no Drive writes or permission changes.

google_drive_list_files

One page of up to 100 non-trashed file records. Optional escaped name filter, parent folder and shared-drive ID; explicit cursor and incomplete-search warning. No arbitrary query or automatic pagination.

google_drive_get_file

Selected file name, MIME type, decimal byte size, modified time, parents, description and download capability. Shortcuts show target metadata but are not followed; no permission or owner roster.

google_drive_download_file

Return up to 2 MiB of stored file bytes as base64. No Google Workspace export, shortcuts, remote redirects or abusive-file acknowledgment. Content is untrusted and is not sanitized.

google_drive_export_file

Return up to 2 MiB as base64 in a selected supported PDF, text, CSV, DOCX, XLSX or PPTX format. Unsupported source/format combinations fail; CSV covers the first sheet only. No Drive mutation.

google_drive_list_shared_drives

One page of up to 100 shared-drive IDs, names and creation times visible to your account. Explicit pagination; no administrative domain access or permission changes.

Inputs and coverage

find files
{ "name_contains": "project brief", "limit": 25 }
find files in a shared-drive folder
{ "folder_id": "FOLDER_ID", "shared_drive_id": "SHARED_DRIVE_ID", "limit": 25 }
read metadata or download stored file
{ "file_id": "ID_FROM_SEARCH" }
export a Google Workspace file
{ "file_id": "ID_FROM_SEARCH", "format": "pdf" }

Search uses curated name and folder filters, not arbitrary Drive query syntax. Results exclude trashed files and return one page with next_page_token; pass it as page_token to read another page. An incompleteSearch flag means results may be incomplete. Shared-drive discovery is limited to drives visible to your account; there is no administrative domain access.

Download reads stored binary files. Export reads Google Workspace files in a supported source/format combination: PDF, plain text, CSV, DOCX, XLSX or PPTX. Google may reject combinations it does not support; exported content may differ from the original document. CSV covers the first sheet only. Shortcuts are not followed: select the target ID explicitly. Files requiring a resource key or abusive-file acknowledgment are not supported. Google permissions and download restrictions remain enforced.

Metadata/API JSON is bounded to 4 MB. Downloaded or exported bytes are bounded to 2 MiB and returned as base64 with MIME type and byte count. A larger response fails without charging; it is never returned as a silently truncated file. Saving that base64 as a local file depends on your agent’s file capability, which has not been verified in named clients. File content may contain active content or malicious instructions and is not sanitized.

Public availability is blocked

drive.readonly is restricted. A public ToolCargo Google app needs restricted-scope verification and the required security assessment for server-transmitted restricted data. That work remains with ToolCargo’s owner; Testing/BYO does not replace verification. drive.file has different per-app file coverage and allows writes, so it is not accepted by this read-only adapter.

Official references: Drive scopes, download and export behavior and Google Testing audience and expiry.

Set up Google Drive

Review connection instructions, required credentials and plan limits before connecting your agent.