Skip to main content

When 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.

Tools provided

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
Last modified on September 11, 2025