Skip to main content
Glama
sparta2025

Postgres MCP Pro

by sparta2025

format_sql_query

Format raw SQL queries into a readable and organized structure, making complex queries easier to review and debug.

Instructions

Format/beautify a SQL query for readability.

Args:
    sql: Raw SQL text to format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.4.2

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does not explicitly state that the tool does not execute or validate SQL, nor describe side effects (or their absence), output format, or error behavior. 'Format/beautify' implies a safe read-only operation, but this is not stated.

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 very short and front-loaded: it states the purpose in the first sentence, then documents the parameter. There is no filler, repetition, or unnecessary detail.

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?

For a simple one-parameter tool, the description is mostly usable, but the absence of an output schema and annotations means it should at least state that the result is formatted SQL text and that the query is not executed. Those details are missing, leaving some ambiguity for an agent.

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?

The input schema provides only a type and title for 'sql', while the description adds the meaningful clarification that it expects 'Raw SQL text to format.' This is enough semantic value for a single parameter, though it could be richer with an example or dialect note.

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 uses a specific verb ('Format/beautify') and a clear resource ('SQL query'), making the primary purpose immediately understandable. It does not explicitly contrast with sibling tools such as execute_sql or explain_query, but the intent is still unambiguous.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus execute_sql, explain_query, or other siblings. There is no mention of exclusions, prerequisites, or the fact that this tool should be used only when the user wants readability rather than execution or analysis.

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

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

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