Skip to main content
Glama

Query a vector index

query_vs_index
Read-only

Run similarity, hybrid, or full-text search against a Vector Search index. Returns matching records, scores, and supports pagination.

Instructions

Run a similarity / hybrid / full-text search against a Vector Search index.

Returns the matching records as a list of {column: value} objects, their scores (the 'score' column), the column list, facets (if requested) and query information. Pass the returned next_page_token as page_token to continue.

Safety classification: EXECUTION+READ_ONLY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsNoColumns to return (required unless page_token is given).
filtersNoFilter object (sent as filters_json), e.g. {'category': 'news', 'id >': 5, 'tag': ['a', 'b']}.
optionsNoExtra query_index fields: score_threshold, query_columns, sort_columns, facets, columns_to_rerank, reranker. Unknown fields are rejected.
index_nameYesFull index name catalog.schema.index.
page_tokenNonext_page_token from a previous query_vs_index response to fetch the next page.
query_textNoText query (indexes with a model-computed embedding, or HYBRID/FULL_TEXT).
query_typeNoSearch type (default ANN).
num_resultsNoResults to return (default 10, server-capped).
query_vectorNoQuery embedding (Direct Access or self-managed-embedding indexes).
endpoint_nameNoEndpoint name (optional, used with page_token).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
pageNo
planNo
toolYes
actionNo
safetyNo
statusNosuccess
summaryYes
warningsNo
next_stepsNoSuggested follow-up calls.
request_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnlyHint, destructiveHint=false, openWorldHint), and the description still adds value by disclosing the return shape (list of {column: value} objects plus scores, column list, facets) and the pagination continuation contract via next_page_token. The explicit 'EXECUTION+READ_ONLY' classification reinforces rather than merely restates the annotations. It stops short of covering permissions, quotas, or result-size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in one sentence, followed by return format and pagination guidance. Dense and mostly waste-free, though the separate 'Safety classification' line is somewhat redundant against the provided annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema carrying return values and 100% schema description coverage, the description only needs to add wrapping context — and it does, covering search modes, output shape, and pagination. It remains thin on when this tool is preferable to sibling read/query tools, but nothing required to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (including enums, defaults, and the filters/options shapes) is already documented in the schema. The description adds essentially no parameter syntax or semantics beyond it, which is the expected baseline when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource — running similarity, hybrid, or full-text search against a Vector Search index — and the three named modes match the query_type enum. Its read/query function is cleanly separable from the sibling management tools (manage_vs_index, manage_vs_data, manage_vs_endpoint).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the description notes query_text applies to model-computed-embedding or HYBRID/FULL_TEXT indexes and the schema notes query_vector applies to Direct Access/self-managed indexes, which helps mode selection. However, there is no explicit when-to-use/when-not statement or routing to an alternative tool (e.g., execute_sql) for ad-hoc retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.