Skip to main content
Glama
migratorAlio

sqlglot-mcp

by migratorAlio

validate_sql

Validate SQL syntax by checking parseability, then return the statement type and target tables as JSON. Supports multiple SQL dialects including Presto.

Instructions

校验 SQL 可解析性并返回语句类型/目标表。返回 JSON。

Args: sql: 待校验的 SQL。 dialect: SQL 方言,默认 presto。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
dialectNopresto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

没有 annotations,描述承担了行为披露的主要责任。它说明了返回 JSON 和返回的字段类型,且“校验可解析性”暗示该操作不会执行 SQL 或产生副作用;但未说明错误处理方式、方言不受支持时的行为、是否只校验单条语句等。

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?

描述非常简短,先给出用途摘要,再用参数列表说明输入,结构清晰且没有冗余内容。“返回 JSON”一句虽然能从输出 schema 推断,但作为快速提示成本很低。

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

对于只有两个参数且存在输出 schema 的工具,描述基本覆盖了调用所需的信息:做什么、返回什么、参数含义和默认值。但缺少与同级工具的边界说明、方言取值范围、错误行为或更细的使用场景,完整性仍有提升空间。

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

Parameters4/5

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

Schema 中两个参数均无描述(coverage 0%),描述用简短的 Args 部分为 sql 和 dialect 补充了含义,并明确 dialect 默认值为 presto。虽然没有列出合法的方言值,但已经为每个参数提供了基本语义,显著弥补了 schema 的空白。

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?

描述用具体动词“校验”和资源“SQL”说明了核心功能,并给出返回内容(语句类型/目标表),让代理清楚这是解析性检查工具。虽然没有点名区别于 analyze_lineage/list_dialects,但“校验可解析性”这一用途本身已足以与血统分析和方言列表区分。

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?

描述隐含地表明该工具用于校验 SQL 可解析性并获取语句类型和目标表,但没有明确说明何时优先于 analyze_lineage/list_dialects,也没有提供排除情形或备选工具指引。使用场景只能由代理自行推断。

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

Deploy Server

Other Tools