Skip to main content
Glama

format_sql

Read-onlyIdempotent

Format SQL queries with customizable indentation and keyword casing to improve readability and maintain consistent code style.

Instructions

Format SQL with configurable indentation and keyword casing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
add_semicolonNoAppend a trailing semicolon (default: false)
indent_sizeNoSpaces per indent level (default: 2)
sqlYesThe SQL string to format
uppercase_keywordsNoUppercase SQL keywords (default: false)
Behavior4/5

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

Annotations already indicate read-only, non-destructive, and idempotent behavior, which the description does not contradict. The description adds context about configurable formatting aspects (indentation and casing), which are useful behavioral traits beyond the annotations, though it doesn't detail output format or error handling.

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, efficient sentence that front-loads the core purpose ('Format SQL') and specifies key configurable aspects without any redundant information, making it highly concise and well-structured.

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?

Given the tool's moderate complexity (formatting with customization), rich annotations (covering safety and behavior), and full schema coverage, the description is reasonably complete. It lacks details on output format (no output schema provided) and error cases, but for a formatting tool with clear parameters, it's adequate.

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%, providing full details on all parameters. The description mentions 'configurable indentation and keyword casing', which aligns with parameters like indent_size and uppercase_keywords, but adds no additional semantic value beyond what the schema already documents.

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 clearly states the specific action ('Format SQL') and specifies configurable aspects ('indentation and keyword casing'), distinguishing it from siblings like analyze_sql, lint_sql, or parse_sql which perform different operations on SQL.

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 description implies usage for formatting SQL with customization options, but does not explicitly state when to use this tool versus alternatives like lint_sql (for checking style) or parse_sql (for structural analysis). No exclusions or prerequisites are mentioned.

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/ajitpratap0/GoSQLX'

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