Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

List PG search indexes

list_pg_search_indexes
Read-only

List all pg_search BM25 indexes in a database and show their full configuration options, including all documented bm25 settings. Returns an empty list when the extension is missing.

Instructions

List every pg_search BM25 index in the database along with the parsed reloptions (the WITH (...) config) for each. Surfaces the 13 documented bm25 options (key_field, the six *_fields jsonb configs, layer_sizes, background_layer_sizes, target_segment_count, mutable_segment_rows, sort_by, search_tokenizer). The full parsed dict is preserved in index_options so unsurfaced or future options stay reachable. Returns an empty list when the pg_search extension is not installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false. The description adds value by detailing what is returned (13 specific options, preserved full dict), and the edge case of an empty list when the extension is not installed. It does not disclose any required privileges or potential side effects, but the read-only nature is already clear from annotations. No contradiction.

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 two sentences with no wasted words. The first sentence states the core functionality, and the second adds important details about the options and edge case. Every sentence earns its place.

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

Completeness5/5

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

For a list tool with an output schema, the description covers: the type of indexes listed, the configuration details included, accessibility of unsurfaced options, and behavior when the extension is missing. No gaps remain for an agent to use it correctly.

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?

The input schema coverage is 100% with a good description for the database parameter. The tool description does not add new semantics for the parameter; it repeats the concept of 'database' implicitly. Baseline score of 3 is appropriate as the schema already handles parameter documentation.

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 lists pg_search BM25 indexes with parsed reloptions, specifying the exact resource and action. It distinguishes from siblings like list_indexes (general indexes) and get_pg_search_index_metadata (specific metadata) by focusing on BM25 indexes and their configuration details.

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 when to use: to list BM25 indexes and their options. While it does not explicitly compare with alternatives, the specificity ('pg_search BM25 index') makes it clear. No exclusion criteria or when-not-to-use guidance is provided, but the context from sibling names (e.g., list_indexes) helps fill the gap.

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