Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DATABASE_URIYesPostgreSQL database connection URI (e.g., postgresql://username:password@localhost:5432/dbname)

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
get_server_capabilitiesA

Report the active profile, access policy, and hard execution limits

list_schemasA

List all schemas in the database

list_objectsB

List tables, views, sequences, or extensions

get_object_detailsB

Show columns, constraints, indexes, and comments for a database object

get_server_infoB

Report PostgreSQL version, database, role, recovery, locale, and installed extensions

get_extension_profilesA

List installed or available PostgreSQL extension capability profiles

get_deployment_profileB

Report conservative PostgreSQL deployment-provider capabilities without secrets

get_extension_objectsB

Inventory PostgreSQL objects owned by one installed extension through core catalogs

get_postgis_diagnosticsB

Report bounded PostGIS columns and indexes through PostgreSQL core catalogs

get_pgvector_diagnosticsA

Report bounded pgvector columns and indexes through PostgreSQL core catalogs

search_catalogB

Search relations, routines, types, collations, and extensions

list_relationsC

List tables, partitions, views, sequences, foreign tables, indexes, and other relations

get_relation_detailsA

Inspect a relation's columns, constraints, indexes, triggers, policies, partitions, and privileges

list_postgres_typesB

List built-in, user-defined, and extension-owned PostgreSQL types by OID

get_postgres_typeA

Inspect any PostgreSQL type, including enum, domain, composite, range, multirange, array, and extension types

select_rowsA

Select bounded rows using catalog-validated identifiers, typed filters, and keyset pagination

insert_rowsC

Insert bounded typed rows with exact affected-row commit guards

upsert_rowsA

Upsert typed rows through a verified primary or unique conflict key

update_rowsB

Update typed values with mandatory filters, optimistic predicates, and commit guards

delete_rowsB

Delete rows with mandatory filters, optimistic predicates, and commit guards

create_migration_planA

Create a deterministic reviewed PostgreSQL migration plan without touching the database

apply_migration_planB

Apply a reviewed fully transactional migration and its ledger row atomically

get_migration_statusC

List redacted reviewed migration ledger metadata

rollback_migrationA

Atomically roll back the latest reviewed migration using its stored verified plan

create_maintenance_planB

Create a reviewed nontransactional PostgreSQL maintenance plan

apply_maintenance_planC

Apply an exact reviewed nontransactional maintenance plan

get_maintenance_statusC

List redacted reviewed maintenance status records

reconcile_maintenance_operationA

Reconcile a reviewed maintenance operation after external outcome verification

explain_queryA

Explain a SQL query and optionally simulate hypothetical indexes

analyze_workload_indexesC

Analyze frequently executed queries and recommend indexes

analyze_query_indexesC

Analyze up to ten SQL queries and recommend indexes

analyze_db_healthB

Analyze database health. Valid values: index, connection, vacuum, sequence, replication, buffer, constraint, all; comma-separated values are accepted.

get_top_queriesC

Report slow or resource-intensive queries using pg_stat_statements

get_runtime_metricsA

Return privacy-preserving aggregate runtime metrics for the current process

execute_sqlA

Execute exactly one read-only, parameterized SQL statement with bounded results

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/surajmandalcell/pgsql-mcp'

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