Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP port.8000
BIND_HOSTNoHTTP bind address (not HOST).0.0.0.0
DATABASESNoAlternative to DATABASE_URL: either 'alias|url,alias|url' or JSON '{"alias":"url"}'.
TRANSPORTNoTransport protocol: stdio (MCP default) or HTTP.stdio
DEFAULT_DBNoDefault database alias when multiple databases are configured.
ACCESS_MODENoAccess mode: unrestricted (read/write) or restricted (read-only with 30s statement timeout, no COMMIT/ROLLBACK).unrestricted
DB_PROD_URLNoExample multi-database variable. Any DB_<NAME>_URL can be used.
DATABASE_URLNoSingle database connection URI. Sets alias 'default'.
DB_STAGING_URLNoExample multi-database variable. Any DB_<NAME>_URL can be used.

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": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List configured database connections. Call first when unsure which db to use.

list_schemasA

List schemas (user schemas only by default)

list_objectsB

List tables, views, sequences, or extensions in a schema

get_object_detailsC

Columns and indexes for a table/view

execute_sqlC

Execute SQL (max 50 rows returned)

explain_queryC

EXPLAIN a SQL query, optionally with hypothetical indexes

get_top_queriesC

Slow or resource-heavy queries from pg_stat_statements

analyze_workload_indexesB

Recommend indexes based on pg_stat_statements workload

analyze_query_indexesB

Recommend indexes for up to 10 specific queries

analyze_db_healthB

Health checks: index,connection,vacuum,sequence,replication,buffer,constraint,all

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 10 tools

Disambiguation5/5

Each tool targets a distinct aspect of PostgreSQL introspection and analysis: listing databases/schemas/objects, fetching details, executing/explaining SQL, and performance tuning. Even the two index analysis tools are clearly differentiated by workload vs. specific queries.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using lowercase with underscores (list_*, get_*, execute_sql, explain_query, analyze_*). The naming is predictable and easy to navigate.

Tool Count5/5

With 10 tools, the server is well-scoped for a PostgreSQL administration and performance analysis purpose. Each tool has a clear role without redundancy or bloat.

Completeness5/5

The tool set covers the full lifecycle of database inspection and optimization: discovery (databases, schemas, objects), exploration (details, SQL execution, explain), performance analysis (top queries, index recommendations), and health checks. No obvious gaps for its stated purpose.