Skip to content

Interface: GoogleFileSearchTool

@providerprotocol/ai


@providerprotocol/ai / google / GoogleFileSearchTool

Defined in: src/providers/google/types.ts:749

File search (RAG) tool for document retrieval.

Enables Gemini to search through uploaded documents using semantic search on FileSearchStore.

Pricing:

  • Embeddings at indexing: $0.15 per 1M tokens
  • Storage and query embeddings: Free

Note: Cannot be combined with other built-in tools.

const tool: GoogleFileSearchTool = {
fileSearch: {
fileSearchStoreNames: ['fileSearchStores/abc123'],
},
};

fileSearch: object

Defined in: src/providers/google/types.ts:751

File search configuration

fileSearchStoreNames: string[]

FileSearchStore names to query

optional metadataFilter: string

AIP-160 filter syntax for metadata filtering