Skip to main content
Glama
S-CurveLabs

io.github.S-CurveLabs/sqlglass

Official
by S-CurveLabs

lint_sql

Read-only

Detect SQL correctness traps, performance risks, and style issues, and verify table and column names against a cached schema.

Instructions

Check a query for correctness traps (NOT IN + NULLs, LEFT JOIN turned INNER by WHERE, join without ON, TOP without ORDER BY), performance problems (functions on filtered columns, SELECT *, NOLOCK, leading-wildcard LIKE) and style. With a connection whose schema is cached, also verifies every table and column exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, and the description adds useful context by enumerating the specific checks and stating that schema verification only happens when a connection with a cached schema is provided. It does not describe output behavior or error handling, but the safety profile is covered by annotations.

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 front-loaded and every clause carries behavioral information. The first sentence is dense with examples, but these examples are useful for an agent deciding what the tool checks. There is no filler, though the enumeration could be slightly trimmed.

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?

The description covers the tool's main function, the conditional schema-verification behavior, and enough detail for an agent to invoke it correctly with sql and optionally connection. It does not describe the return format, but given the lint-oriented behavior and absence of an output schema, the core calling context is largely complete.

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 0%, so the description must add meaning to the parameters. It gives semantic weight to 'connection' by explaining that it enables table/column existence verification, and implicitly treats 'sql' as the query to lint. It does not elaborate on expected formats or connection value sources, leaving some gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool checks SQL for correctness traps, performance problems, and style, with concrete examples. It is easy to tell this is a linting tool, though it does not explicitly differentiate itself from sibling tools like analyze_sql or explain_query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance about when to use this tool versus analyze_sql, explain_query, or other siblings. The description implies it is for linting SQL, but does not state when to choose an alternative, leaving the agent to infer based on sibling names.

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