Skip to main content
Glama
vladshykanov

mcp-postgres-guard

by vladshykanov

Run a read-only query

query
Read-only

Execute read-only SELECT queries using parameterized placeholders ($1, $2) with a params array, limited to 200 rows.

Instructions

Executes a single SELECT inside a read-only transaction, capped at 200 rows. Use $1, $2 … placeholders with the params array — never string-concatenate values into the SQL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single SELECT statement
paramsNoValues for $1, $2 … placeholders
Behavior4/5

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

Description adds row cap and security guidance beyond the readOnlyHint annotation. No contradictions. The row limit is critical behavioral info not in 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?

Two concise sentences, each essential. Front-loaded with key action and constraints. No wasted 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?

For a simple 2-param tool with no output schema, description covers purpose, constraints, and safe usage. Could mention return format, but implied by SQL execution.

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 covers both parameters with descriptions. Description adds anti-pattern warning and clarifies parameter roles (placeholders for $1, $2). Adds meaningful value beyond schema.

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?

Description clearly states it executes a single SELECT in a read-only transaction with a 200-row cap. Distinguishes from siblings like execute (writes) and list_tables/describe_table (metadata).

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?

Provides explicit guidance on using placeholders and warns against string concatenation. Does not explicitly mention when not to use, but read-only hint and sibling context imply appropriate use cases.

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/vladshykanov/mcp-postgres-guard'

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