Skip to main content
Glama
lordbasilaiassistant-sudo

mcp-postgres-query

query

Execute parameterized SQL statements on a PostgreSQL database, returning rows and row counts.

Instructions

Execute a SQL query against the PostgreSQL database. Supports parameterized queries for safety. Returns rows and row count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to execute
paramsNoOptional array of parameters for parameterized queries (e.g. $1, $2)
Behavior2/5

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

With no annotations, the description carries full burden but fails to disclose that arbitrary SQL may modify data, and does not mention side effects, transaction behavior, or error handling. It only notes parameterized safety and returns, which does not cover the potentially destructive nature of executing arbitrary SQL.

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 three short sentences, front-loaded with the action verb, and each sentence adds a distinct point: purpose, safety feature, and return value. It contains no fluff or redundancy, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema or annotations exist, so the description's mention of 'rows and row count' is helpful but incomplete—it omits return format, error behavior, and mutation warnings. However, the tool is simple (2 params, 1 required) and the core purpose is adequately stated, making it minimally viable.

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?

The schema description coverage is 100%, as both 'sql' and 'params' have descriptions. The description's mention of 'parameterized queries for safety' adds no new semantic detail beyond the schema's existing explanation of the params array, so it does not elevate the score above the baseline.

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 uses a specific verb ('Execute') and resource ('SQL query against the PostgreSQL database'), clearly distinguishing it from sibling metadata tools like list_tables and describe_table. It also notes parameterized queries and return of rows/row count, reinforcing its role as the primary query executor.

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 provides no guidance on when to use this tool versus alternatives such as explain_query or list_tables. No exclusions, prerequisites, or situational recommendations are mentioned, leaving the agent to infer usage from the tool name and sibling list.

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/lordbasilaiassistant-sudo/mcp-postgres-query'

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