Skip to main content
Glama

List database connections

pg_connections
Read-onlyIdempotent

List configured PostgreSQL connections with their names, environments, access modes, and limits to pick the right one; connections marked needs_approval require unlocking before use.

Instructions

List the configured PostgreSQL connections: name, environment, access mode, limits.

Start here. Every other tool takes a connection name from this list. No passwords are ever shown. A connection marked needs_approval must be unlocked with pg_request_access before use, and only when the user explicitly asked for that environment.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pg_connections"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description still adds genuinely new behavioral context: passwords are never returned, and `needs_approval` connections are gated behind pg_request_access plus an explicit user request — a permission condition nothing in the structured fields conveys.

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?

Three short sentences, front-loaded with what is listed, then the entry-point rule, then the security caveat. No filler and no repetition of the title or annotations.

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?

For a zero-parameter read-only list tool with no output schema, the description covers everything an agent needs: what fields come back, that credentials are withheld, and how to proceed when a connection is locked. Nothing material is missing.

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 tool takes zero parameters, so the schema baseline of 4 applies and there is no parameter meaning left to document. The description instead spends its words on output shape, which is the useful thing here.

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?

States a specific verb and resource ('List the configured PostgreSQL connections') and enumerates the returned fields (name, environment, access mode, limits), which immediately separates it from every pg_* tool that operates on objects inside a connection.

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?

Explicitly says 'Start here' and that every other tool takes a `connection` name from this list, establishing it as the discovery entry point. It also names the exact escalation path — connections marked `needs_approval` require pg_request_access, and only when the user explicitly asked for that environment — which is a when/when-not rule with a named alternative.

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