Skip to main content
Glama

lint_sql

Analyzes SQL strings to detect dangerous patterns, SARGability issues, and T-SQL specific errors. Returns findings with severity levels.

Instructions

Lint a SQL string with sql-sop. Catches dangerous patterns (DELETE/UPDATE without WHERE, SQL injection via string concat, DROP COLUMN, ADD NOT NULL without DEFAULT), SARGability mistakes (function on indexed column, leading-wildcard LIKE, OR across columns), 5 T-SQL specific rules (NOLOCK, xp_cmdshell, deprecated outer join, etc.), and 5 Python source rules for sqlalchemy.text() / cursor.execute() injection. 38 rules in total. Returns one JSON object listing every finding plus a human-readable summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL string to lint. Can be one or many statements.
disableNoRule IDs to skip for this call, e.g. ['W001', 'T001']. Useful when the LLM knows a specific finding is a false positive in context.
severityNoMinimum severity to report. 'error' returns only blocking issues; 'warning' returns everything (default).warning

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden. It discloses what the tool catches (38 rules across categories) and the return format (one JSON object with findings and summary). It implicitly indicates it is non-destructive (linting), though it could be more explicit about being read-only.

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?

The description is a single paragraph that is efficient and front-loaded with the main action. It packs substantial information without wasted words, though it could benefit from slightly better structure for readability.

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 complexity (38 rules, multiple categories) and the existence of an output schema, the description covers the return type (JSON with findings and summary) adequately. It does not mention error handling, but overall it is sufficiently complete for the agent to use the tool.

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%, so each parameter is already described in the input schema. The description adds context about the tool's capabilities (rule categories) but does not provide additional parameter-specific details beyond the schema. Baseline 3 is appropriate.

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 tool lints a SQL string with sql-sop, lists specific categories of patterns it catches (dangerous, SARGability, T-SQL, Python), and distinguishes from sibling list_rules by being the actual linting tool.

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 explains when to use the tool (to catch dangerous patterns, performance issues, etc.) but does not explicitly state when not to use it or provide alternative scenarios beyond the sibling. However, the usage context is clear and adequate.

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/Pawansingh3889/sql-sop-mcp'

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