Skip to main content
Glama

gdrive_files_list

Read-onlyIdempotent

List Google Drive files and folders, including shared drives, with optional search queries to filter by name, type, or hide trashed items for sales prep.

Instructions

List the user's files. Returns all files by default, including trashed files; add trashed = false to q to hide them. q is Drive's search grammar — name contains 'Q3' and mimeType = 'application/vnd.google-apps.folder'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoA query for filtering the file results. For supported syntax, see Search for files and folders. This method returns all files by default, including trashed files. If you don't want trashed files to appear in the list, use `trashed = false` in `q`.
spacesNoA comma-separated list of spaces to query within the corpora. Supported values are `drive` and `appDataFolder`. If omitted, the server queries the `drive` space.
corporaNoSpecifies a collection of items (files or documents) to which the query applies. Supported items include: `user`, `domain`, `drive`, `allDrives`. Prefer `user` or `drive` to `allDrives` for efficiency. By default, corpora is set to `user`. However, this can change depending on the filter set through the `q` parameter. If `driveId` is specified, corpora must be `drive`.
driveIdNoID of the shared drive to search.
orderByNoA comma-separated list of sort keys. Valid keys are: `createdTime` (when the file was created; avoid using this key for queries on large item collections as it might result in timeouts or other issues; for time-related sorting on large item collections, use `modifiedTime desc` instead); `folder` (the folder ID, sorted using alphabetical ordering); `modifiedByMeTime`; `modifiedTime`; `name` (alphabetical, so 1, 12, 2, 22); `name_natural` (natural sort, so 1, 2, 12, 22); `quotaBytesUsed`; `recency`; `sharedWithMeTime`; `starred`; `viewedByMeTime`. Each key sorts ascending by default, but can be reversed with the `desc` modifier. Example usage: `folder,modifiedTime desc,name`.
pageSizeNoThe maximum number of files to return. The service may return fewer than this value. If unspecified, at most 100 files will be returned for shared drives, and the entire list of files for non-shared drives. The maximum value is 1000; values above 1000 will be coerced to 1000.
pageTokenNoThe token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response.
includeLabelsNoA comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
supportsAllDrivesNoWhether the requesting application supports both My Drives and shared drives.
includeItemsFromAllDrivesNoWhether both My Drive and shared drive items should be included in results.
includePermissionsForViewNoSpecifies which additional view's permissions to include in the response. Only `published` is supported.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, so safety is covered. The description adds a non-obvious behavioral default (trashed files are returned unless filtered) plus a worked example of the query grammar, which is real value beyond the structured fields.

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?

Three short sentences, front-loaded with the operation, then the default-scope caveat, then the query syntax. No filler or redundancy.

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?

For an 11-parameter, zero-required list tool with no output schema, the description covers the default behavior and the query parameter that most affects results. Pagination, corpora, and driveId nuances are left entirely to the (rich) schema, which is acceptable but leaves the description slightly thin.

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 coverage is 100%, so the baseline is 3; the description goes further by supplying a concrete `q` example (`name contains 'Q3' and mimeType = 'application/vnd.google-apps.folder'`) that the schema defers to external docs for, making the query parameter usable without leaving the tool.

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+resource ('List the user's files') and immediately clarifies the default scope (all files, including trashed). It does not explicitly contrast with siblings like gdrive_files_export, but the operation is unambiguous.

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?

Gives useful in-scope guidance ('add `trashed = false` to `q` to hide them') but never states when to use this list tool versus alternatives such as gdrive_files_export or gdocs_documents_get. Usage is implied rather than routed.

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