Skip to main content
Glama
MCP PostgreSQL Read-Only Server

MCP PostgreSQL Read-Only Server

by japentaca

execute_select_query

Executes custom SELECT queries against a PostgreSQL database, enabling read-only data retrieval while preventing data modifications.

Instructions

Ejecuta una consulta SELECT personalizada en la base de datos PostgreSQL

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "execute_select_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesLa consulta SELECT a ejecutar (solo se permiten comandos SELECT)
paramsNoParámetros opcionales para la consulta preparada como array

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the entire behavioral burden, and it discloses almost nothing: no row limits, statement timeout, transaction semantics, permission requirements, or behavior on invalid SQL. The only rule given (SELECT statements only) is already stated in the schema's parameter description, so it adds no new transparency for a raw-SQL execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence with no filler or repetition. It is efficient, though the brevity leaves the reader with no structural cues about scope or safety.

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

Completeness2/5

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

This is a high-risk arbitrary SQL execution tool with no annotations and no output schema, so the description should do substantial work. It does not explain what the result set looks like, whether results are truncated, how errors surface, or what database/role the query runs against — all of which an agent needs before calling it.

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 100%, so both 'query' and 'params' are already documented in the schema, including the SELECT-only restriction. The description adds no syntax hints, no explanation of how 'params' binds to placeholders in the prepared statement, and no guidance on parameter formatting, so it meets only the baseline.

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 specific verb and resource: executing a custom SELECT query against a PostgreSQL database. It is clear what the tool does, but it never distinguishes itself from siblings such as execute_common_queries, list_tables, or describe_table, so an agent cannot tell from the text alone which tool to reach for.

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 adjective 'personalizada' (custom) hints that this is for ad-hoc queries rather than the canned ones offered by execute_common_queries, but that routing is never made explicit. There is no statement of when to prefer this tool over its siblings, no prerequisites, and no exclusions beyond the SELECT-only rule.

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