Skip to main content
Glama

List Drive Items

list_drive_items
Read-onlyIdempotent

List files, folders, or shared drive containers from a user's Google Drive or a specific shared drive. Supports filters, sorting, and pagination to find the needed items.

Instructions

Lists files/folders or shared drive containers, supporting shared drives. If drive_id is specified, lists items within that shared drive. folder_id is then relative to that drive (or use drive_id as folder_id for root). If drive_id is not specified, lists items from user's "My Drive" and accessible shared drives (if include_items_from_all_drives is True). Set resource_type to "shared_drives" to list shared drive containers instead of folder contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoShared drive query used only when resource_type="shared_drives", e.g. "name contains 'Engineering'".
corporaNoCorpus to query ('user', 'drive', 'allDrives'). If `drive_id` is set and `corpora` is None, 'drive' is used. If None and no `drive_id`, API defaults apply.
detailedNoWhether to include size, modified time, and link in results. Defaults to True.
drive_idNoID of the shared drive. If provided, the listing is scoped to this drive.
order_byNoSort order. Comma-separated list of sort keys with optional 'desc' modifier. Valid keys: 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', 'viewedByMeTime'. Example: 'modifiedTime desc' or 'folder,modifiedTime desc,name'. Defaults to None (Drive API default ordering).
file_typeNoRestrict 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).
folder_idNoThe ID of the Google Drive folder. Defaults to 'root'. For a shared drive, this can be the shared drive's ID to list its root, or a folder ID within that shared drive.root
page_sizeNoThe maximum number of items to return. Defaults to 100.
page_tokenNoPage token from a previous response's nextPageToken to retrieve the next page of results.
resource_typeNoWhat to list. Use "items" for folder contents or "shared_drives" for shared drive containers. Defaults to "items".items
user_google_emailYesThe user's Google email address. Required.
include_organizersNoWhen resource_type="shared_drives", include principals with the organizer role. This costs one extra permissions.list API call per shared drive returned. Defaults to False.
include_items_from_all_drivesNoWhether items from all accessible shared drives should be included if `drive_id` is not set. Defaults to True.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the read-only, idempotent, non-destructive profile. The description adds meaningful behavioral context about drive_id scoping, folder_id relativity, include_items_from_all_drives behavior, and the shared drive container mode. It does not contradict annotations; minor omission is listing depth (immediate vs recursive).

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?

Four dense sentences with no filler. The main action is front-loaded, and the conditional branches are expressed compactly. Every sentence earns its place.

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?

Given the high parameter count and two distinct modes, the description covers the primary scenarios and parameter relationships. Minor gaps like pagination behavior and non-recursive listing are largely handled by the schema and output schema, making it fairly complete.

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 covers all 13 parameters with 100% description coverage, so baseline is 3. The description adds cross-parameter semantics: it explains how drive_id, folder_id, resource_type, and include_items_from_all_drives interact based on whether drive_id is set, which is more than the sum of individual schema descriptions.

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?

Description states a clear verb ('Lists') and distinguishes two modes: files/folders vs shared drive containers. It also explains drive scoping behavior, which differentiates it from siblings like search_drive_files.

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 conditional guidance: if drive_id is specified, list within that drive; if not, list My Drive and accessible shared drives; set resource_type to 'shared_drives' for containers. However, it does not explicitly contrast with search_drive_files or state when not to use this tool.

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

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/WorldCentralKitchen/google_workspace_mcp'

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