list_files
Find files in Google Drive folders by name, type, or subfolder, with optional recursive search to locate files in nested folders.
Instructions
List files in the target Google Drive folders. Use this to discover files before reading them.
Returns a JSON array of objects with 'id', 'name', and 'mimeType'. Pass the 'id' to read_file to retrieve file contents.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Filter by filename substring (case-insensitive). Empty string returns all files. | |
| file_type | No | Filter by type — 'document', 'spreadsheet', 'pdf', 'image', or 'text'. | |
| folder_id | No | Scope to a specific subfolder ID (obtain from list_folders). Defaults to all target folders. | |
| recursive | No | If True, searches nested subfolders. Recommended when folder_id is set. Defaults to False. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |