Skip to main content
Glama
hovecapital

PostgreSQL MCP Server

by hovecapital

connect

Establish a persistent connection to a PostgreSQL database using a connection string, enabling subsequent queries until changed or disconnected. Only permitted hosts are allowed.

Instructions

Connect to a PostgreSQL database using a connection string. The connection persists for subsequent queries until changed or disconnected. Only hosts listed in DB_ALLOWED_HOSTS (plus the default DB_HOST:DB_PORT) are permitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionStringYesPostgreSQL connection string (e.g., postgres://user:password@host:5432/database?sslmode=require)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since there are no annotations, the description carries the full burden of disclosing side effects. It transparently states that the connection persists (a side effect beyond a single call) and that only hosts in DB_ALLOWED_HOSTS are permitted (a behavioral constraint). It does not detail failure modes, but the core behavior is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise—two sentences that cover the tool's function, persistence, and restriction. There is no unnecessary detail or redundancy, making it easy for an agent to parse and act on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description does not need to explain return values. It covers the essential aspects: what the tool does, that it persists, and under what conditions it will work. It does not mention error handling or fallback behavior, but that is not critical for this simple connectivity tool within its toolset.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the parameter 'connectionString' with an example format. The description adds meaningful context by specifying the host restriction ('Only hosts listed in DB_ALLOWED_HOSTS ... are permitted'), which is not present in the schema. This enhances the parameter's semantics beyond the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Connect to a PostgreSQL database using a connection string.' It also distinguishes itself from the sibling tools 'disconnect' and 'query' by defining this as the connection-establishment step. The verb 'connect' is specific and the resource (PostgreSQL database) is explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly guides usage by stating that the connection 'persists for subsequent queries until changed or disconnected,' which implies it should be used before query and eventually disconnected. It also mentions the host restriction, which is a precondition for valid usage. However, it does not explicitly state when not to use this tool (e.g., if already connected), but the context makes this clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools