Prerequisites
- A Google account with Google Drive access
- A Google Workspace connection in AgentRuntime (OAuth via the Google account card on Connections)
- project_contributor access in your workspace
Connect in AgentRuntime
Connect Google
On Connections, use the Google account card and complete OAuth. See Google Workspace setup and Connections.
Enable Drive
On your Google connection, enable the Drive service so the account exposes Drive API scopes.
Add google-drive MCP instance
Go to MCP, click Add instance for google-drive. Open Instance config, wire your Google connection, and set the profile active.
What you can build
- Invoice archive — gmail attachment webhook →
upload_filetoInvoices/{{year}}folder → google-sheets log file ID and vendor. - Client deliverable handoff — google-docs finished doc →
save_file_as_pdf→set_public_accessoradd_permissionfor client email → notify via gmail. - Shared drive janitor — Schedule trigger →
search_filesfor stale MIME types →move_fileto archive folder →trash_fileon duplicates after human_task. - Backup mirror —
list_fileswith recursion →read_file→ upload to amazon-s3 or duplicate to backup folder withduplicate_file.
Tools
Search & read
| Tool | Description |
|---|---|
search_files | Search Google Drive files and folders by name, full text, or MIME type. |
list_files | List files in a Google Drive folder, with optional recursion into subfolders. |
get_file_by_id | Get Google Drive file or folder metadata by file ID. |
read_file | Read a Drive file and return base64 content, exporting Google Docs, Sheets, and Slides when needed. |
save_file_as_pdf | Export a Google document as PDF and save the PDF into Drive. |
Create & upload
| Tool | Description |
|---|---|
create_folder | Create an empty folder in Google Drive. |
create_text_file | Create a text file in Google Drive from inline text content. |
upload_file | Upload a base64-encoded file to Google Drive. |
duplicate_file | Copy a Google Drive file into a target folder. |
Permissions & sharing
| Tool | Description |
|---|---|
add_permission | Grant a Drive permission to a user on a file or folder. |
delete_permission | Remove a Drive permission from a file or folder. |
set_public_access | Make a Drive file or folder accessible to anyone with the link. |
Organize & delete
| Tool | Description |
|---|---|
move_file | Move a Drive file from its current parent folders to a new folder. |
trash_file | Move a Drive file to trash. |
delete_file | Permanently delete a Drive file without sending it to trash. |
Example
Upload a generated report PDF to a client folder:Troubleshooting
| Issue | Fix |
|---|---|
| Reconnect prompt on Google connection | Re-authorize OAuth; Drive scopes may have been revoked |
| File not found in shared drive | Set include_team_drives: true on search, list, and move operations |
read_file returns empty or wrong type | Google-native files are exported automatically; confirm the file ID and MIME type |
Permission denied on move_file | Caller needs writer access on source and destination; use get_file_by_id to verify parents |