Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DATABASE_URIYesPostgreSQL connection string (e.g. postgresql://username:password@localhost:5432/database_name)

Tools

Functions exposed to the LLM to take actions

NameDescription
list_schemas

List all schemas in the database

list_objects

List objects in a schema

get_object_details

Show detailed information about a database object

explain_query

Explains the execution plan for a SQL query, showing how the database will execute it and provides detailed cost estimates.

analyze_workload_indexes

Analyze frequently executed queries in the database and recommend optimal indexes

analyze_query_indexes

Analyze a list of (up to 10) SQL queries and recommend optimal indexes

analyze_db_health

Analyzes database health. Here are the available health checks:

  • index - checks for invalid, duplicate, and bloated indexes

  • connection - checks the number of connection and their utilization

  • vacuum - checks vacuum health for transaction id wraparound

  • sequence - checks sequences at risk of exceeding their maximum value

  • replication - checks replication health including lag and slots

  • buffer - checks for buffer cache hit rates for indexes and tables

  • constraint - checks for invalid constraints

  • all - runs all checks You can optionally specify a single health check or a comma-separated list of health checks. The default is 'all' checks.

get_top_queries

Reports the slowest or most resource-intensive queries using data from the 'pg_stat_statements' extension.

get_database_overview

Get comprehensive database overview with performance and security analysis

analyze_schema_relationships

Analyze schema relationships and dependencies with visual representation

get_blocking_queries

Get comprehensive blocking queries analysis with lock information, hierarchy, and recommendations

analyze_vacuum_requirements

Comprehensive vacuum analysis with maintenance recommendations and bloat detection

execute_sql

Execute any SQL query

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Cloud-Thinker-AI/postgres-mcp-pro-plus'

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