Skip to main content
Glama

util_sql_format

Read-only

SQL formatter — Pretty-print SQL offline: one clause per line (SELECT, FROM, JOINs with ON, WHERE with AND/OR, GROUP BY, HAVING, ORDER BY, LIMIT, UNION, CTEs, INSERT/UPDATE/DELETE), select lists one column per line, indented subqueries, keywords upper or lower case (case=upper|lower|preserve) and indent=1-8 spaces. Strings, quoted identifiers and comments are kept verbatim; multiple statements split on semicolons. Also returns statement count, tables referenced and warnings (SELECT *, UPDATE or DELETE without WHERE, unbalanced parentheses, unterminated strings). Up to 100,000 chars. Price: $0.002 USDC (Base, via x402).

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": {
      "sql": "<sql>"
    },
    "name": "util_sql_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYese.g. select u.id,u.name,count(o.id) as n from users u left join orders o on o.user_id=u.id where u.active=1 group by u.id,u.name order by n desc limit 10

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations it discloses what is preserved verbatim (strings, quoted identifiers, comments), how statements are split, what warnings are produced (SELECT *, UPDATE/DELETE without WHERE, unbalanced parens), the 100,000-char cap, and the $0.002 x402 price. That is substantial behavioral context an agent cannot get from structured fields.

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?

Front-loaded with the core verb+resource, and the long parenthetical is dense with useful detail rather than filler. It is a heavy single sentence, but nearly every clause earns its place.

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?

With no output schema, the description correctly covers return values (statement count, tables referenced, warnings), limits, and cost. The only gap is that the formatting options it advertises are absent from the actual input schema.

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 coverage is 100% for the single 'sql' parameter, so the schema carries the input documentation. The description introduces case=upper|lower|preserve and indent=1-8 options that do not appear in the schema at all, which adds information but also creates a mismatch the agent must reconcile.

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 verb and resource ('SQL formatter — Pretty-print SQL offline') and enumerates the constructs handled, so an agent can tell it apart from a linter or an AI-based SQL tool without opening the schema.

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?

'Offline' implies deterministic formatting rather than AI assistance, which gives some context, but the description never says when to pick this over util_sql_lint or ai_sql, nor any exclusions. Usage must be inferred.

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