Skip to main content
Glama

connect

Connect to a PostgreSQL database or verify an existing connection. Discover available databases by setting the discover parameter.

Instructions

Connect to PostgreSQL or check connection status.

LEVEL: Server (connection management)

USE FOR: connecting, checking status, discovering databases. DO NOT USE FOR: health metrics (database_health), queries (execute_query).

ERROR RECOVERY:

  • "connection refused": Check host/port, ensure PostgreSQL is running

  • "authentication failed": Verify user/password credentials

  • "database does not exist": List available databases with discover=True

  • "SSL required": Add use_ssl=True or check server SSL config

  • "certificate verify failed": Set ssl_verify=False for SSH tunnels

Examples: connect() - Check status connect(discover=True) - Find databases connect(url='postgresql://user:pass@localhost:5432/mydb')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPostgreSQL URL
hostNoDatabase host
portNoPort (1-65535)
userNoUsername
passwordNoPassword
databaseNoDatabase name
use_sslNoUse SSL
ssl_verifyNoVerify SSL certificates (set False for SSH tunnels)
aws_secret_nameNoAWS Secrets Manager secret
aws_regionNoAWS regionus-west-1
discoverNoAuto-discover PostgreSQL instances
formatNoOutput formatjson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations were provided, so the description carries full transparency burden. It describes connection status, discovery, error scenarios and recovery, but does not explicitly state whether the tool has side effects (e.g., establishing a persistent session). The error handling details are strong enough for practical use.

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?

Description is well-structured with labelled sections (purpose, level, use for/not, error recovery, examples). Each sentence adds distinct value, and the whole is concise enough for quick scanning.

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

Completeness5/5

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

Given 12 parameters (0 required) and an output schema present, the description covers essential use cases, parameter patterns, error recovery, and distinctions from siblings. No obvious gaps remain for an agent to connect correctly.

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?

Schema coverage is 100% with descriptive parameter titles and descriptions. The description adds value beyond the schema by providing concrete usage examples (e.g., connect(discover=True), connect(url=...)) and attaching error recovery to specific parameters (e.g., use_ssl, ssl_verify).

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 primary verb 'connect' and resource 'PostgreSQL', and explicitly distinguishes from sibling tools by listing specific use cases and exclusions (e.g., 'DO NOT USE FOR: health metrics (database_health), queries (execute_query)').

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

Usage Guidelines5/5

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

Provides explicit 'USE FOR' and 'DO NOT USE FOR' sections, naming sibling tools as alternatives. Also includes error recovery guidance, which helps agents handle failures appropriately.

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

Install Server

Other Tools

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/snss10/DBeast'

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