Skip to main content
Glama
Mhdd-24

PgAdmin-MCP

by Mhdd-24

pg_query

Run SQL statements on PostgreSQL using saved connection profiles, with read-only safety and optional row limits. Specify dev, qa, or default profile for one-off queries.

Instructions

Run SQL against the sticky session profile (or optional profile=dev|qa for one call). Read-only by default. Optional database name and maxRows. Do not ask the user for connection host/password — use profiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL statement to execute
maxRowsNoMax rows to return (default from PG_MAX_ROWS)
profileNoConnection profile: "dev" | "qa" | "default". Uses credentials from mcp.json (PG_DEV_* / PG_QA_*). Omit to use the sticky session profile from pg_set_profile / PG_PROFILE.
databaseNoOptional database name override
Install Server

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the read-only default, which is useful, but the phrase 'by default' is ambiguous – it implies a possible write mode that no parameter or note explains. Also lacks details on transaction behavior, error handling, or result format, leaving gaps for a data-access 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?

Three short sentences, front-loaded with the core purpose, and every sentence earns its place. No fluff or repetition of schema details.

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?

Complete for a query tool: parameters are documented, the key behavioral trait (read-only) is noted, and the agent knows not to ask for credentials. Missing return format and error semantics are minor for an ad-hoc query tool, and no output schema exists to fill that gap.

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 all parameters at 100%, so baseline is 3. The description adds the sticky-session concept, clarifying how the profile parameter behaves beyond the schema's enumeration. This extra context about profile selection and the default behavior is genuine added value.

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?

States a specific action (Run SQL) against a defined resource (sticky session profile) with optional overrides. Clearly distinguishes from sibling tools that manage profiles, list metadata, or describe tables – this is the only tool for arbitrary SQL 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?

Provides clear context on using the sticky session profile versus a one-off dev/qa profile, and explicitly instructs the agent not to ask for connection credentials. Does not name sibling tools or state when not to use it, but the profile guidance is actionable and sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/Mhdd-24/PgAdmin-MCP'

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