Skip to main content
Glama
hovecapital

PostgreSQL MCP Server

by hovecapital

query

Execute a read-only SQL query against the connected database. Optionally override the connection string for the query.

Instructions

Run a read-only SQL query against the currently connected database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to execute (read-only)
connectionStringNoOptional: PostgreSQL connection string to override the current connection for this query only
Behavior3/5

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

The description discloses the read-only nature, which is a key behavioral trait. However, with no annotations, it lacks details on error handling, performance implications, or result format. It provides essential but not comprehensive transparency.

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 a single, concise sentence that directly states the tool's purpose with no wasted words. It is front-loaded and to the point.

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?

For a simple two-parameter tool with no output schema, the description covers the essential action. It does not explain return values, but this is often inferred for query tools. Slightly lacking in full completeness but adequate given simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters well. The description adds only the global 'read-only' context, not specific parameter semantics beyond what is in the schema. Baseline of 3 is appropriate.

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 verb (run), resource (SQL query), and constraint (read-only, against currently connected database). It distinguishes from sibling tools 'connect' and 'disconnect' by specifying the action is query execution.

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

Usage Guidelines4/5

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

The description implies usage when a read-only SQL query needs to be executed. While it doesn't explicitly state when not to use or list alternatives, the context of sibling tools makes it clear this is the query tool. A slight gap in explicit exclusion guidance.

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/hovecapital/read-only-local-postgres-mcp-server'

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