Skip to main content
Glama

Search and list files

search_files
Read-onlyIdempotent

Locate Google Drive files and folders by name, text, type, or parent folder, and get metadata like size, owner, and links. Filter with raw Drive queries and paginate results.

Instructions

Searches and lists files and folders: id, name, mimeType, size, parents, driveId, modifiedTime, trashed, starred, webViewLink and shortcutDetails per file, plus nextPageToken. The convenience filters (name_contains, full_text_contains, mime_type, parent_id, only_folders) are AND-ed together and with the raw Drive query expression (q syntax, e.g. "modifiedTime > '2026-01-01T00:00:00'"). Trashed files are hidden unless include_trashed=true. Names are NOT unique in Drive — expect several hits and pick by id. parent_id lists a folder's direct children (use 'root' for My Drive's top level). Shared drives: pass drive_id to search one drive, or include_all_drives=true to search everything at once. Paginate with page_token; order_by e.g. 'modifiedTime desc,name'. incompleteSearch=true in the result means some corpora were skipped — narrow the search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoRaw Drive search expression (q syntax), AND-ed with the other filters, e.g. "modifiedTime > '2026-01-01T00:00:00' and not name contains 'draft'".
drive_idNoSearch only this shared drive.
order_byNoSort keys: createdTime, folder, modifiedTime, name, quotaBytesUsed, recency, starred; add ' desc' to reverse, e.g. 'modifiedTime desc,name'.
mime_typeNoExact mimeType, e.g. application/pdf, application/vnd.google-apps.document (Google Doc), application/vnd.google-apps.spreadsheet (Google Sheet).
page_sizeNoFiles per page (1..1000; API default 100).
parent_idNoOnly direct children of this folder ('root' = My Drive top level).
page_tokenNonextPageToken from the previous page.
only_foldersNoOnly folders (mimeType application/vnd.google-apps.folder).
name_containsNoSubstring match on the file name (case-insensitive prefix matching per word).
include_trashedNoInclude trashed files (default false — the trash is a separate view, as in the Drive UI).
full_text_containsNoFull-text match over the file's content and description.
include_all_drivesNoSearch My Drive and every shared drive together (slower; ignored when drive_id is set).
Behavior5/5

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

Annotations already declare readOnlyhint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is fully covered and the bar is lower. The description adds substantial behavior beyond annotations: trashed files are hidden unless include_trashed=true, names are NOT unique so 'expect several hits and pick by id', incompleteSearch=true means some corpora were skipped, convenience filters are AND-ed with the raw query, and include_all_drives is ignored when drive_id is set. These are exactly the operational edge cases structured hints cannot convey.

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?

Roughly 135 words for a 12-parameter tool with no output schema is appropriately sized, and the first sentence front-loads the core purpose and return fields before the operational caveats follow in logical order. A few details (order_by examples, parent_id 'root', include_trashed default) slightly overlap what the schema already states, but no sentence is filler for a search tool with this many edge cases.

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?

With 12 optional parameters and no output schema, the risk of misuse is high, yet the description covers return format, filter composition, drive scoping, pagination, ordering, trashed-view semantics, name non-uniqueness, and the open-world caveat (incompleteSearch meaning skipped corpora). The openWorldHint annotation is substantiated by concrete guidance to 'narrow the search'. Almost nothing an agent needs to invoke this correctly is missing.

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 100%, establishing a baseline of 3 since each parameter is already documented. The description adds compositional meaning the schema cannot express: the convenience filters (name_contains, full_text_contains, mime_type, parent_id, only_folders) are AND-ed together and with the raw query expression, and it explains the trashed default via the Drive UI's separate trash view. This justifies one point above baseline, though the schema still does most per-parameter heavy lifting.

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 and resource ('Searches and lists files and folders') and enumerates the returned fields (id, name, mimeType, size, parents, driveId, modifiedTime, trashed, starred, webViewLink, shortutDetails, nextPageToken), making the tool's scope unmistakable. This clearly distinguishes it from siblings like get_file (single file by id), list_shared_drives (drives only), and the mutation tools (trash/delete/update).

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?

Provides clear scoping context: parent_id with 'root' targets My Drive's top level, drive_id restricts to one shared drive, include_all_drives=true searches everything, and trashed files require include_trashed=true. It does not explicitly name sibling alternatives such as 'use get_file when you already have the id', though the caveat 'pick by id' implies it — so it falls just short of a 5.

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/A1-x-Tech/mcp-google-drive'

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