Skip to main contentWhen should you use this server
Use Vectara MCP when you want an agent to:
- Run semantic search over enterprise documents.
- Perform RAG queries that return both search results and a synthesized answer.
- Ground responses in organization-specific data with minimal setup.
ask_vectara
Run a RAG query using Vectara. Returns search results along with a generated response.
Arguments
- query(string, required) — the user query to run.
- corpus_keys(list[string], required) — corpus keys to search; the user must provide one or more.
- api_key(string, required) — the Vectara API key.
- n_sentences_before(int, optional, default=2) — sentences before a hit to include in context.
- n_sentences_after(int, optional, default=2) — sentences after a hit to include in context.
- lexical_interpolation(float, optional, default=0.005) — balance between semantic and lexical match.
- max_used_search_results(int, optional, default=10) — max number of search results to use.
- generation_preset_name(string, optional, default=- vectara-summary-table-md-query-ext-jan-2025-gpt-4o) — generation preset.
- response_language(string, optional, default=- eng) — language of the generated response.
Returns
- Generated answer (string)
- Supporting search results (list of documents/snippets)
Example usage
- “Summarize the refund policy from the Finance corpus.”
- “Answer FAQs about GDPR using the Compliance corpus.”
search_vectara
Run a semantic search query without generation. Returns only the most relevant search results.
Arguments
- query(string, required) — the user query to run.
- corpus_keys(list[string], required) — corpus keys to search.
- api_key(string, required) — the Vectara API key.
- n_sentences_before(int, optional, default=2) — sentences before a hit to include.
- n_sentences_after(int, optional, default=2) — sentences after a hit to include.
- lexical_interpolation(float, optional, default=0.005) — balance between semantic and lexical match.
Returns
- Matching search results with context snippets.
Example usage
- “Find all product docs mentioning SAML login.”
- “Search engineering notes for ‘distributed caching.’”
Source