Skip to main content
Glama
bysonte

postgres-mcp-server

by bysonte

execute_maintenance

Execute SQL maintenance operations like DROP, TRUNCATE, ALTER, VACUUM, and REINDEX only when POSTGRES_ENABLE_MAINTENANCE is true. Keeps destructive commands gated until explicitly enabled.

Instructions

Ejecuta mantenimiento SQL solo si POSTGRES_ENABLE_MAINTENANCE=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSentencia DROP/TRUNCATE/ALTER/CREATE/VACUUM/ANALYZE/REINDEX/GRANT/REVOKE
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that execution is conditional on an environment variable, which is a useful behavioral trait. However, it does not explain what happens when the flag is false (e.g., error, no-op), nor does it warn about the potentially destructive nature of the allowed SQL statements beyond the schema listing. This partial transparency warrants a 3.

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 a single concise sentence that immediately states the tool's purpose and its key condition. There is no wasted information, and the most important aspect (the maintenance gate) is front-loaded.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no output schema), the description covers the core purpose and a critical precondition. However, it omits return behavior and error handling, and the absence of an output schema means these details would be useful for the agent to know. Thus, while adequate in some respects, it lacks full completeness.

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?

The schema has 100% coverage for the single 'sql' parameter with a description listing the allowed statement types. The tool description adds no additional parameter information, so the baseline of 3 applies—the schema already documents the parameter adequately.

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 states 'Ejecuta mantenimiento SQL' which clearly identifies the action (execute SQL maintenance) and the resource (SQL statements of a maintenance nature). The condition 'solo si POSTGRES_ENABLE_MAINTENANCE=true' adds a specific execution gate, and the schema further clarifies by listing DROP/TRUNCATE/ALTER/CREATE/VACUUM/ANALYZE/REINDEX/GRANT/REVOKE, distinguishing this from sibling query or general DML/DDL tools.

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?

The description provides a clear context for usage: the tool should only be used when POSTGRES_ENABLE_MAINTENANCE=true. This implies a when-not condition as well (if the flag is not true, do not use). However, it does not explicitly mention alternatives among sibling tools like execute_dml_ddl_dcl_tcl, so it falls short of a 5.

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/bysonte/postgres-mcp-server'

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