Skip to main content
Glama
thrix

gcloud-workspace-mcp

by thrix

drive_search

Read-only

Search Google Drive files, including shared items and shared drives, by passing a raw Drive v3 q query to filter by name, type, or other metadata.

Instructions

Search Google Drive files using a raw Drive q query string.

Uses user credentials (gcloud auth print-access-token). Searches My Drive, files shared with you, and every shared drive you belong to.

Args: query: A raw Drive v3 q expression, e.g. "name contains 'design' and mimeType='application/vnd.google-apps.document'". See https://developers.google.com/drive/api/guides/search-files page_size: Maximum number of files to return (1-100). page_token: The nextPageToken from a previous call, to fetch the next page.

Returns: A JSON object {files: [{id, name, mimeType, modifiedTime}], nextPageToken, incompleteSearch}. nextPageToken is null on the last page. incompleteSearch is true when Drive skipped some shared drives; narrow the query and search again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
page_sizeNo
page_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Adds valuable context beyond annotations: uses user credentials, searches across shared drives, and explains incompleteSearch behavior with remediation advice. Annotations already cover readOnlyHint and openWorldHint, so the extra operational details are a bonus.

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?

Well-structured with clear sections (Args, Returns) and front-loaded purpose. All sentences earn their place, including the incompleteSearch note.

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?

Despite having an output schema, the description explains the return shape including pagination and incompleteSearch semantics, which aids correct usage. It covers auth, scope, parameters, and error handling, making it complete for an agent.

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 0%, so the description must fully explain parameters. It does: query is a raw Drive q expression with an example and link, page_size range (1-100), and page_token usage from nextPageToken. This is comprehensive.

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?

States a specific verb (search) and resource (Google Drive files) and specifies the scope: My Drive, shared-with-me, and all shared drives. This distinguishes it from sibling tools like drive_get_metadata (fetch by ID) and drive_download (retrieve content).

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?

Clearly describes the search scope and auth mechanism (user credentials via gcloud), giving the agent context for when to use it. However, it does not explicitly state when not to use it or name alternatives like drive_get_metadata for known file IDs.

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