Skip to main content
Glama

Postgres MCP Server

indexes

Manage PostgreSQL database indexes by listing, creating, dropping, analyzing usage, rebuilding, and identifying unused indexes to optimize query performance.

Instructions

Index management: list, create, drop indexes and analyze index usage

Input Schema

NameRequiredDescriptionDefault
actionYesAction: list (all indexes), create (new index), drop (remove index), analyze (index statistics), reindex (rebuild index), unused (find unused indexes)
columnsNoColumn names for index (required for create)
indexNameNoIndex name (required for drop, reindex)
optionsNoIndex creation options
schemaNameNoSchema name (default: public)public
tableNameNoTable name (required for create, list by table)

Input Schema (JSON Schema)

{ "properties": { "action": { "description": "Action: list (all indexes), create (new index), drop (remove index), analyze (index statistics), reindex (rebuild index), unused (find unused indexes)", "enum": [ "list", "create", "drop", "analyze", "reindex", "unused" ], "type": "string" }, "columns": { "description": "Column names for index (required for create)", "items": { "type": "string" }, "type": "array" }, "indexName": { "description": "Index name (required for drop, reindex)", "type": "string" }, "options": { "description": "Index creation options", "properties": { "concurrent": { "default": false, "type": "boolean" }, "ifExists": { "default": true, "type": "boolean" }, "ifNotExists": { "default": false, "type": "boolean" }, "method": { "enum": [ "btree", "hash", "gist", "spgist", "gin", "brin" ], "type": "string" }, "unique": { "default": false, "type": "boolean" } }, "type": "object" }, "schemaName": { "default": "public", "description": "Schema name (default: public)", "type": "string" }, "tableName": { "description": "Table name (required for create, list by table)", "type": "string" } }, "required": [ "action" ], "type": "object" }

Other Tools from Postgres MCP Server

Related Tools

    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/itsalfredakku/postgres-mcp'

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