Skip to main content
Glama

Drive List Files

drive_list_files
Read-onlyIdempotent

List files in your Google Drive. Optionally filter by name, type, owner, or modified date (e.g., 'name contains "report"'). Returns file names, IDs, types, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoDrive search query (e.g., "name contains 'report'" or "mimeType='application/pdf'")
order_byNoSort order (e.g., "modifiedTime desc", "name")
page_sizeNoMaximum number of files to return (default 10, max 100)
page_tokenNoToken for fetching the next page of results

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError code if connection failed
filesNoList of files matching the query
messageNoError message with instructions
nextPageTokenNoToken for fetching the next page of results

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "error": {
      +      "description": "Error code if connection failed",
      +      "type": "string"
      +    },
      +    "files": {
      +      "description": "List of files matching the query",
      +      "items": {
      +        "properties": {
      +          "createdTime": {
      +            "description": "ISO 8601 creation timestamp",
      +            "type": "string"
      +          },
      +          "id": {
      +            "description": "File ID",
      +            "type": "string"
      +          },
      +          "mimeType": {
      +            "description": "MIME type of the file",
      +            "type": "string"
      +          },
      +          "modifiedTime": {
      +            "description": "ISO 8601 last modified timestamp",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "File name",
      +            "type": "string"
      +          },
      +          "owners": {
      +            "description": "List of file owners",
      +            "items": {
      +              "properties": {
      +                "displayName": {
      +                  "description": "Owner display name",
      +                  "type": "string"
      +                },
      +                "emailAddress": {
      +                  "description": "Owner email address",
      +                  "type": "string"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "size": {
      +            "description": "File size in bytes",
      +            "type": "string"
      +          },
      +          "webViewLink": {
      +            "description": "URL to open file in Google Drive web interface",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "description": "Error message with instructions",
      +      "type": "string"
      +    },
      +    "nextPageToken": {
      +      "description": "Token for fetching the next page of results",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "page_size": 10
      +  },
      +  {
      +    "order_by": "modifiedTime desc",
      +    "page_size": 20,
      +    "q": "name contains 'report'"
      +  }
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, destructiveHint. Description adds detail about return fields but doesn't disclose pagination or rate limits beyond schema.

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?

Two sentences, front-loaded with purpose, no redundancy. Every word 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 output schema exists, description adequately covers listing with filters and return fields. Lacks mention of pagination (page_token) but schema handles it.

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 parameters (100% coverage). Description adds value with a concrete example query ('name contains "report"'), aiding interpretation.

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?

Clearly states 'List files in your Google Drive', a specific verb+resource. Differentiates from siblings like drive_search by mentioning optional filters and returning metadata.

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 context on optional filters (name, type, owner, modified date) with an example, but does not explicitly contrast with siblings like drive_search or drive_get_file.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.