AgentPMT
Google Drive

Google Drive

Function

Available ActionsEach successful request consumes credits as outlined below.

search_files5crget_file_metadata5crdownload_file_to_storage5crupload_file_from_storage5crcreate_folder5crensure_folder_path5crmove_file5crcopy_file5crtrash_file5crdelete_file5crshare_file5crlist_permissions5cr

Details

Give your AI agent access to Google Drive for seamless file management, organization, and collaboration. Search across your Drive to find files by name or content, download files to AgentPMT storage for processing, and upload new files back to Drive from AgentPMT storage or public URLs. Create folder structures with automatic path creation, move and copy files between folders, and manage sharing permissions to collaborate with others. Export Google Docs, Sheets, and Slides to formats like PDF, DOCX, or XLSX. This tool is essential for agents that need to work with documents stored in Drive, automate file organization, sync content between systems, or manage document workflows. All operations run securely through your connected Google OAuth account with support for both personal Drive and shared drives.

Use Cases

Search Drive files by name or content, Download files to AgentPMT storage for processing, Upload files to Drive from AgentPMT storage, Create folder structures and organize files, Move and copy files between folders, Share files and manage permissions, Export Google Docs to PDF or DOCX, Sync files between Drive and other systems, Automate document organization workflows, Manage shared drive content

Credentials

Google OAuth *
Connect your Google account.
oauth token

Manage credentials in your dashboard.

Actions(12)

search_files5cr10 params

Search for files and folders in Google Drive by text, MIME type, or folder location.

Search for files and folders in Google Drive by text, MIME type, or folder location.

querystring

Plain-text search matched against full text and file name

raw_querystring

Advanced Drive query string (q=...). If provided, overrides query and other filters.

mime_typestring

Filter by MIME type. Accepts aliases: folder, document, spreadsheet, presentation, drawing. Or a full MIME type string.

folder_idstring

Restrict to a specific folder by ID. Use 'root' for My Drive root.

folder_pathstring

Restrict to a folder by path (e.g., 'Projects/Client A'), resolved under folder_id or root.

trashedboolean

If true, include trashed items (default false)

Default: false
page_sizeinteger

Max results per page (default 25, max 1000)

Default: 25
Range: 1 - 1000
page_tokenstring

Pagination token from a previous response

order_bystring

Drive orderBy string (default 'modifiedTime desc')

Default: modifiedTime desc
include_shared_drivesboolean

Include items from shared drives (default true)

Default: true
get_file_metadata5cr2 params(1 required)

Retrieve metadata for a specific file or folder.

Retrieve metadata for a specific file or folder.

file_idrequiredstring

Drive file or folder ID

include_shared_drivesboolean

Include shared drives (default true)

Default: true
download_file_to_storage5cr7 params(1 required)

Download a file from Drive and store it in temporary AgentPMT storage. Google Docs/Sheets/Slides are automatically exported (Docs to PDF, Sheets to XLSX, Slides to PPTX by default).

Download a file from Drive and store it in temporary AgentPMT storage. Google Docs/Sheets/Slides are automatically exported (Docs to PDF, Sheets to XLSX, Slides to PPTX by default).

file_idrequiredstring

Drive file ID to download

export_formatstring

Override export format for Google Workspace files

Values:
pdftxthtmldocxxlsxpptxodtrtfepubzipcsvtsv
output_filenamestring

Override the stored filename

max_bytesinteger

Safety limit for download size in bytes (default 25 MiB, max 250 MiB)

Default: 26214400
Range: 1 - 262144000
expiration_daysinteger

Days until the stored file expires (default 7, range 1-7)

Default: 7
Range: 1 - 7
acknowledge_abuseboolean

Allow downloading files flagged as abusive (non-Google files only, default false)

Default: false
include_shared_drivesboolean

Include shared drives (default true)

Default: true
upload_file_from_storage5cr11 params

Upload a file into Google Drive. Provide exactly one source: source_content_base64 (requires filename), source_file_url, or source_file_id. Local file paths are NOT supported.

Upload a file into Google Drive. Provide exactly one source: source_content_base64 (requires filename), source_file_url, or source_file_id. Local file paths are NOT supported.

source_file_idstring

AgentPMT storage file_id to upload into Drive

source_file_urlstring

Public URL to fetch and upload into Drive

source_content_base64string

Base64-encoded content to upload into Drive

filenamestring

Filename for the uploaded file (required with source_content_base64, optional otherwise)

content_typestring

MIME type override for upload (inferred from filename if omitted)

parent_folder_idstring

Destination folder ID (provide only one of parent_folder_id or parent_folder_path)

parent_folder_pathstring

Destination folder path (e.g., 'Projects/Reports')

create_parent_foldersboolean

Auto-create missing folders in parent_folder_path (default false)

Default: false
folder_idstring

Root context for resolving parent_folder_path (defaults to My Drive root)

max_upload_bytesinteger

Safety limit for upload size in bytes (default 25 MiB, max 250 MiB)

Default: 26214400
Range: 1 - 262144000
include_shared_drivesboolean

Include shared drives (default true)

Default: true
create_folder5cr6 params(1 required)

Create a new folder in Google Drive.

Create a new folder in Google Drive.

folder_namerequiredstring

Name of the new folder

parent_folder_idstring

Parent folder ID (provide only one of parent_folder_id or parent_folder_path)

parent_folder_pathstring

Parent folder path

create_parent_foldersboolean

Auto-create missing parent folders (default false)

Default: false
folder_idstring

Root context for resolving parent_folder_path (defaults to My Drive root)

include_shared_drivesboolean

Include shared drives (default true)

Default: true
ensure_folder_path5cr3 params(1 required)

Ensure a full folder path exists, creating any missing segments. Returns the final folder ID.

Ensure a full folder path exists, creating any missing segments. Returns the final folder ID.

ensure_pathrequiredstring

Folder path to ensure (e.g., 'Projects/Client A/Deliverables')

folder_idstring

Root folder ID to resolve path under (defaults to My Drive root)

include_shared_drivesboolean

Include shared drives (default true)

Default: true
move_file5cr7 params(1 required)

Move a file or folder to a different location in Google Drive.

Move a file or folder to a different location in Google Drive.

file_idrequiredstring

The file or folder ID to move

destination_folder_idstring

Destination folder ID (provide only one of destination_folder_id or destination_folder_path)

destination_folder_pathstring

Destination folder path

remove_existing_parentsboolean

Remove the file from its current parent(s) (default true). If false, destination is added as an additional parent.

Default: true
create_parent_foldersboolean

Auto-create missing folders in destination_folder_path (default false)

Default: false
folder_idstring

Root context for resolving destination_folder_path

include_shared_drivesboolean

Include shared drives (default true)

Default: true
copy_file5cr7 params(1 required)

Create a copy of a file in Google Drive.

Create a copy of a file in Google Drive.

file_idrequiredstring

The file ID to copy

new_namestring

Name for the copy

parent_folder_idstring

Destination folder ID (provide only one of parent_folder_id or parent_folder_path)

parent_folder_pathstring

Destination folder path

create_parent_foldersboolean

Auto-create missing folders (default false)

Default: false
folder_idstring

Root context for resolving parent_folder_path

include_shared_drivesboolean

Include shared drives (default true)

Default: true
trash_file5cr2 params(1 required)

Move a file or folder to the trash (recoverable).

Move a file or folder to the trash (recoverable).

file_idrequiredstring

The file or folder ID to trash

include_shared_drivesboolean

Include shared drives (default true)

Default: true
delete_file5cr2 params(1 required)

Permanently delete a file or folder (not recoverable).

Permanently delete a file or folder (not recoverable).

file_idrequiredstring

The file or folder ID to permanently delete

include_shared_drivesboolean

Include shared drives (default true)

Default: true
share_file5cr5 params(2 required)

Share a file or folder by creating a permission.

Share a file or folder by creating a permission.

file_idrequiredstring

The file or folder ID to share

permissionrequiredobject

Permission details

Properties:
permission_type*(string)- Permission type
role*(string)- Permission role
email(string)- Email for user/group permissions. Also accepts emailAddress as alias.
domain(string)- Domain for domain-type permissions
allow_file_discovery(boolean)- For anyone/domain types, allow discovery via search (default false)
send_notificationboolean

Send email notification for user/group shares (default true)

Default: true
email_messagestring

Custom message in the notification email

include_shared_drivesboolean

Include shared drives (default true)

Default: true
list_permissions5cr2 params(1 required)

List all permissions on a file or folder.

List all permissions on a file or folder.

file_idrequiredstring

The file or folder ID

include_shared_drivesboolean

Include shared drives (default true)

Default: true

Frequently Asked Questions

How do I connect this tool to an external agent?

Install commands

npm install -g @agentpmt/mcp-router
agentpmt-setup

Hosted MCP config

{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}

How does an external agent use this tool?

Agent prompt

Call the AgentPMT-Tool-Search-and-Execution tool with action 'get_schema' and tool_id 697bb62731d2bd755ac04037 ("Google Drive"). Then call the same tool with action 'call_tool', tool_id 697bb62731d2bd755ac04037, and the parameters needed for my request.

Workflows Using This Tool

Workflow
Saves ~45 min
Document OCR Agent
Google Drive
MarkItDown Hosted Markdown Generator
Automatically redline any signed contract or agreement against its original and produce an exhaustive change report before counter-signing. Upload the returned signed document (PDF, DOCX, or scanned image), name the original stored in Google Drive (DOCX or native Google Doc), and the workflow OCRs the signed copy, locates and downloads the original from Drive, converts both to clean text, and surfaces every difference categorized by type: substantive wording and clause changes with section numbers and side-by-side quotes, filled-in fields such as parties, effective dates, dollar amounts, addresses, and signer names and titles, signature block label differences, DocuSign and other e-signature artifacts, OCR rendering artifacts to ignore, and shared typos worth fixing in the original. Built for legal contract review, NDA comparison, MSA and SOW intake, vendor agreement onboarding, employment offer letter audits, partnership and referral agreement review, sales contract redlining, real estate purchase agreement comparison, insurance policy diff, lease and rental agreement review, and any returned-document intake workflow where you need to know exactly what changed before filing or counter-signing. Eliminates manual side-by-side reading, accelerates legal and operations review cycles, and prevents accidental acceptance of unfavorable revisions hidden inside a returned signed document.

Looking for help integrating AI into your business? Set up a free consultation.