Skip to main content
Glama

Drive Search

drive_search
Read-onlyIdempotent

Search Drive files by name, type, owner, modified date, or full text using query operators (e.g., 'name contains "report"', 'mimeType = application/pdf'). Returns matching files and IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesDrive search query (e.g., "fullText contains 'quarterly report'" or "modifiedTime > '2024-01-01'")
page_sizeNoMaximum number of results (default 10, max 100)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError code if connection failed
filesNoList of files matching the search 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 search 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: +[
      +  {
      +    "query": "name contains 'quarterly report'"
      +  },
      +  {
      +    "page_size": 25,
      +    "query": "mimeType = 'application/pdf' and modifiedTime > '2024-01-01'"
      +  }
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, covering safety and behavior. The description adds that it returns matching files and IDs but does not elaborate on pagination, result size limits (only mentioned in page_size), or response format beyond IDs. With rich annotations, the description adds modest value.

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, every word earns its place. The tool's purpose and return value are front-loaded, making it easy for an agent to parse quickly. No unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (search with query operators), the description, schema, and annotations together provide comprehensive guidance. The output format (matching files and IDs) is mentioned. The agent has enough information to use the tool correctly.

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% with descriptions for both parameters. The description goes beyond the schema by providing concrete query operator examples (e.g., 'name contains', 'mimeType =') and mentioning full text search, which adds meaning for the agent. Examples in the schema also help.

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 'Search' and the resource 'Drive files', listing specific search criteria (name, type, owner, modified date, full text) and mentioning query operators. This distinguishes it from siblings like drive_list_files (which likely lists all files without query operators) and drive_get_file (single file).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for query-based searching but does not explicitly state when to use this tool versus alternatives like deep_research or search_within. No exclusions or comparisons are provided, leaving the agent to infer context.

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.