Skip to main content
Glama

search_drive_files

Search Google Drive and shared drives for files and folders using free text or structured queries. Filter by file type, order results, and paginate.

Instructions

Search Drive (including shared drives) for files and folders.

Free-text queries are auto-wrapped in fullText contains '...'; structured Drive queries pass through as-is. For listing a single folder by parent use list_drive_items. For file content use get_drive_file_content. Requires the drive.readonly OAuth scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesThe user's Google email address (authenticated account).
queryYesFree text (auto-wrapped) or a Drive query expression like `name contains 'Q3' and mimeType = 'application/pdf' and modifiedTime > '2026-01-01T00:00:00'`. Owner-based queries ("x@y.com in owners") do NOT work inside shared drives — search by modifiedTime and order_by="modifiedTime desc" instead.
page_sizeNoMax files returned, 1-1000. Default 10.
page_tokenNoCursor from a prior response's `nextPageToken`.
drive_idNoShared drive ID to restrict the search. Omit for My Drive + shared-with-me.
include_items_from_all_drivesNoTrue (default) to include shared drive items when drive_id is omitted.
corporaNoScope — "user", "domain", "drive", or "allDrives". Defaults to "drive" when drive_id is set. Prefer "user" or "drive" over "allDrives" for performance.
file_typeNoFriendly alias ("folder", "doc", "sheet", "slides", "form", "drawing", "pdf", "shortcut", "script", "site", "jamboard") or raw MIME type ("application/pdf"). Adds a mimeType filter.
detailedNoTrue (default) includes size, modified time, webViewLink per file; False returns just name/ID/type.
order_byNoComma-separated sort keys: createdTime, folder, modifiedByMeTime, modifiedTime, name, name_natural, quotaBytesUsed, recency, sharedWithMeTime, starred, viewedByMeTime. Append " desc" to reverse. Example: "folder,modifiedTime desc,name".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description covers auto-wrapping, query limitations in shared drives (owner-based queries fail), workaround using modifiedTime, and parameter behaviors like pagination and file_type aliases. Implicitly read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise yet comprehensive; each sentence adds new information. Structured with purpose, query types, alternatives, and OAuth scope. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given complexity (10 params, broad use), description covers purpose, differentiation, parameter details, limitations, and OAuth. Output schema handles return values, so completeness is high.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds significant value: explains query wrapping, file_type alias resolution, order_by format with examples, corpora performance, and drive_id restriction. Goes well beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Search Drive (including shared drives) for files and folders.' Distinguishes from sibling tools like list_drive_items (for listing a folder by parent) and get_drive_file_content (for file content), providing specific verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains free-text vs. structured queries and offers alternatives (list_drive_items for parent listing, get_drive_file_content for content). Also mentions required OAuth scope and performance suggestions for corpora. Lacks explicit 'when not to use' but provides sufficient context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HuntsDesk/ve-gws'

If you have feedback or need assistance with the MCP directory API, please join our Discord server