Skip to main content
Glama
Nam088

mcp-server-db

by Nam088

pg_index_usage

Retrieve index usage statistics for user tables to identify unused or inefficient indexes.

Instructions

Retrieve index usage statistics for all user tables in the specified schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoSchema to filter by. Defaults to the connection's defaultSchema (or 'public').
connectionIdNoId of the postgres connection to use, from databases.config.yml. Optional when only one postgres connection is configured.
Behavior3/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It correctly indicates the tool performs a read operation (retrieves statistics), but it does not mention potential performance impact, required permissions, or that it queries system views like pg_stat_user_indexes. More transparency is needed for a production database tool.

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, concise sentence that front-loads the action and scope. Every word adds value, and there is no redundancy or fluff.

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?

The tool has no output schema, so the description should explain what the returned statistics look like (e.g., column names, rows per table). It also lacks context on prerequisites (e.g., pg_stat_user_indexes must be accessible) or potential side effects. For a diagnostic tool, this incompleteness reduces usefulness.

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?

Both parameters have descriptions in the schema ('Schema to filter by', 'Id of the postgres connection'), achieving 100% schema coverage. The tool description does not add any additional meaning or usage hints beyond what the schema already provides, so the value is baseline.

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 action ('retrieve'), the resource ('index usage statistics'), and the scope ('for all user tables in the specified schema'). It effectively distinguishes itself from sibling tools like pg_unused_indexes or pg_missing_indexes, which have narrower purposes.

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 when to use the tool (to get index usage stats for a schema), but it does not explicitly state when to avoid it or mention alternatives. Given the many sibling tools, explicit guidance on when to prefer this over pg_unused_indexes or pg_duplicate_indexes would be beneficial.

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/Nam088/mcp-database-server-v2'

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