Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by akilja24

search_drive_files

Search Google Drive files and folders, including shared drives, using query operators to find matching items and return IDs, names, types, and optional details.

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. 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. 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).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_google_email": "<user_google_email>",
      "query": "<query>"
    },
    "name": "search_drive_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
corporaNo
detailedNo
drive_idNo
page_sizeNo
user_google_emailYes
include_items_from_all_drivesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose useful behavior: defaults for page_size, detailed, and include_items_from_all_drives, plus the conditional rule that a null drive_id makes results depend on corpora, and the corpora fallback to 'drive'. However it says nothing about authentication/permission requirements, pagination beyond page_size, result caps, or what happens on empty results, which is a meaningful gap for a seven-parameter retrieval tool.

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

Conciseness4/5

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

The purpose is front-loaded in the first sentence and the Args/Returns block is scannable with no filler. The format is a raw Python docstring rather than prose, which is slightly mechanical, but every line adds information.

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

Completeness3/5

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

The description covers parameters and return shape well enough, but for a tool with no annotations and a query-construction parameter, it omits the operational context an agent needs: auth scope, pagination/truncation behavior, and query operator syntax. A Returns block partly duplicates the existing output schema.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does: all seven parameters are documented with defaults, the corpora enum values are given with examples ('user', 'domain', 'drive', 'allDrives'), and the non-obvious interaction between drive_id, corpora, and include_items_from_all_drives is spelled out. The weak spot is 'query' – it only says 'Supports Google Drive search operators' without naming any operator or giving a syntax example for the one parameter the agent must construct.

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 with scope: 'Searches for files and folders within a user's Google Drive, including shared drives.' An agent knows exactly what it searches, but the description never distinguishes it from the sibling list_drive_items or explains why a query-based search beats a listing call.

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

Usage Guidelines3/5

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

There is no explicit 'use this when' statement and no mention of alternatives such as list_drive_items or get_drive_file_content. The only guidance is embedded in parameter prose ('Prefer user or drive over allDrives for efficiency' and the drive_id/corpora interaction), which implies correct usage without ever stating when to choose this tool.

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