Skip to main content
Glama
gokiwitech

pgwarden-mcp

by gokiwitech

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENAI_API_KEYNoRequired only by the experimental method='llm' index tuning.
PGWARDEN_CONFIGNoPath to the policy file. Alternative to PGWARDEN_DATABASE_URI. If set, PGWARDEN_DATABASE_URI is ignored.
PGWARDEN_MASK_SALTNoSalt for the hash masking strategy, used when a rule and its database policy do not name one.
PGWARDEN_DATABASE_URINoConnection URI for a single-database run without a policy file. Alternative to PGWARDEN_CONFIG.
PGWARDEN_INCLUDE_LANGFUSE_TRACENoSet to 'false' to drop the _langfuse_trace key from index-tuning tool output.true

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List the databases this server is configured to query, along with the tables each policy allows and the effective access mode and policy enforcement state for each. Every alias returned here can be passed as the 'database' parameter of the other tools. Reads the server's policy configuration only - it does not connect to any database and never returns credentials.

list_schemasA

List all schemas in the database

list_objectsB

List objects in a schema

get_object_detailsB

Show detailed information about a database object

explain_queryB

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

analyze_workload_indexesB

Analyze frequently executed queries in the database and recommend optimal indexes

analyze_query_indexesA

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

analyze_db_healthA

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_queriesA

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

execute_sqlC

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

TDQS

A3.7/5.0

Scored across 10 tools

Disambiguation5/5

Each tool maps to a distinct resource or analysis task: listing hierarchy (databases/schemas/objects), object details, query planning, index analysis, health checks, top queries, and arbitrary SQL execution. The two index-analysis tools are differentiated by workload-derived vs caller-supplied queries, and the descriptions make that clear.

Naming Consistency5/5

All tool names follow a consistent lowercase snake_case verb_noun pattern (list_*, get_*, analyze_*, explain_query, execute_sql). This makes the tool surface predictable and easy to navigate.

Tool Count5/5

Ten tools cover a Postgres administration/analysis server without redundancy. Each tool earns its place, and the count is squarely in the well-scoped range.

Completeness5/5

The surface covers inspection of the database hierarchy, object details, query plans, index recommendations, health checks, top queries, and arbitrary SQL execution, so agents can complete common diagnostic and maintenance tasks without dead ends. The health-check tool bundles multiple sub-checks, which helps keep the surface compact while remaining comprehensive.

Maintenance

ActivityStale
ResponsivenessNo issues