MCP Reference: drivemcp.googleapis.com

A Model Context Protocol (MCP) server acts as a proxy between an external service that provides context, data, or capabilities to a Large Language Model (LLM) or AI application. MCP servers connect AI applications to external systems such as databases and web services, translating their responses into a format that the AI application can understand.

MCP Tools

An MCP tool is a function or executable capability that an MCP server exposes to a LLM or AI application to perform an action in the real world.

The drivemcp.googleapis.com MCP server has the following tools:

MCP Tools

Call this tool to create or upload a File to Google Drive.

If uploading a file, the content needs to be base64 encoded into the content field regardless of the mimetype of the file being uploaded.

Returns a single File object upon successful creation.

The following Google Drive first-party mime types can be created without providing content:

  • application/vnd.google-apps.document
  • application/vnd.google-apps.spreadsheet
  • application/vnd.google-apps.presentation

By default, the following conversions will be made for the following mime types:

  • text/plain to application/vnd.google-apps.document
  • text/csv to application/vnd.google-apps.spreadsheet

To disable conversions for first-party mime types, set disable_conversion_to_google_type to true.

Folders can be created by setting the mime type to application/vnd.google-apps.folder .

Call this tool to download the content of a Drive file as raw binary data (bytes).

If the file is a Google Drive first-party mime type, the exportMimeType field is required and will determine the format of the downloaded file.

If the file is not found, try using other tools like search_files to find the file the user is requesting.

If the user wants a natural language representation of their Drive content, use the read_file_content tool ( read_file_content should be smaller and easier to parse).

Call this tool to list the permissions of a Drive File.

Call this tool to find recent files for a user specified a sort order. Default sort order is recency .

Supported sort orders are:

  • recency : The most recent timestamp from the file's date-time fields.
  • lastModified : The last time the file was modified by anyone.
  • lastModifiedByMe : The last time the file was modified by the user.

The default page size is 10. Utilize next_page_token to paginate through the results.

Call this tool to fetch a natural language representation of a Drive file.

The file content may be incomplete for very large files. The text representation will change over time, so don't make assumptions about the particular format of the text returned by this tool.

Supported Mime Types:

  • application/vnd.google-apps.document
  • application/vnd.google-apps.presentation
  • application/vnd.google-apps.spreadsheet
  • application/pdf
  • application/msword
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.oasis.opendocument.spreadsheet
  • application/vnd.oasis.opendocument.presentation
  • application/x-vnd.oasis.opendocument.text
  • image/png
  • image/jpeg
  • image/jpg

If the file is not found, try using other tools like search_files to find the file the user is requesting using keywords.

Call this tool to search for Drive files given a structured query.

The query field requires the use of query search operators.

A query string contains the following three parts: query_term operator values where:

  • query_term is the query term or field to search upon.
  • operator specifies the condition for the query term.
  • values are the specific values to use to filter your search results.

Query Terms

The following table lists valid query terms with their descriptions:

Query Term Valid operators Usage
title
contains , = , != Title of the file. Surround with single quotes ( ' ). Escape single quotes in queries with \' , such as 'Valentine\'s Day' .
fullText
contains Whether the title or text in the file's content matches. Surround with single quotes ( ' ). Escape single quotes in queries with \' , such as 'Valentine\'s Day' .
mimeType
contains , = , != MIME type of the file. Surround with single quotes ( ' ). Escape single quotes in queries with \' , such as 'Valentine\'s Day' .
modifiedTime
<= , < , = , != , > , >= Date of the last file modification. RFC 3339 format, default time zone is UTC, such as 2012-06-04T12:00:00-08:00 . Fields of type date are not comparable.
viewedByMeTime
<= , < , = , != , > , >= Date that the user last viewed a file. RFC 3339 format, default time zone is UTC, such as 2012-06-04T12:00:00-08:00 . Fields of type date are not comparable.
parentId
= , != Whether the parent equals the specified ID. root can be used to specify the user's "My Drive" that functions as their primary hierarchy.
owner
= , != User who owns the file. me can be used to specify the user that is making the request.
sharedWithMe
= , != Files that are in the user's "Shared with me" collection. All file users are in the file's Access Control List (ACL). Can be either true or false .
createdTime
<= , < , = , != , > , >= Date when the file was created. Use RFC 3339 format, default time zone is UTC, such as 2012-06-04T12:00:00-08:00 .

Query Operators

The following table lists valid query operators:

Operator Usage
contains The content of one string is present in the other.
= The content of a string or boolean is equal to the other.
!= The content of a string or boolean is not equal to the other.
< A value is less than another.
<= A value is less than or equal to another.
> A value is greater than another.
>= A value is greater than or equal to another.
in An element is contained within a collection.
and Return items that match both queries.
or Return items that match either query.
not Negates a search query.
has A collection contains an element matching the parameters.

Some examples of queries include:

  • title contains 'hello' and title contains 'goodbye'
  • modifiedTime > '2024-01-01T00:00:00Z' and (mimeType contains 'image/' or mimeType contains 'video/')
  • parentId = '1234567'
  • fullText contains 'hello'
  • owner = 'test@example.org'
  • sharedWithMe = true
  • owner = 'me' (for files owned by the user)

Utilize next_page_token to paginate through the results. An empty response indicates that there are either no results or no more results to return.

Get MCP tool specifications

To get the MCP tool specifications for all tools in an MCP server, use the tools/list method. The following example demonstrates how to use curl to list all tools and their specifications currently available within the MCP server.

Curl Request
curl  
--location  
 'https://drivemcp.googleapis.com/mcp' 
  
 \ 
--header  
 'content-type: application/json' 
  
 \ 
--header  
 'accept: application/json, text/event-stream' 
  
 \ 
--data  
 '{ 
 "method": "tools/list", 
 "jsonrpc": "2.0", 
 "id": 1 
 }' 
  
Create a Mobile Website
View Site in Mobile | Classic
Share by: