Skip to main content
Glama
YatharthLakhera

Custom Google Drive MCP

List Drive Items

list_drive_items
Read-onlyIdempotent

Lists files and folders from Google Drive, including shared drives. Filter by type, order, or search shared drive containers.

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
user_google_emailNoThe user's Google email address. Required.user@gmail.com
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.
drive_idNoID of the shared drive. If provided, the listing is scoped to this drive.
include_items_from_all_drivesNoWhether items from all accessible shared drives should be included if `drive_id` is not set. Defaults to True.
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.
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).
detailedNoWhether to include size, modified time, and link in results. Defaults to True.
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).
resource_typeNoWhat to list. Use "items" for folder contents or "shared_drives" for shared drive containers. Defaults to "items".items
queryNoShared drive query used only when resource_type="shared_drives", e.g. "name contains 'Engineering'".
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already mark the tool as readOnly, non-destructive, and idempotent. The description adds valuable behavioral details: behavior with/without drive_id, folder_id relativity, and the effect of resource_type. No contradictions with annotations.

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 sentences, each with a distinct purpose: main function, drive_id behavior, without drive_id behavior, and resource_type. Front-loaded with the most important info. No unnecessary words.

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 13 parameters, full schema coverage, and output schema presence, the description covers key behavioral aspects (scope, resource type). Could mention pagination or sorting, but those are in schema. Overall adequate for a list tool.

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?

While schema coverage is 100% with good descriptions, the description adds meaningful semantics by explaining parameter interactions (e.g., drive_id scoping, folder_id relative to drive, resource_type switching). This goes beyond the schema's standalone 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?

The description clearly states the verb 'lists' and resource 'files/folders or shared drive containers', with specific mention of supporting shared drives. It effectively distinguishes this tool from siblings like search_files or check_drive_file_public_access by focusing on listing contents versus searching or checking access.

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?

The description provides explicit guidance on when to use drive_id and how resource_type='shared_drives' changes behavior. It implies usage context (listing items vs containers) but does not explicitly state when not to use this tool or list alternatives, though siblings provide context.

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/YatharthLakhera/claude-gdrive-mcp'

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