sheets-mcp docs
Tools

Drive Tools

manage_drive — search your Drive and convert files to native Google Spreadsheets.

manage_drive

Two actions: search and convert_to_spreadsheet.


Searches Google Drive for files matching a query. Automatically excludes trashed files (and trashed=false is always appended).

ParameterTypeRequiredDescription
action"search"
querystring✓ for searchDrive search query string

Returns up to 20 files per call (hardcoded pageSize: 20).

Response

{
  "files": [
    {
      "id": "1a2B3cD4eF5g",
      "name": "sales_q2.csv",
      "mimeType": "text/csv",
      "webViewLink": "https://drive.google.com/file/d/...",
      "createdTime": "2026-04-01T10:00:00.000Z"
    }
  ]
}

Drive query syntax

The query field uses the Drive Files API query syntax:

GoalQuery
Find by namename contains 'report.csv'
Find by exact namename = 'Q2 Sales.xlsx'
Find only spreadsheetsmimeType = 'application/vnd.google-apps.spreadsheet'
Find CSVsmimeType = 'text/csv'
Name contains AND typename contains 'sales' and mimeType = 'text/csv'

Note

and trashed=false is always appended to every query automatically. You do not need to add it.


action: "convert_to_spreadsheet"

Converts a Drive file (CSV, TSV, XLSX, ODS) to a native Google Spreadsheet using the Drive API's server-side conversion (files.copy with mimeType: application/vnd.google-apps.spreadsheet). No client-side parsing.

ParameterTypeRequiredDescription
action"convert_to_spreadsheet"
fileIdstringDrive file ID from search
filenamestringNew name for the converted spreadsheet

Response

{
  "spreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
  "name": "sales_q2",
  "url": "https://docs.google.com/spreadsheets/d/.../edit",
  "hint": "Use this spreadsheetId with list_sheets, analyze_range, or transform_range."
}

The hint field is literal text from the server response — it tells agents what to do next without needing to reason about it.

End-to-end CSV workflow

1. manage_drive(action: "search", query: "name contains 'sales_q2.csv'")
   → get fileId

2. manage_drive(action: "convert_to_spreadsheet", fileId: "...", filename: "Sales Q2 2026")
   → get spreadsheetId

3. list_sheets(spreadsheetId: "...")
   → confirm tab structure

4. analyze_range(spreadsheetId: "...", range: "Sheet1!A:Z", query: "SELECT ...")
   → query the converted data

Warning: Conversion creates a new Google Spreadsheet — it does not modify the original Drive file. The original CSV/XLSX remains in Drive unchanged.

Supported source formats

From the source code comment: CSV, TSV, XLSX, ODS — anything Drive can convert server-side via the files.copy mimeType override.

On this page