# search_files

Searches and lists files and folders: id, name, mimeType, size, parents, driveId, modifiedTime, trashed, starred, webViewLink and shortcutDetails per file, plus nextPageToken. The convenience filters (name_contains, full_text_contains, mime_type, parent_id, only_folders) are AND-ed together and with the raw Drive query expression (q syntax, e.g. "modifiedTime > '2026-01-01T00:00:00'"). Trashed files are hidden unless include_trashed=true. Names are NOT unique in Drive — expect several hits and pick by id. parent_id lists a folder's direct children (use 'root' for My Drive's top level). Shared drives: pass drive_id to search one drive, or include_all_drives=true to search everything at once. Paginate with page_token; order_by e.g. 'modifiedTime desc,name'. incompleteSearch=true in the result means some corpora were skipped — narrow the search.

Agent View of the PolicyLayer registry record for `search_files`. HTML page: https://policylayer.com/tools/a1-x-tech-mcp-google-drive/search-files

## Facts

- Tool: `search_files`
- Server: Mcp Google Drive (`@a1-x-tech/mcp-google-drive`) — https://policylayer.com/tools/a1-x-tech-mcp-google-drive.md
- Install: `npx -y @a1-x-tech/mcp-google-drive`
- Homepage: https://github.com/A1-x-Tech/mcp-google-drive
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | no | Raw Drive search expression (q syntax), AND-ed with the other filters, e.g. "modifiedTime > '2026-01-01T00:00:00' and not name contains 'draft'". |
| `drive_id` | string | no | Search only this shared drive. |
| `order_by` | string | no | Sort keys: createdTime, folder, modifiedTime, name, quotaBytesUsed, recency, starred; add ' desc' to reverse, e.g. 'modifiedTime desc,name'. |
| `mime_type` | string | no | Exact mimeType, e.g. application/pdf, application/vnd.google-apps.document (Google Doc), application/vnd.google-apps.spreadsheet (Google Sheet). |
| `page_size` | integer | no | Files per page (1..1000; API default 100). |
| `parent_id` | string | no | Only direct children of this folder ('root' = My Drive top level). |
| `page_token` | string | no | nextPageToken from the previous page. |
| `only_folders` | boolean | no | Only folders (mimeType application/vnd.google-apps.folder). |
| `name_contains` | string | no | Substring match on the file name (case-insensitive prefix matching per word). |
| `include_trashed` | boolean | no | Include trashed files (default false — the trash is a separate view, as in the Drive UI). |
| `full_text_contains` | string | no | Full-text match over the file's content and description. |
| `include_all_drives` | boolean | no | Search My Drive and every shared drive together (slower; ignored when drive_id is set). |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_files",
    "arguments": {}
  }
}
```

## Why search_files is rated Low

Even though search_files only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

Risk signals: High parameter count (12 properties) · Admin/system-level operation

## Use case

AI agents call search_files to retrieve information from Mcp Google Drive without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp Google Drive:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "search_files": {}
  }
}
```

## Other tools on Mcp Google Drive (14)

- `delete_file_forever` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/delete-file-forever.md
- `manage_comments` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/manage-comments.md
- `manage_permissions` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/manage-permissions.md
- `raw_request` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/raw-request.md
- `trash_file` — Destructive — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/trash-file.md
- `download_file` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/download-file.md
- `get_file` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/get-file.md
- `list_shared_drives` — Read — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/list-shared-drives.md
- `copy_file` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/copy-file.md
- `create_folder` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/create-folder.md
- `export_file` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/export-file.md
- `move_file` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/move-file.md
- `update_file_metadata` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/update-file-metadata.md
- `upload_file` — Write — https://policylayer.com/tools/a1-x-tech-mcp-google-drive/upload-file.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=a1-x-tech-mcp-google-drive · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/a1-x-tech-mcp-google-drive
