
Google Drive
Available ActionsEach successful request consumes credits as outlined below.
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
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupcurl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "697bb62731d2bd755ac04037",
"parameters": {
"action": "search_files",
"trashed": false,
"page_size": 25,
"order_by": "modifiedTime desc",
"include_shared_drives": true
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "697bb62731d2bd755ac04037",
"parameters": {
"action": "search_files",
"trashed": false,
"page_size": 25,
"order_by": "modifiedTime desc",
"include_shared_drives": true
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "697bb62731d2bd755ac04037",
parameters: {
"action": "search_files",
"trashed": false,
"page_size": 25,
"order_by": "modifiedTime desc",
"include_shared_drives": true
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "697bb62731d2bd755ac04037",
parameters: {
"action": "search_files",
"trashed": false,
"page_size": 25,
"order_by": "modifiedTime desc",
"include_shared_drives": true
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
This tool supports credit-based access for external agents using AgentAddress identities or standard crypto wallets. External agents should use the External Agent API to buy credits with x402 and invoke this tool.
1. Buy Credits
Purchase credits via x402 payment (500 credit minimum, 100 credits = $1).
# Request payment requirements (returns 402 + PAYMENT-REQUIRED header)
curl -i -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'
# Sign the EIP-3009 authorization, then retry with signature header
curl -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64-json>" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'2. Create a Session Nonce (nonce used in signed balance/invoke)
curl -s -X POST "https://www.agentpmt.com/api/external/auth/session" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET" }'3. Invoke This Tool
Sign the message with your wallet (EIP-191 personal-sign), then POST to the invoke endpoint.
# Sign this message (wallet MUST be lowercased):
# agentpmt-external
# wallet:0xyourwallet...
# session:<session_nonce>
# request:<request_id>
# action:invoke
# product:697bb62731d2bd755ac04037
# payload:<sha256(canonical_json(parameters))>
curl -s -X POST "https://www.agentpmt.com/api/external/tools/697bb62731d2bd755ac04037/invoke" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xYOUR_WALLET",
"session_nonce": "<session_nonce>",
"request_id": "invoke-uuid",
"signature": "0x<signature>",
"parameters": {
"action": "your_action",
"your_param": "value"
}
}'Credentials
Manage credentials in your dashboard.
Actions(12)
search_files5cr10 paramsSearch for files and folders in Google Drive by text, MIME type, or folder location.
search_files5cr10 paramsSearch for files and folders in Google Drive by text, MIME type, or folder location.
querystringPlain-text search matched against full text and file name
raw_querystringAdvanced Drive query string (q=...). If provided, overrides query and other filters.
mime_typestringFilter by MIME type. Accepts aliases: folder, document, spreadsheet, presentation, drawing. Or a full MIME type string.
folder_idstringRestrict to a specific folder by ID. Use 'root' for My Drive root.
folder_pathstringRestrict to a folder by path (e.g., 'Projects/Client A'), resolved under folder_id or root.
trashedbooleanIf true, include trashed items (default false)
falsepage_sizeintegerMax results per page (default 25, max 1000)
25page_tokenstringPagination token from a previous response
order_bystringDrive orderBy string (default 'modifiedTime desc')
modifiedTime descinclude_shared_drivesbooleanInclude items from shared drives (default true)
trueget_file_metadata5cr2 params(1 required)Retrieve metadata for a specific file or folder.
get_file_metadata5cr2 params(1 required)Retrieve metadata for a specific file or folder.
file_idrequiredstringDrive file or folder ID
include_shared_drivesbooleanInclude shared drives (default true)
truedownload_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_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).
file_idrequiredstringDrive file ID to download
export_formatstringOverride export format for Google Workspace files
output_filenamestringOverride the stored filename
max_bytesintegerSafety limit for download size in bytes (default 25 MiB, max 250 MiB)
26214400expiration_daysintegerDays until the stored file expires (default 7, range 1-7)
7acknowledge_abusebooleanAllow downloading files flagged as abusive (non-Google files only, default false)
falseinclude_shared_drivesbooleanInclude shared drives (default true)
trueupload_file_from_storage5cr11 paramsUpload 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_file_from_storage5cr11 paramsUpload 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_idstringAgentPMT storage file_id to upload into Drive
source_file_urlstringPublic URL to fetch and upload into Drive
source_content_base64stringBase64-encoded content to upload into Drive
filenamestringFilename for the uploaded file (required with source_content_base64, optional otherwise)
content_typestringMIME type override for upload (inferred from filename if omitted)
parent_folder_idstringDestination folder ID (provide only one of parent_folder_id or parent_folder_path)
parent_folder_pathstringDestination folder path (e.g., 'Projects/Reports')
create_parent_foldersbooleanAuto-create missing folders in parent_folder_path (default false)
falsefolder_idstringRoot context for resolving parent_folder_path (defaults to My Drive root)
max_upload_bytesintegerSafety limit for upload size in bytes (default 25 MiB, max 250 MiB)
26214400include_shared_drivesbooleanInclude shared drives (default true)
truecreate_folder5cr6 params(1 required)Create a new folder in Google Drive.
create_folder5cr6 params(1 required)Create a new folder in Google Drive.
folder_namerequiredstringName of the new folder
parent_folder_idstringParent folder ID (provide only one of parent_folder_id or parent_folder_path)
parent_folder_pathstringParent folder path
create_parent_foldersbooleanAuto-create missing parent folders (default false)
falsefolder_idstringRoot context for resolving parent_folder_path (defaults to My Drive root)
include_shared_drivesbooleanInclude shared drives (default true)
trueensure_folder_path5cr3 params(1 required)Ensure a full folder path exists, creating any missing segments. Returns the final folder ID.
ensure_folder_path5cr3 params(1 required)Ensure a full folder path exists, creating any missing segments. Returns the final folder ID.
ensure_pathrequiredstringFolder path to ensure (e.g., 'Projects/Client A/Deliverables')
folder_idstringRoot folder ID to resolve path under (defaults to My Drive root)
include_shared_drivesbooleanInclude shared drives (default true)
truemove_file5cr7 params(1 required)Move a file or folder to a different location in Google Drive.
move_file5cr7 params(1 required)Move a file or folder to a different location in Google Drive.
file_idrequiredstringThe file or folder ID to move
destination_folder_idstringDestination folder ID (provide only one of destination_folder_id or destination_folder_path)
destination_folder_pathstringDestination folder path
remove_existing_parentsbooleanRemove the file from its current parent(s) (default true). If false, destination is added as an additional parent.
truecreate_parent_foldersbooleanAuto-create missing folders in destination_folder_path (default false)
falsefolder_idstringRoot context for resolving destination_folder_path
include_shared_drivesbooleanInclude shared drives (default true)
truecopy_file5cr7 params(1 required)Create a copy of a file in Google Drive.
copy_file5cr7 params(1 required)Create a copy of a file in Google Drive.
file_idrequiredstringThe file ID to copy
new_namestringName for the copy
parent_folder_idstringDestination folder ID (provide only one of parent_folder_id or parent_folder_path)
parent_folder_pathstringDestination folder path
create_parent_foldersbooleanAuto-create missing folders (default false)
falsefolder_idstringRoot context for resolving parent_folder_path
include_shared_drivesbooleanInclude shared drives (default true)
truetrash_file5cr2 params(1 required)Move a file or folder to the trash (recoverable).
trash_file5cr2 params(1 required)Move a file or folder to the trash (recoverable).
file_idrequiredstringThe file or folder ID to trash
include_shared_drivesbooleanInclude shared drives (default true)
truedelete_file5cr2 params(1 required)Permanently delete a file or folder (not recoverable).
delete_file5cr2 params(1 required)Permanently delete a file or folder (not recoverable).
file_idrequiredstringThe file or folder ID to permanently delete
include_shared_drivesbooleanInclude shared drives (default true)
trueshare_file5cr5 params(2 required)Share a file or folder by creating a permission.
share_file5cr5 params(2 required)Share a file or folder by creating a permission.
file_idrequiredstringThe file or folder ID to share
permissionrequiredobjectPermission details
permission_type*(string)- Permission typerole*(string)- Permission roleemail(string)- Email for user/group permissions. Also accepts emailAddress as alias.domain(string)- Domain for domain-type permissionsallow_file_discovery(boolean)- For anyone/domain types, allow discovery via search (default false)send_notificationbooleanSend email notification for user/group shares (default true)
trueemail_messagestringCustom message in the notification email
include_shared_drivesbooleanInclude shared drives (default true)
truelist_permissions5cr2 params(1 required)List all permissions on a file or folder.
list_permissions5cr2 params(1 required)List all permissions on a file or folder.
file_idrequiredstringThe file or folder ID
include_shared_drivesbooleanInclude shared drives (default true)
trueUsage Instructions
Usage guidance provided directly by the developer for this product.
Google Drive
Overview
Search, upload, download, organize, and share Google Drive files and folders. Supports My Drive and shared drives, folder path resolution, file export/conversion, and permission management.
Actions
search_files
Search for files and folders in Google Drive by text, MIME type, or folder location.
Required fields: None (returns all non-trashed files by default)
Optional fields:
query(string) - Plain-text search matched against full text and file nameraw_query(string) - Advanced Drive query string (used directly as theqparameter). If provided, overridesqueryand other filtersmime_type(string) - Filter by MIME type. Accepts aliases:folder,document,spreadsheet,presentation,drawing, or a full MIME type stringfolder_id(string) - Restrict to a specific folder by ID. Use"root"for My Drive rootfolder_path(string) - Restrict to a folder by path (e.g.,"Projects/Client A"), resolved underfolder_idor roottrashed(boolean, default: false) - If true, include trashed itemspage_size(integer, default: 25, max: 1000) - Results per pagepage_token(string) - Pagination token from a previous response'snext_page_tokenorder_by(string, default:"modifiedTime desc") - Sort orderinclude_shared_drives(boolean, default: true) - Include items from shared drives
{
"action": "search_files",
"query": "quarterly report",
"mime_type": "document",
"page_size": 10
}
{
"action": "search_files",
"folder_path": "Finance/2026",
"mime_type": "spreadsheet"
}
{
"action": "search_files",
"raw_query": "mimeType='application/pdf' and modifiedTime > '2026-01-01T00:00:00'"
}
get_file_metadata
Retrieve metadata for a specific file or folder.
Required fields:
file_id(string) - The Drive file or folder ID
{
"action": "get_file_metadata",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
}
download_file_to_storage
Download a file from Drive and store it in temporary storage. Google Docs/Sheets/Slides are automatically exported (Docs to PDF, Sheets to XLSX, Slides to PPTX by default).
Required fields:
file_id(string) - The Drive file ID
Optional fields:
export_format(string, enum:pdf,txt,html,docx,xlsx,pptx,odt,rtf,epub,zip,csv,tsv) - Override the export format for Google Workspace filesoutput_filename(string) - Override the stored filenamemax_bytes(integer, default: 26214400 / 25 MiB, max: 262144000 / 250 MiB) - Safety limit for download sizeexpiration_days(integer, default: 7, range: 1-7) - Days until the stored file expiresacknowledge_abuse(boolean, default: false) - Allow downloading files flagged as abusive (non-Google files only)
{
"action": "download_file_to_storage",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"export_format": "docx"
}
{
"action": "download_file_to_storage",
"file_id": "1abc123def456",
"output_filename": "invoice_march.pdf",
"expiration_days": 3
}
upload_file_from_storage
Upload a file into Google Drive. Provide exactly one source. Files under 10 MiB use multipart upload; larger files use resumable upload automatically.
Required fields (exactly one):
source_content_base64(string) - Base64-encoded file content. Requiresfilenamesource_file_url(string) - Public URL to fetch content fromsource_file_id(string) - File ID from AgentPMT storage (from a previous download or upload)
Optional fields:
filename(string) - Filename for the uploaded file (required withsource_content_base64, optional otherwise)content_type(string) - MIME type override (inferred from filename if omitted)parent_folder_id(string) - Destination folder ID (provide only one ofparent_folder_idorparent_folder_path)parent_folder_path(string) - Destination folder path (e.g.,"Projects/Reports")create_parent_folders(boolean, default: false) - Auto-create missing folders inparent_folder_pathmax_upload_bytes(integer, default: 26214400 / 25 MiB, max: 262144000 / 250 MiB) - Safety limit for upload size
Local file paths are NOT supported. You cannot pass a filesystem path.
{
"action": "upload_file_from_storage",
"source_content_base64": "SGVsbG8gV29ybGQh",
"filename": "greeting.txt",
"parent_folder_path": "Documents/Notes",
"create_parent_folders": true
}
{
"action": "upload_file_from_storage",
"source_file_url": "https://example.com/report.pdf",
"filename": "annual_report_2026.pdf",
"parent_folder_id": "1AbCdEfGhIjKlMnOpQrStUvWxYz"
}
{
"action": "upload_file_from_storage",
"source_file_id": "storage_abc123",
"parent_folder_path": "Backups"
}
create_folder
Create a new folder in Google Drive.
Required fields:
folder_name(string) - Name of the new folder
Optional fields:
parent_folder_id(string) - Parent folder ID (provide only one ofparent_folder_idorparent_folder_path)parent_folder_path(string) - Parent folder pathcreate_parent_folders(boolean, default: false) - Auto-create missing parent foldersfolder_id(string) - Root context for resolvingparent_folder_path(defaults to My Drive root)
{
"action": "create_folder",
"folder_name": "March Invoices",
"parent_folder_path": "Finance/2026",
"create_parent_folders": true
}
ensure_folder_path
Ensure a full folder path exists, creating any missing segments. Returns the final folder ID.
Required fields:
ensure_path(string) - Folder path to ensure (e.g.,"Projects/Client A/Deliverables")
Optional fields:
folder_id(string) - Root folder ID to resolve path under (defaults to My Drive root)
{
"action": "ensure_folder_path",
"ensure_path": "Projects/Client A/Deliverables/Q1"
}
move_file
Move a file or folder to a different location.
Required fields:
file_id(string) - The file or folder ID to move- One of:
destination_folder_id(string) ordestination_folder_path(string)
Optional fields:
remove_existing_parents(boolean, default: true) - If true, removes the file from its current parent(s). If false, the destination is added as an additional parentcreate_parent_folders(boolean, default: false) - Auto-create missing folders indestination_folder_pathfolder_id(string) - Root context for resolvingdestination_folder_path
{
"action": "move_file",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"destination_folder_path": "Archive/2025"
}
copy_file
Create a copy of a file.
Required fields:
file_id(string) - The file ID to copy
Optional fields:
new_name(string) - Name for the copyparent_folder_id(string) - Destination folder ID (provide only one ofparent_folder_idorparent_folder_path)parent_folder_path(string) - Destination folder pathcreate_parent_folders(boolean, default: false) - Auto-create missing folders
{
"action": "copy_file",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"new_name": "Budget 2026 (Copy)",
"parent_folder_path": "Finance/Templates"
}
trash_file
Move a file or folder to the trash (recoverable).
Required fields:
file_id(string) - The file or folder ID to trash
{
"action": "trash_file",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
}
delete_file
Permanently delete a file or folder (not recoverable).
Required fields:
file_id(string) - The file or folder ID to delete
{
"action": "delete_file",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
}
share_file
Share a file or folder by creating a permission.
Required fields:
file_id(string) - The file or folder ID to sharepermission(object) - Permission details:type(string, enum:user,group,domain,anyone) - Permission typerole(string, enum:reader,commenter,writer,organizer,fileOrganizer) - Permission roleemail(string) - Required foruserorgrouptypes. Also acceptsemailAddressas aliasdomain(string) - Required fordomaintypeallow_file_discovery(boolean, default: false) - Foranyone/domaintypes, allow discovery via search
Optional fields:
send_notification(boolean, default: true) - Send email notification (only foruser/grouptypes)email_message(string) - Custom message in the notification email
{
"action": "share_file",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"permission": {
"type": "user",
"role": "writer",
"email": "colleague@example.com"
},
"email_message": "Here is the project document for your review."
}
{
"action": "share_file",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"permission": {
"type": "anyone",
"role": "reader"
},
"send_notification": false
}
list_permissions
List all permissions on a file or folder.
Required fields:
file_id(string) - The file or folder ID
{
"action": "list_permissions",
"file_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
}
Common Workflows
1. Organize uploaded content into a folder structure
- Use
ensure_folder_pathwithensure_path: "Projects/Client B/Assets"to create the full path - Use
upload_file_from_storagewithsource_file_urlorsource_content_base64and setparent_folder_path: "Projects/Client B/Assets" - Use
share_fileto grant the client read access
2. Download a Google Doc, convert, and reshare
- Use
search_fileswithquery: "proposal draft"andmime_type: "document"to find the file - Use
download_file_to_storagewith thefile_idandexport_format: "docx"to get a Word version - The returned storage file ID can be used with other tools or re-uploaded elsewhere
3. Archive old files to a subfolder
- Use
search_fileswithfolder_path: "Active Projects"to list files - Use
ensure_folder_pathwithensure_path: "Archive/2025"to ensure the archive folder exists - Use
move_filefor each file, settingdestination_folder_path: "Archive/2025"
Important Notes
- MIME type aliases: Use
folder,document,spreadsheet,presentation, ordrawinginstead of full MIME strings when filtering searches - Folder path resolution: Paths use
/separators (e.g.,"Projects/Client A/Reports"). If a path segment matches multiple folders with the same name, the tool prefers the exact case match. If truly ambiguous, it returns candidate IDs so you can use the direct folder ID instead - Download size limits: Default 25 MiB, max 250 MiB. Increase
max_bytesfor larger files - Upload size limits: Default 25 MiB, max 250 MiB. Increase
max_upload_bytesfor larger files - Google Workspace exports: Google Docs export to PDF by default, Sheets to XLSX, Slides to PPTX, Drawings to PDF. Override with
export_format - Shared drives: Included by default (
include_shared_drives: true). Set to false to exclude - Trash vs delete:
trash_fileis recoverable;delete_fileis permanent - Upload sources: Provide exactly one of
source_file_id,source_file_url, orsource_content_base64. Local filesystem paths are not supported - Downloaded files are stored temporarily and expire after
expiration_days(default 7, max 7) - Pagination: When results exceed
page_size, the response includesnext_page_token. Pass it aspage_tokenin the next request to get the next page
About The Developer

Apoth3osis
Joined Agent Payment: August 14, 2025
We build tools that enable AI agents to excel in the mathematical realm.
Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.





