Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Get PG search index metadata

get_pg_search_index_metadata
Read-only

Retrieve BM25 index metadata: 13 typed options plus raw index_options. Requires extension installed and existing index.

Instructions

Fetch the parsed reloptions for a single BM25 index (schema.index). Same shape as one entry of list_pg_search_indexes — typed accessors for the 13 documented options plus the raw index_options dict. Raises when the extension is not installed or no BM25 index by that name exists. Returns an object with schema, index, the typed option fields, and index_options (raw reloptions dict for forward-compat).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
schemaYes
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
indexYes
tableYes
schemaYes
columnsYes
sort_byNo
key_fieldNo
json_fieldsYes
layer_sizesNo
text_fieldsYes
range_fieldsYes
index_optionsYes
boolean_fieldsYes
numeric_fieldsYes
datetime_fieldsYes
search_tokenizerYes
mutable_segment_rowsNo
target_segment_countNo
background_layer_sizesNo
Behavior5/5

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

Annotations already declare readOnlyHint=true (safe read operation). The description adds value by specifying error conditions (extension not installed, index not found), return shape (schema, index, typed options, raw options), and that it raises errors, providing full transparency 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.

Conciseness4/5

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

The description is concise (two sentences) and front-loaded with the main action. The second sentence details returns, making it efficient. No wasted words, though it could be slightly more structured with bullet points for clarity.

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?

Given the presence of an output schema, the description adequately covers returns (schema, index, typed options, index_options) and error conditions. It does not explain the 13 typed options individually, but the output schema and reference to list_pg_search_indexes fill that gap.

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 only 33% (only database has description). The description mentions 'schema.index' but does not detail each parameter's role beyond what the schema provides. It adds some context by tying schema and index together, but the gap in parameter documentation is not fully compensated.

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 fetches parsed reloptions for a single BM25 index (schema.index), distinguishing it from sibling tools like list_pg_search_indexes (which lists all). It specifies the return shape and error conditions, making the purpose unambiguous.

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 (for a specific BM25 index) and contrasts with list_pg_search_indexes, but does not explicitly state when not to use or mention alternative tools for related tasks. The context is clear but lacks explicit exclusions.

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