Skip to main content
Glama
itunified-io

mcp-postgres

by itunified-io

pg_query_prepared

Manage named prepared statements with PREPARE, EXECUTE, and DEALLOCATE operations. Note: deprecated due to session-local behavior and connection pool issues.

Instructions

[DEPRECATED] Manage named prepared statements: PREPARE, EXECUTE, DEALLOCATE. Prepared statements are session-local and unreliable with connection pools. Use parameterized pg_query instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoSQL query (required for prepare)
nameYesPrepared statement name
paramsNoJSON array of parameters (for execute)
targetYesTarget name from ~/.dbx/targets/
action_typeYesAction to perform
Behavior4/5

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

With no annotations, the description carries full burden. It discloses deprecation, session-locality, and unreliability with connection pools. These are key behavioral traits. However, it could mention error scenarios or execution behavior. Still, the shown transparency is strong for a deprecated tool.

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 extremely concise: a single sentence with a deprecation marker and a warning. Every word adds value, and it is front-loaded with [DEPRECATED]. No fluff.

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?

Given the tool's complexity (5 params, no output schema, no annotations) and its deprecated status, the description covers the essential context: purpose, deprecation, alternative, and key behavioral warning. It is slightly lacking in explaining execution outcomes, but for a deprecated tool it is sufficiently complete.

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 covers 100% of parameters with descriptions, so baseline is 3. The description does not repeat param details and adds value by contextualizing the tool's use (deprecation, actions). It does not enhance per-param understanding beyond schema, so a 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 tool manages named prepared statements with three specific actions (PREPARE, EXECUTE, DEALLOCATE). It also deprecates itself and distinguishes from the recommended 'pg_query' alternative, making the purpose explicit and distinct from sibling tools.

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

Usage Guidelines5/5

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

The description explicitly warns that prepared statements are session-local and unreliable with connection pools, and directly advises to use parameterized pg_query instead. This provides clear when-not-to-use guidance and an alternative.

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/itunified-io/mcp-postgres'

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