Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_active_connections

Retrieve active PostgreSQL connections and session details to monitor server load, diagnose performance issues, and check user or application connection status.

Instructions

[Tool Purpose]: Retrieve all active connections and session information on current PostgreSQL server

[Exact Functionality]:

  • Retrieve list of all currently active connected sessions

  • Display user, database, and client address for each connection

  • Include session status and currently executing query information

[Required Use Cases]:

  • When user requests "active connections", "current sessions", "connection status", etc.

  • When server load or performance problem diagnosis is needed

  • When checking connection status of specific users or applications

[Strictly Prohibited Use Cases]:

  • Requests for forceful connection termination or session management

  • Requests for detailed query history of specific sessions

  • Requests for connection security or authentication-related changes

Returns: Information including PID, username, database name, client address, status, and current query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by specifying what information is returned (PID, username, database name, client address, status, current query) and clarifying it's a read-only monitoring tool (prohibited use cases exclude destructive operations). However, it doesn't mention potential limitations like data freshness, permission requirements, or rate limits, which would be helpful for a monitoring tool.

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

Conciseness4/5

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

The description uses clear section headers ([Tool Purpose], [Exact Functionality], etc.) and is front-loaded with purpose. While slightly verbose due to the structured format, every sentence adds value (e.g., prohibited use cases prevent misuse). Minor trimming of redundant phrasing could improve efficiency.

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 the tool's complexity (monitoring active connections), no annotations, 0 parameters, and an output schema exists, the description is complete. It explains purpose, functionality, use cases, prohibitions, and return information, providing all necessary context for an agent to understand when and how to use this tool effectively.

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 has 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the tool's functionality and use cases, which adds value beyond the empty schema.

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 explicitly states the tool's purpose as 'Retrieve all active connections and session information on current PostgreSQL server' with specific verbs ('retrieve', 'display', 'include') and resources ('active connections', 'session information'). It clearly distinguishes from sibling tools by focusing on connection monitoring rather than table stats, replication, or other PostgreSQL metrics.

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?

The description provides explicit 'Required Use Cases' (e.g., 'When user requests active connections', 'When server load or performance problem diagnosis is needed') and 'Strictly Prohibited Use Cases' (e.g., 'Requests for forceful connection termination', 'Requests for detailed query history of specific sessions'). This gives clear guidance on when to use this tool versus alternatives or when to avoid it entirely.

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/call518/MCP-PostgreSQL-Ops'

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