Polyglot SQL Dialect Transpiler (PostgreSQL, MySQL, SQLite)
transpile_sql_dialectTranspiles SQL queries and DDL schemas across PostgreSQL, MySQL, and SQLite dialects, rewriting functions and syntax quirks. Use when migrating application queries across database backends or testing against in-memory SQLite; for generating new queries from natural language, use synthesize_sql_query instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'sql_code' and 'source_dialect' ('target_dialect' defaults to 'sqlite'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql_code": "<sql_code>",
"source_dialect": "<source_dialect>",
"target_dialect": "<target_dialect>"
},
"name": "transpile_sql_dialect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql_code | Yes | SQL query or DDL statement to convert from source dialect into target dialect. | |
| source_dialect | Yes | Original SQL dialect of the input code: postgresql, mysql, or sqlite. | |
| target_dialect | Yes | Destination SQL dialect to transpile into: postgresql, mysql, or sqlite. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transpiled_sql | Yes | Transpiled SQL code compliant with the target database dialect specification. | |
| compatibility_warnings | Yes | Potential semantic differences or unsupported features flagged during transpilation. | |
| syntax_transformations | Yes | List of dialect-specific transformations applied (e.g., NOW() to CURRENT_TIMESTAMP). |