Skip to content

[Feature Request] Add hybrid/vector search support to Query Index tool #2297

@farzad528

Description

@farzad528

Describe the bug

The search_index_query tool only supports keyword (BM25) search. It passes a plain text string to SearchClient.SearchAsync with default SearchOptions and does not construct any vectorQueries in the request body. This means even when an index has a vectorizer configured, the tool cannot perform hybrid search (keyword + vector + RRF fusion). Customers who want hybrid search through the Azure MCP Server must create a Knowledge Base and use the knowledge_base_retrieve tool, which adds unnecessary overhead for simple hybrid query scenarios.

Expected behavior

When querying an index that has a vectorizer configured, the Query Index tool should automatically construct a hybrid search request by:

  1. Detecting searchable vector fields and their associated vectorizer from the index schema
  2. Adding a vectorQueries entry with kind: "text" alongside the existing keyword search parameter
  3. Returning RRF-fused results

Optionally expose a --query-type parameter (simple | hybrid | semantic) to give users explicit control.

Actual behavior

IndexQueryCommand.cs registers only three options (Service, Index, Query) and calls searchService.QueryIndex(service, index, query, retryPolicy, ct) with no vector configuration. The vectorizer on the index is never invoked. Results are BM25 keyword-ranked only.

Reproduction Steps

  1. Create an index with a vectorizer and both text + vector fields
  2. Index documents with embeddings
  3. Use the Azure MCP Server Query Index tool: "Search for 'machine learning' in index 'my-index' of service 'my-service'"
  4. Compare results with a direct REST hybrid query against the same index
  5. Observe that MCP results are keyword-ranked only (no vector component)

Environment

Environment:

  • Hosting platform or OS: macOS / Windows
  • Azure MCP Server version: @azure/mcp@latest (1.x GA)
  • IDE: VS Code + GitHub Copilot Agent Mode / GitHub Copilot CLI

Metadata

Metadata

Assignees

Labels

customer-reportedneeds-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionFurther information is requestedserver-Azure.McpAzure.Mcp.Servertools-SearchSearch

Type

No type

Projects

Status

Untriaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions