Skip to main content
Glama

lint_sql

Read-onlyIdempotent

Checks SQL for style violations such as trailing whitespace, mixed indentation, line length, and keyword case, returning violation counts and details.

Instructions

Use this when the user wants SQL style feedback. Applies the same 10 rules as gosqlx lint: L001 trailing whitespace, L002 mixed indentation, L003 consecutive blank lines, L004 indentation depth, L005 line length (>100), L006 column alignment, L007 keyword case (upper), L008 comma placement (trailing), L009 aliasing consistency, L010 redundant whitespace. Returns {violation_count, violations}.

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL string to lint

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.12.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description still adds value by enumerating the exact rule set applied and by specifying the return shape '{violation_count, violations}', which is otherwise undocumented since no output schema exists.

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 usage trigger, followed by scope (the rule set) and then the return contract in a compact form. The L001-L010 enumeration is long but each entry is terse and genuinely informative, so it earns its space.

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?

For a single-input, read-only lint tool with no output schema, the description supplies the missing return shape and the rule scope, which is most of what an agent needs. It omits only minor items such as SQL dialect handling and output ordering.

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% for the single `sql` parameter, so the schema already carries the semantics and the baseline is 3. The description adds no syntax, size, or dialect constraints beyond what the schema states.

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 operation (SQL style linting) with an explicit rule inventory (L001-L010) and scoping to the `gosqlx lint` rule set. This clearly separates it from siblings like validate_sql (correctness), security_scan (vulnerabilities), and format_sql (mutation of the SQL), so an agent can route without opening schemas.

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?

Opens with a clear trigger condition, 'Use this when the user wants SQL style feedback,' which is a genuine when-to-use statement. It does not, however, explicitly name the alternatives (format_sql/validate_sql) or state when not to use it, so the agent must infer the boundary from the sibling names.

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