searchFileContents
Search Google Drive files by content or name, and extract matching text snippets from Word documents and PDFs to locate information inside Office files and PDFs.
Instructions
Search Google Drive for files whose content or name matches a query. For .docx and .pdf files, extracts and returns matching text snippets. Use this to find information inside Office documents and PDFs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "searchFileContents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to search for | |
| folderId | No | Restrict search to a specific folder ID | |
| maxResults | No | Max number of files to search (default 5) |