Skip to main content
Glama
postgres-mcp

postgres-mcp

by cleondev

Connection and safety info

connection_info
Read-only

Reports the current database connection identity, mode, limits, and role write capability so you can verify permissions before running queries.

Instructions

Who this server connects as, its mode and limits, and whether the database role itself could write.

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": "connection_info"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety of the call is covered. The description adds real value by promising a privilege assessment (can the role write?), which goes beyond the annotations, but it says nothing about cost, latency, or whether the check requires an actual database round-trip.

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?

A single compact sentence with no filler, and the most decision-relevant element (write capability of the role) is placed last for emphasis. The phrasing 'its mode and limits' is slightly abstract but does not waste words.

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?

With no parameters and no output schema, the description carries the burden of describing return content, and it does enumerate the categories of information returned. It stops short of indicating format or how 'limits' are expressed, but for a trivial introspection tool it is largely sufficient.

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 there is nothing for the description to disambiguate; the baseline for a parameterless tool is 4. No parameter claims are made that could conflict with the empty schema.

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

Purpose4/5

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

The description names the specific content the tool returns: the identity the server connects as, its mode and limits, and whether the role could write. That is clearly distinct from siblings like describe_table, list_tables and query, which deal with schema and data rather than connection identity. It is phrased as a noun list rather than a verb+resource, which keeps it just short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of 'whether the database role itself could write' hints at a pre-mutation safety check, but the description never says when to call this versus query or describe_table, nor states any exclusions or prerequisites. An agent can infer the purpose but gets no explicit routing guidance.

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