Manage Gemini File Search Stores and perform semantic search with RAG using Google's Gemini API
Author: r3-yamauchi
Version: 0.0.1
Type: tool
English | Japanese
brings Google's Gemini File Search capabilities to your Dify workflows. This plugin provides nine focused tools for managing file search stores and performing semantic search with RAG (Retrieval-Augmented Generation):
The source code of this plugin is available in the GitHub repository.
Creates a new file search store for storing document embeddings.
| Parameter | Required | Description |
|---|---|---|
| ❌ | Optional human-readable name for the store |
Returns: Store name (e.g., ), display name, creation timestamp
Upload and import a file with automatic chunking and indexing.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Target store name (e.g., ) | |
| ✅ | File to upload (PDF, TXT, DOCX, Markdown, etc.) | |
| ✅ | Unique name for citations (visible in search results) | |
| ❌ | Metadata as JSON array or direct list/dict (e.g., ) | |
| ❌ | Maximum tokens per chunk (custom chunking) | |
| ❌ | Overlapping tokens between chunks (custom chunking) |
Returns: Operation status, store name, display name, completion details, and (document resource name) for downstream tools
Example metadata (can be provided as JSON text or list objects):
Note: Gemini File Search currently enforces a 100 MB per-file limit. The upload tool validates this locally and will raise an error before calling the API if a file exceeds the limit.
Perform semantic search with AI-generated answers.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Store to search (e.g., ) | |
| ✅ | Search query or question | |
| ❌ | Model override (defaults to provider setting) | |
| ❌ | Filter expression (e.g., ) | |
| ❌ | Include citation information (default: ) |
Returns: AI-generated answer, citations with source references, grounding metadata
Example filter syntax:
List all file search stores in your project.
No parameters required
Returns: Array of stores with names, display names, and creation timestamps
Get detailed information about a specific store.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Store name to retrieve |
Returns: Store name, display name, creation time, update time
Delete a file search store and all its data permanently.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Store name to delete | |
| ❌ | Force deletion even if store contains documents (default: ) |
Returns: Deletion status
List the documents that currently reside in a specific file search store.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Store that owns the documents (e.g., ) | |
| ❌ | Optional page size between 1 and 100. Defaults to the API setting. | |
| ❌ | Pass the from a previous response to continue listing. |
Returns: Array of document metadata (name, display name, state, size, timestamps), count, and for pagination
Retrieve metadata and ingestion status for a single document.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Store containing the document | |
| ❌ | Full document resource name as returned by | |
| ❌ | Document identifier when you do not have the full resource name (with or without the prefix) |
Note: Provide either or . If both are supplied, takes precedence.
Returns: Document metadata including ingestion state, file size, timestamps, and custom metadata
Delete one document inside a store without removing the entire store.
| Parameter | Required | Description |
|---|---|---|
| ✅ | Store containing the document | |
| ❌ | Full document resource name (preferred). Overrides when supplied. | |
| ❌ | Document identifier when you do not have the full resource name | |
| ✅ | Must be set to to prevent accidental deletions | |
| ❌ | Force deletion even if the document is in use |
Returns: Deletion status with store name, document name, and whether force mode was used
Gemini File Search supports a wide range of file formats including:
See the Gemini API documentation for the complete list.
| Error | Solution |
|---|---|
| API key invalid | Verify your Gemini API key in provider settings |
| Quota exceeded | Check your API usage limits and upgrade tier if needed |
| Store not found | Confirm the store name exists using |
| File upload timeout | Large files may take time; operation polling handles this automatically |
| Metadata filter syntax error | Use correct syntax: for strings, for numbers |
See PRIVACY.md for detailed information about data handling and security.
This plugin processes:
This project is released under the MIT License.