pgwarden-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENAI_API_KEY | No | Required only by the experimental method='llm' index tuning. | |
| PGWARDEN_CONFIG | No | Path to the policy file. Alternative to PGWARDEN_DATABASE_URI. If set, PGWARDEN_DATABASE_URI is ignored. | |
| PGWARDEN_MASK_SALT | No | Salt for the hash masking strategy, used when a rule and its database policy do not name one. | |
| PGWARDEN_DATABASE_URI | No | Connection URI for a single-database run without a policy file. Alternative to PGWARDEN_CONFIG. | |
| PGWARDEN_INCLUDE_LANGFUSE_TRACE | No | Set 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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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:
|
| 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
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.
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.
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.
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.