Skip to main content
Glama
PlbKin190

postgres-mcp-lab

by PlbKin190

query

Read-onlyIdempotent

Run parameterized read-only SELECT statements with server-enforced row and time limits for safe PostgreSQL data inspection.

Instructions

Run a parameterized read-only SELECT with server-enforced row and time limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesOne SELECT or read-only WITH statement; no trailing semicolon.
limitNo
paramsNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, and the description is consistent with them. It adds valuable behavioral context: queries are parameterized and subject to server-enforced row and time limits. No contradiction with annotations.

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?

A single compact sentence communicates the core operation, parameterization, safety, and limits. Every phrase carries meaning, and the most important constraints are front-loaded without unnecessary detail.

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 query tool with 4 parameters, the description plus schema and annotations cover the read-only nature, parameterization, and limits. It does not describe the result shape, but with no output schema and the expectation of query rows, this is a minor gap rather than a blocking omission.

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 only 25%, so the description must compensate. 'Parameterized' gives meaning to the params array, and 'row and time limits' maps to limit and timeout_ms. However, it does not explain placeholder syntax, how params bind to the SQL, or the exact behavior when limits are exceeded.

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 states a clear action ('Run') on a SQL SELECT resource, with the key restrictions 'parameterized' and 'read-only'. It distinguishes the tool from a generic query runner, but it does not explicitly contrast it with sibling tools like 'cypher' or 'schema'.

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?

The read-only SELECT wording implies when the tool should be used: for safe SQL read queries, not for writes or other operations. However, it does not explicitly explain when to prefer this tool over siblings like 'cypher' or 'explain', leaving some selection guidance to inference.

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