Skip to main content
Glama
gswartwood

sqlfluff-mcp-server

by gswartwood

lint_sql

Lint raw SQL against your chosen dialect to identify style and syntax issues. Optionally target specific rules to enforce coding standards.

Instructions

Lint a raw SQL string using an explicitly specified dialect.

Args: sql: The SQL text to lint. dialect: SQLFluff dialect name, e.g. "ansi", "bigquery", "snowflake", "postgres". See sqlfluff.list_dialects() for the full set. rules: Optional list of rule codes/names to restrict linting to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
rulesNo
dialectYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

There are no annotations, so the description carries the full burden of explaining behavior. 'Lint' implies a read-only analysis, but the description does not explicitly state it will not modify anything or what the return value looks like. However, the presence of an output schema mitigates the need to describe return values, and the tool's nature as a linter makes destructive side effects unlikely.

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 opens with a clear, direct one-line purpose, then efficiently breaks down parameters in a structured Args block. Every sentence and piece of documentation adds value—no fluff, no repetition of schema titles. This is an model of concise, scannable tool documentation.

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?

Given the tool complexity (3 parameters, no annotations), the description covers all necessary aspects: what it does, how to use each parameter, and where to find valid dialect values. Since an output schema exists, the lack of return-value explanation is acceptable. The description is complete enough for an agent to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must fully document parameters. It does so comprehensively: 'sql' is defined as the SQL text to lint, 'dialect' includes concrete examples and a pointer to list_dialects(), and 'rules' explains its optional filtering purpose. This adds real meaning beyond the bare 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 clearly states the action ('Lint') and the resource ('a raw SQL string'), and adds a crucial differentiator: it uses an explicitly specified dialect. This distinguishes it from sibling tools like lint_file (which handles files) and fix_sql (which fixes rather than lints).

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 implies when to use this tool: when you have a raw SQL string and need to specify a dialect. It does not explicitly mention alternatives or exclusions, but the phrase 'raw SQL string' strongly signals the file-based alternative (lint_file). The dialect reference to list_dialects is also a clear instruction for usage.

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/gswartwood/sqlfluff-mcp-server'

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