Skip to main content
Glama

SQL formatter

hopi_sql_formatter
Read-onlyIdempotent

Format a SQL query: uppercase the keywords, put each clause on its own line and indent conditions, while leaving quoted strings, identifiers, numbers and comments untouched. Only whitespace and keyword case change. Source: https://hopi.co.uk/sql-formatter/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL query to format

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYes
formattedNo
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "source_url",
      +  "summary"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds valuable behavioral detail: only whitespace and keyword case change, and quoted strings, identifiers, numbers, and comments are preserved. This goes beyond the annotations.

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 two sentences, front-loaded with the core action, and every clause adds useful information. The source URL is a minor extra but not distracting. No filler or redundant restatement.

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

Completeness5/5

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

With one simple parameter, a rich output schema, and annotations covering safety and idempotence, the description fully covers what the agent needs: what the tool does, what it preserves, and what gets modified. Nothing critical is missing.

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 the schema already documents the single 'sql' parameter as 'The SQL query to format'. The description repeats this concept and adds transformation context, but it does not add materially new parameter-level meaning beyond the schema.

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 a specific verb ('Format'), resource ('SQL query'), and enumerates precise transformations (uppercase keywords, line-per-clause, indent conditions). It clearly distinguishes this from sibling tools like hopi_json_formatter or hopi_css_minifier by name and content.

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 makes the intended use obvious: it is for formatting SQL queries. It does not explicitly call out alternatives or when-not-to-use conditions, but the context is clear and the sibling list reinforces that this is the SQL-specific formatting tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources