Skip to main content
Glama
S-CurveLabs

io.github.S-CurveLabs/sqlglass

Official
by S-CurveLabs

translate_sql

Read-only

Convert SQL queries between dialects like T-SQL, PostgreSQL, MySQL, Snowflake, BigQuery, and more. Handles LIMIT/TOP, COALESCE, date functions, and quoting differences.

Instructions

Translate a query between dialects (tsql, postgres, mysql, sqlite, snowflake, bigquery, databricks, oracle, duckdb, redshift): TOP<->LIMIT, ISNULL/COALESCE, GETDATE, DATEADD, string functions, quoting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
to_dialectYes
from_dialectNotsql

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds context about the scope of translation (specific conversions), but it does not disclose limitations (e.g., unsupported syntax handling) or output format. This is adequate but not rich, given the annotation baseline.

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 is a single, front-loaded sentence that states the purpose and lists key conversions without waste. It is compact and efficient, with no redundant phrasing.

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?

For a translation tool with no output schema, the description should clarify the output format and error behavior for unsupported constructs. It lists specific conversions but does not state whether the translation is lossless or what happens for unlisted SQL features. This leaves some ambiguity for an agent invoking 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 description coverage is 0%, but the schema provides property names (sql, to_dialect, from_dialect) and a default for from_dialect. The description adds a list of valid dialects, which clarifies possible values, but it does not explain the meaning of each parameter beyond the names. This partially compensates for the coverage gap.

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 verb 'Translate' and the resource 'query', and enumerates the supported dialects and specific conversion patterns (TOP<->LIMIT, ISNULL/COALESCE, etc.). This distinguishes it from sibling tools like lint_sql or format_sql, which serve different purposes.

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?

The description implies when to use the tool by naming its function, but it does not explicitly state when to prefer it over alternatives like analyze_sql or build_select. There is no exclusion or routing guidance, though the purpose is clear enough for an agent to infer applicability.

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