Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_index_usage_stats

Analyze PostgreSQL index usage statistics to identify unused indexes and optimize database performance by providing scan counts and tuple return data.

Instructions

[Tool Purpose]: Analyze usage rate and performance statistics of all indexes in database

[Exact Functionality]:

  • Analyze usage frequency and efficiency of all indexes

  • Identify unused indexes

  • Provide scan count and tuple return statistics per index

[Required Use Cases]:

  • When user requests "index usage rate", "index performance", "unnecessary indexes", etc.

  • When database performance optimization is needed

  • When index cleanup or reorganization is required

[Strictly Prohibited Use Cases]:

  • Requests for index creation or deletion

  • Requests for index reorganization or REINDEX execution

  • Requests for statistics reset

Args: database_name: Database name to analyze (uses default database if omitted)

Returns: Index usage statistics including schema, table, index name, scans, and tuples read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameNo

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/call518/MCP-PostgreSQL-Ops'

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