TrekMail TrekMail

Drive MCP Tools Overview

This guide explains Overview of the 38 Drive MCP tools and how agents use them for uploads, sharing, bulk operations, and add-on reads. so you can complete the TrekMail task with confidence.

Article details

Type, difficulty, plans, and last updated info.

Type
Reference
Difficulty
Intermediate
Plans
Starter · Pro · Agency · + Drive Add-on
Last updated
May 9, 2026

The TrekMail MCP server exposes TrekMail to AI agents as structured tools. With the Drive update, the server includes 38 Drive tools for file storage automation and 181 tools total across infrastructure, messages, migrations, verifier, support, Cloudflare DNS, and Drive.

MCP is usually easier than raw REST for agents. Instead of asking an agent to build HTTP requests, you give it tools such as drive_file_upload, drive_share_create, or drive_bulk_move. The API still enforces token scopes, idempotency, audit logging, and safety gates behind the scenes.

Tool coverage

Tool group Tools What agents can do
Spaces and usage drive_spaces_list, drive_storage_summary, drive_space_usage Discover Account Drive, allowed mailbox spaces, and quota status
Browse and select drive_browse_folder, drive_folder_tree, drive_select_all_ids Navigate folders and prepare bulk operations safely
Files drive_file_get, drive_file_download_url, drive_file_rename, drive_file_move, drive_file_trash, drive_file_restore, drive_file_purge Read metadata, download, rename, move, trash, restore, or permanently purge a file
Folders drive_folder_create, drive_folder_update, drive_folder_move, drive_folder_trash, drive_folder_restore, drive_folder_purge Create and manage folder trees
Team sharing drive_folder_share_with_account, drive_folder_stop_sharing Make a top-level folder visible to all mailboxes, or stop account-wide visibility
Trash drive_trash_list, drive_trash_empty Review trash or permanently clear it when the destructive gate is enabled
Bulk operations drive_bulk_trash, drive_bulk_restore, drive_bulk_move, drive_bulk_purge Move, trash, restore, or purge up to 5,000 selected items
Public links drive_share_create, drive_share_list, drive_share_revoke Create expiring/capped download links and revoke them later
Uploads drive_file_upload, drive_upload_initiate, drive_upload_complete, drive_upload_refresh_parts, drive_upload_abort Upload local files with a simple wrapper, or drive the multipart flow manually
Add-on status drive_addon_get, drive_addon_pricing, drive_addon_cancellation_preview Read storage add-on state and pricing without changing billing

Token requirements

Drive MCP tools use the ops token environment variable:

TREKMAIL_API_TOKEN=tm_live_your_token

The token must include matching Drive scopes. For example, drive_share_create requires a share scope for the file's Drive space. drive_file_purge requires a purge scope and the destructive tools gate.

You can run Drive tools alongside message tools by also providing TREKMAIL_MESSAGE_TOKEN. The two token families remain separate.

Safety gates

Destructive Drive tools are disabled unless TREKMAIL_ALLOW_DESTRUCTIVE=true. This includes permanent purge and empty-trash operations. Normal trash operations are still mutating, so they require write scopes, but they are recoverable and do not require purge scopes.

Sending email and migration write operations have separate gates. Turning on Drive destructive tools does not automatically enable sending or migration writes.

Uploads through MCP

For most workflows, use drive_file_upload. It reads a local file from the MCP host, requests upload instructions, sends the file to the returned upload URL, completes the upload, and aborts the reservation if something fails.

Low-level tools remain available when an integration needs more control, for example when file bytes are coming from another service or a custom transfer process.

Share links through MCP

Use drive_share_create to create a public download URL. Set expires_at and max_downloads whenever the link leaves your organization. Use drive_share_revoke when a link should stop working. The raw token is shown only on creation, so agents should return the full public URL immediately.

Billing boundary

The add-on tools are read-only: drive_addon_get, drive_addon_pricing, and drive_addon_cancellation_preview. Agents cannot buy, resize, or cancel the Drive Add-on through MCP. Those actions remain dashboard-only and user-controlled.

Related articles

Jump to nearby guides that continue the workflow.

We use cookies for essential functionality. No ads, no ad tracking.

or
or

Reset email sent

If an account exists for this email, we've sent password reset instructions.

By continuing, you agree to TrekMail's Terms and Privacy Policy.