Skip to main content
Glama
tom275275

Google Workspace MCP Server

by tom275275

search_drive_files

Find files and folders in Google Drive and shared drives using search queries, filters, and pagination. Locate specific documents by type or drive to retrieve relevant results quickly.

Instructions

Searches for files and folders within a user's Google Drive, including shared drives.

Args: user_google_email (str): The user's Google email address. Required. query (str): The search query string. Supports Google Drive search operators. page_size (int): The maximum number of files to return. Defaults to 10. page_token (Optional[str]): Page token from a previous response's nextPageToken to retrieve the next page of results. drive_id (Optional[str]): ID of the shared drive to search. If None, behavior depends on corpora and include_items_from_all_drives. include_items_from_all_drives (bool): Whether shared drive items should be included in results. Defaults to True. This is effective when not specifying a drive_id. corpora (Optional[str]): Bodies of items to query (e.g., 'user', 'domain', 'drive', 'allDrives'). If 'drive_id' is specified and 'corpora' is None, it defaults to 'drive'. Otherwise, Drive API default behavior applies. Prefer 'user' or 'drive' over 'allDrives' for efficiency. file_type (Optional[str]): Restrict results to a specific file type. Accepts a friendly name ('folder', 'document'/'doc', 'spreadsheet'/'sheet', 'presentation'/'slides', 'form', 'drawing', 'pdf', 'shortcut', 'script', 'site', 'jam'/'jamboard') or any raw MIME type string (e.g. 'application/pdf'). Defaults to None (all types). detailed (bool): Whether to include size, modified time, and link in results. Defaults to True.

Returns: str: A formatted list of found files/folders with their details (ID, name, type, and optionally size, modified time, link). Includes a nextPageToken line when more results are available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
corporaNo
detailedNo
drive_idNo
file_typeNo
page_sizeNo
page_tokenNo
user_google_emailYes
include_items_from_all_drivesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.14.3

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and largely delivers. It discloses the return format ('formatted list of found files/folders'), pagination behavior via nextPageToken, and the conditional interaction between drive_id and corpora. It also documents behavioral defaults for page_size, include_items_from_all_drives, and detailed. Minor omissions: no mention of rate limits or auth requirements, though the required user_google_email implicitly signals authenticated access.

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?

The purpose sentence is front-loaded and followed by a disciplined Args/Returns structure. Every parameter entry earns its place because the schema provides no descriptions, so the length is appropriate rather than bloated. There is no filler, repetition, or irrelevant detail.

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

Completeness4/5

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

Operationally complete for a complex 9-parameter tool with interacting parameters (drive_id ↔ corpora ↔ include_items_from_all_drives), covering defaults, pagination, filtering, and output format; an output schema also exists. The gap is tool-selection context: how search_drive_files relates to list_drive_items, search_docs, or get_drive_file_content is never addressed, which matters given the extensive sibling list.

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?

At 0% schema description coverage, the description fully compensates by documenting all 9 parameters with meaning beyond bare type/default. file_type even enumerates accepted friendly names and gives a raw MIME example; drive_id and corpora explain conditional behavior and preferred values; page_token explains how to paginate. This is exemplary compensation for a schema that carries no descriptions.

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

Purpose4/5

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

States a specific verb and resource: 'Searches for files and folders within a user's Google Drive, including shared drives.' The scope qualifier ('including shared drives') adds useful precision beyond a generic search statement. However, it doesn't explicitly differentiate from siblings like search_docs or list_drive_items, so it misses the top criterion for a 5.

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

Usage Guidelines2/5

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

No guidance on when to choose this tool over siblings such as list_drive_items or search_docs, and no exclusions or conditions are stated. The only directional advice is parameter-level ('Prefer 'user' or 'drive' over 'allDrives' for efficiency'), which addresses argument choice, not tool selection. With over 100 sibling tools, an agent must infer when a query-based search is the right entry point.

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

Deploy Server

Other Tools