Skip to main content
FuseFuse
IntegrationsGoogle workspaceActions

List Google Drive files

List Drive file metadata the connected principal can access. Never returns file content. Optional q is passed only to Drive and is capped at 1,024 characters.

Agent markdown

drive.files.list · Google Workspace · v1

Details

Risk
Read
Idempotency
Safe
Availability
Default
Exposure
REST, SDK, MCP
MCP hints
readOnly=true, destructive=false, idempotent=true, openWorld=true

Scopes

  • https://www.googleapis.com/auth/drive.metadata.readonly

Input

Input schema
NameTypeRequiredConstraints
(root)objectYesadditionalProperties false
page_sizeintegerNominimum 1; maximum 100
page_tokenstringNominLength 1; maxLength 512
qstringNomaxLength 1024
spacesstringNoenum drive | appDataFolder
corporastringNoenum user | drive
drive_idstringNominLength 1; maxLength 256
order_bystringNoenum modifiedTime desc | name | name_natural

Output

Output schema
NameTypeRequiredConstraints
(root)objectYesadditionalProperties false
filesarray<object>YesmaxItems 100
files[]objectYesadditionalProperties false
files[].idstringYesminLength 1; maxLength 256
files[].namestringYesmaxLength 512
files[].mime_typestringYesmaxLength 256
files[].parentsarray<string>NomaxItems 20
files[].parents[]stringYesmaxLength 256
files[].drive_idstringNomaxLength 256
files[].web_view_urlstringNomaxLength 2048
files[].created_atstringNomaxLength 64
files[].updated_atstringNomaxLength 64
files[].trashedbooleanNo
files[].revisionstringNomaxLength 64
files[].size_bytesstringNomaxLength 32
files[].client_side_encryptedbooleanYes
next_page_tokenstringNomaxLength 512

Raw schema

Input
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "page_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "page_token": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "q": {
      "type": "string",
      "maxLength": 1024
    },
    "spaces": {
      "type": "string",
      "enum": [
        "drive",
        "appDataFolder"
      ]
    },
    "corpora": {
      "type": "string",
      "enum": [
        "user",
        "drive"
      ]
    },
    "drive_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "order_by": {
      "type": "string",
      "enum": [
        "modifiedTime desc",
        "name",
        "name_natural"
      ]
    }
  }
}
Output
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "name": {
            "type": "string",
            "maxLength": 512
          },
          "mime_type": {
            "type": "string",
            "maxLength": 256
          },
          "parents": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 256
            },
            "maxItems": 20
          },
          "drive_id": {
            "type": "string",
            "maxLength": 256
          },
          "web_view_url": {
            "type": "string",
            "maxLength": 2048
          },
          "created_at": {
            "type": "string",
            "maxLength": 64
          },
          "updated_at": {
            "type": "string",
            "maxLength": 64
          },
          "trashed": {
            "type": "boolean"
          },
          "revision": {
            "type": "string",
            "maxLength": 64
          },
          "size_bytes": {
            "type": "string",
            "maxLength": 32
          },
          "client_side_encrypted": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "mime_type",
          "client_side_encrypted"
        ]
      },
      "maxItems": 100
    },
    "next_page_token": {
      "type": "string",
      "maxLength": 512
    }
  },
  "required": [
    "files"
  ]
}