Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

List Drive Items

list_drive_items
Read-onlyIdempotent

List files or folders in Google Drive and shared drives, or list shared drive containers. Filter by type, folder, drive, and sort results.

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`, 'allDrives' is used when `include_items_from_all_drives` is True.
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.30.1
    • changedInput schema / properties / corpora / description
      Previous value: -"Corpus 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."New value: +"Corpus to query ('user', 'drive', 'allDrives'). If `drive_id` is set and `corpora` is None, 'drive' is used. If None and no `drive_id`, 'allDrives' is used when `include_items_from_all_drives` is True."
  2. Changed12 schema fields changedv1.28.0
    • removedInput schema / properties / corpora / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / corpora / type
      Added value: +"string"
    • removedInput schema / properties / drive_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / drive_id / type
      Added value: +"string"
    • removedInput schema / properties / file_type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / file_type / type
      Added value: +"string"
    • removedInput schema / properties / order_by / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / order_by / type
      Added value: +"string"
    • removedInput schema / properties / page_token / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / page_token / type
      Added value: +"string"
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / query / type
      Added value: +"string"
  3. Addedv1.0.1

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare read-only, idempotent, open-world, non-destructive behavior, so the safety profile is fully covered. The description adds scope-dependent behavior (what is listed when drive_id is absent), which is useful, but that logic largely restates the schema's corpora/include_items_from_all_drives descriptions and omits anything about pagination or result volume.

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?

Four sentences, each front-loading the condition (drive_id specified / not specified / resource_type) before its consequence, with no filler. Slight overlap with schema parameter text keeps it from being maximally tight.

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 a 13-parameter, mode-switching list tool with an output schema already present, the description covers the main branching logic an agent needs. Return-value shape is correctly left to the output schema; pagination is only implied via the schema's page_token.

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 would be 3; the description goes beyond it by explaining cross-parameter semantics that per-field docs cannot convey – folder_id is relative to drive_id, and drive_id itself can serve as folder_id for the drive root. That interaction is the key thing an agent must get right when composing a call.

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 (Lists) and a precise resource scope (files/folders or shared drive containers), and explicitly covers the two listing modes. An agent can distinguish it from siblings like search_drive_files (search) or list_docs_in_folder (Docs only) without reading the schema.

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?

Gives clear conditional guidance: use drive_id to scope to a shared drive, omit it to span My Drive plus accessible shared drives, and set resource_type="shared_drives" to enumerate drive containers. It does not, however, name sibling alternatives such as search_drive_files for query-based lookup, so routing relies on inference.

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

Deploy Server

Other Tools