Skip to main content
Glama
MCPg - Production-grade PostgreSQL MCP Server

MCPg - Production-grade PostgreSQL MCP Server

List PG search indexes

list_pg_search_indexes
Read-only

Inspect all pg_search BM25 indexes and their parsed WITH (...) options to audit configuration, tokenizer, and field settings; returns an empty list if pg_search is not installed.

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_pg_search_indexes"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • changedInput schema / properties / database / description
      Previous value: -"Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids."New value: +"Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected."
  2. First observedv0.6.8

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare a read-only, closed-world operation, and the description adds real behavioral detail beyond them: the full parsed option dict is preserved under index_options so unsurfaced options remain reachable, and it returns an empty list when pg_search is not installed. That edge-case disclosure is the kind of context annotations cannot carry.

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?

Front-loaded with the core action, followed by what is surfaced and the empty-list edge case; no filler sentences. The parenthetical enumeration of 13 option names is dense but genuinely informative rather than redundant.

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

Completeness3/5

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

An output schema exists, so return shape needn't be explained, and the description covers scope plus the extension-absent case. However, it never clarifies whether it enumerates indexes in one database or across all databases, leaving the interaction with the `database` parameter implicit.

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 100% and the single `database` parameter is fully documented in-schema, including the rejection of unconfigured names. The description adds nothing about the parameter, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource: listing every pg_search BM25 index with its parsed reloptions, and enumerates the surfaced bm25 options. It is distinguishable from generic listing tools by domain, but never names sibling tools like list_indexes or get_pg_search_index_metadata, so an agent must infer the boundary itself.

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?

Use is only implied by the description of what it lists; there is no explicit 'use this when...' guidance or named alternative (e.g. get_pg_search_index_metadata for a single index). The extension-absent behavior is stated, which helps set expectations but is not usage guidance.

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

Deploy Server

Other Tools