KosmoKrator

productivity

Google Drive MCP, CLI, and Lua Integration for AI Agents

Google Drive integration docs for AI agents: MCP gateway setup, Google Drive CLI commands, Lua API reference, credentials, and function schemas.

15 functions 13 read 2 write OAuth browser flow auth

Google Drive for agents

OAuth can be configured in web hosts through redirect and in CLI hosts through local/device authorization; runtime works with stored tokens.

Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.

Machine-Readable Metadata
integration_slug
google_drive
route_slug
google/google-drive
package
google
auth_strategy
oauth2_authorization_code OAuth browser flow
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
false

Quick Links

Google Drive MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Google Drive.

Google Drive CLI Matrix

Use these pages for direct Google Drive CLI workflows in scripts, CI, cron, and agent wrappers.

Function Catalog

FunctionTypeParametersDescription
google_drive.google_drive_copy Read read 3 Duplicate a file in Google Drive.
google_drive.google_drive_create_file Write write 3 Create an empty Google Doc, Sheet, or Presentation in Google Drive.
google_drive.google_drive_create_folder Write write 2 Create a folder in Google Drive.
google_drive.google_drive_delete Read read 1 Permanently delete a file from Google Drive (irreversible).
google_drive.google_drive_move Read read 2 Move a file to a different folder in Google Drive.
google_drive.google_drive_rename Read read 2 Rename a file or folder in Google Drive.
google_drive.google_drive_get_file Read read 2 Get file metadata by ID from Google Drive. For Google Docs/Sheets/Slides, use `export_as` to get content as text, csv, or markdown.
google_drive.google_drive_list_permissions Read read 1 List all permissions (sharing settings) on a Google Drive file or folder.
google_drive.google_drive_search_files Read read 4 Search for files in Google Drive using Drive query syntax (default: 20 results, max: 100). Trashed files are excluded by default. Drive query syntax examples: - By name: `name contains 'budget'` or `name = 'Q1 Report'` - By type: `mimeType = 'application/vnd.google-apps.spreadsheet'` (also: document, presentation, folder) - In folder: `'FOLDER_ID' in parents` - Recent: `modifiedTime > '2026-01-01'` - Shared with me: `sharedWithMe = true` - Starred: `starred = true` - By owner: `'[email protected]' in owners` - Combine: `name contains 'report' and mimeType = 'application/vnd.google-apps.spreadsheet'`
google_drive.google_drive_share_file Read read 6 Share a Google Drive file or folder. Provide `fileId`, `role` ("reader", "writer", "commenter"), and one of: - `email`: share with a specific user (e.g., "[email protected]") - `domain`: share with an entire domain (e.g., "example.com") - `type` set to `"anyone"`: make accessible to anyone with the link (no email/domain needed) - `notify` (optional, default true): send email notification (only for email shares)
google_drive.google_drive_unshare_file Read read 2 Remove a permission from a Google Drive file or folder. Use google_drive_list_permissions first to find the permission ID.
google_drive.google_drive_star Read read 1 Mark a file as starred/favorite in Google Drive.
google_drive.google_drive_trash Read read 1 Move a file to trash in Google Drive (reversible).
google_drive.google_drive_unstar Read read 1 Remove star from a file in Google Drive.
google_drive.google_drive_untrash Read read 1 Restore a file from trash in Google Drive.