Skip to main content
Glama
mittalpk

mcp-server-pgvector

by mittalpk

explain_similarity_query

Run EXPLAIN ANALYZE on a similarity query to confirm that an ANN index is utilized, ensuring optimal vector search performance.

Instructions

Run EXPLAIN ANALYZE on a similarity query to confirm an ANN index is used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
tableYes
metricNocosine
schemaNopublic
query_embeddingYes
embedding_columnYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the key behavior (running EXPLAIN ANALYZE), but does not disclose potential side effects such as the query actually being executed, performance implications, required privileges, or the format of the output. This is a minimal but not misleading disclosure.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler. It efficiently communicates the tool's purpose without wasting words.

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

Completeness2/5

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

Despite having six parameters, no annotations, and an output schema, the description is extremely minimal. It does not explain how the similarity query is constructed, the role of metric or k, or what the EXPLAIN ANALYZE output will contain. This leaves significant gaps for an AI agent trying to invoke the tool correctly.

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

Parameters1/5

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

The description provides no explanation of the six parameters. Schema description coverage is 0%, and the tool description does not compensate by explaining the role of table, embedding_column, query_embedding, k, metric, or schema. Relying on parameter names alone is insufficient.

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 clearly states the tool's function: 'Run EXPLAIN ANALYZE on a similarity query to confirm an ANN index is used.' It uses a specific verb ('Run EXPLAIN ANALYZE') and a resource ('similarity query'), and the intent is explicit. This differentiates it from sibling tools like similarity_search (runs the query) and create_vector_index (creates an index).

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?

The description implies usage when one needs to confirm ANN index utilization, but it does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions or prerequisites. Sibling tools such as similarity_search or hybrid_search are not referenced, leaving the decision contextual rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mittalpk/mcp-server-pgvector'

If you have feedback or need assistance with the MCP directory API, please join our Discord server