Skip to main content
Glama
azmym

postgres-mcp

by azmym

test_connection

Checks PostgreSQL connectivity and psql setup for one or all databases, reporting psql path, server version, connected user, and database mode; omitting database validates the entire configuration.

Instructions

Check psql and connectivity, for one database or all of them.

Reports the path to the psql binary, the server version, the connected user, and each database's configured read-only or read-write mode. Omit database to check every configured entry, which also validates the config file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing the specific outputs: psql binary path, server version, connected user, and read-only/read-write mode. It also mentions config-file validation when checking all databases. It does not explicitly state that no data is modified, but 'check' and 'reports' strongly imply a non-destructive diagnostic.

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 compact and front-loaded: the first sentence gives the core action and scope, and the second adds useful behavioral detail. Every sentence contributes information without redundancy.

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 simple diagnostic tool with one optional parameter and an output schema, the description covers the invocation scope, the meaning of omitting the parameter, and the reported fields. An agent has enough information to call it correctly without needing more context.

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 description coverage is 0%, so the description must compensate. It clearly explains the semantic difference between providing `database` (check one database) and omitting it (check every configured entry and validate the config file). This is sufficient for correctly using the single optional parameter.

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 states a specific diagnostic action ('Check psql and connectivity') and the exact scope ('for one database or all of them'). It also lists concrete reported outputs, making it clearly distinguishable from sibling tools like list_databases and execute_sql.

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

Usage Guidelines2/5

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

The description explains how to scope the check by omitting or providing `database`, but gives no guidance on when to prefer this tool over siblings such as list_databases, execute_sql, or describe_schema. Usage context is implied rather than explicitly stated.

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