Search Google Drive

Tool ID: googledrive_search

Summary

Searches Google Drive for files whose name or content matches your words. Returns metadata and open links for each match. Read-only.

When to use it

  • Find by topic — Locate a contract, brief, or spreadsheet when you do not know the folder.
  • Filter by type — Restrict to Docs, Sheets, PDFs, and so on via mime type.
  • Limit to a folder — Optionally search only direct children of a folder you already know.

What you need

Requirement Required?
Metraclick connection Yes
Tool enabled for your account Yes
Google Drive credentials Yes

Parameters

Parameter Required? Description
query Yes* Words to match in the file name or full text.
raw_q Yes* Advanced Google Drive API query string. If set, it replaces query, folder_id, and mime_type.
folder_id No Only include items that are direct children of this folder. Ignored when raw_q is used.
mime_type No Only this Google mime type (for example a Google Doc or Sheet type). Ignored when raw_q is used.
page_size No Max results per page (1–100). Default: 25.
page_token No Token for the next page of results.

*You must provide query or raw_q (at least one non-empty).

Trashed files are excluded from the normal (non-raw_q) search.

What you get back

Field Meaning
query The search text you used (if any)
drive_q The actual Drive query that ran
count Matches on this page
files Matching items (same shape as Browse: id, name, links, and so on)
next_page_token For fetching more results

Example prompts

Search Google Drive for files about “Q3 budget” and list the top matches with links.

Find Google Sheets that mention “inventory” and show their names and ids.

Search inside this folder id for files named like “proposal”, up to 50 results.

Get the next page of that Drive search.

Tips

  • Name or content — Default search looks in both the title and the file’s text where Google indexes it.
  • Folder filter — With folder_id, matches are limited to items directly in that folder (not deep nested trees). Browse into subfolders or search without a folder if you need a wider net.
  • Then open one — Use Get file for fuller metadata on a single id.
  • Advanced query — raw_q is for power users / the AI when a precise Drive query is needed; leave it alone in normal chat.

Related