Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Hybrid search

hybrid_search
Read-only

Combine vector similarity and full-text search rankings using reciprocal-rank fusion to surface results that match semantic meaning or exact keywords.

Instructions

Combine vector and full-text ranking via reciprocal-rank fusion (RRF) — pulls candidates from each source, then fuses them so rows ranked highly in EITHER source surface. Closes the gap between pure vector (misses keyword/identifier matches) and pure full-text (misses semantic synonyms). Parameters: vector_column, text_column, query_vector, text_query, plus metric / text_config / limit / candidate_pool / rrf_k tunables. Each match carries vector_rank, fts_rank, the fused rrf_score, and (when present) the original distance + ts_rank values.

Example: hybrid_search(schema='public', table='docs', vector_column='embedding', text_column='body', query_vector=[0.1, ...], text_query='postgresql tuning')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
tableYes
metricNol2
schemaYes
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.
text_queryYes
text_columnYes
text_configNoenglish
query_vectorYes
vector_columnYes
candidate_poolNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesYes
availableYes
Behavior4/5

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

Annotations declare readOnlyHint=true, which description does not contradict. Description adds output behavior details (e.g., ranks, scores) and mentions tunables, but does not discuss rate limits or auth. Useful context beyond annotations.

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?

Two paragraphs: first explains purpose, second lists parameters with example. No wasted words, front-loaded with key information. Very efficient.

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?

For a complex tool with 11 parameters and output schema, the description explains the algorithm, return columns, and provides an example. Lacks explanation of 'database' parameter (though schema covers it) and mentions non-existent 'rrf_k', but overall complete enough.

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 coverage is low (9%), so description should compensate. It lists key parameters and gives an example, but mentions 'rrf_k' which is not in the input schema, creating confusion. Example helps, but inaccuracy hurts.

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 it combines vector and full-text ranking via RRF, and explicitly contrasts with pure vector and pure full-text search, distinguishing from sibling tools like vector_search and full_text_search.

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

Usage Guidelines4/5

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

The description implies usage context by explaining it bridges gaps between vector and full-text search, but lacks explicit when-not-to-use or alternative comparison. It could more directly differentiate from hybrid_bm25_vector_search.

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/devopam/MCPg'

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