Skip to main content
Glama

gulliver_translate

Read-onlyIdempotent

Translate SQL between DuckDB, Postgres, BigQuery, and Snowflake, warn about syntax that may not carry over, and optionally preflight the result on a target connection before migration.

Instructions

Translate SQL between DuckDB, Postgres, BigQuery and Snowflake, with warnings for anything that may not carry over. With a connection of the target dialect it also preflights the result there. Otherwise no database is used. Use it for migrations between engines; check the warnings before trusting the result, and use gulliver_diff to compare the rows on both engines.

Input Schema

NameRequiredDescriptionDefault
sqlYesExactly one SQL statement (SELECT/WITH) in the connection's dialect. Several statements are rejected.
connectionNoConnection name as listed by gulliver_status (from gulliver.toml or GULLIVER_DSN). Omit for the default connection.
to_dialectYesSQL dialect used to parse the models.
from_dialectNoSQL dialect used to parse the models.duckdb

Output Schema

NameRequiredDescriptionDefault
statusYes
next_stepYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.1
    • changedInput schema / properties / connection / description
      Previous value: -"Connection name from gulliver_status. Omit for the default."New value: +"Connection name as listed by gulliver_status (from gulliver.toml or GULLIVER_DSN). Omit for the default connection."
    • changedInput schema / properties / from_dialect / description
      Previous value: -"SQL dialect."New value: +"SQL dialect used to parse the models."
    • changedInput schema / properties / sql / description
      Previous value: -"One SQL statement in the connection's dialect."New value: +"Exactly one SQL statement (SELECT/WITH) in the connection's dialect. Several statements are rejected."
    • changedInput schema / properties / to_dialect / description
      Previous value: -"SQL dialect."New value: +"SQL dialect used to parse the models."
  2. Changed3 schema fields changedv0.1.1
    • addedOutput schema / properties
      Added value: +{
      +  "next_step": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "enum": [
      +      "ok",
      +      "warn",
      +      "block",
      +      "needs_rehearsal",
      +      "needs_approval",
      +      "skipped",
      +      "fail",
      +      "error"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "status",
      +  "next_step"
      +]
    • changedOutput schema / title
      Previous value: -"gulliver_translateDictOutput"New value: +"GulliverResult"
  3. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavioral context: warnings are emitted for lossy constructs, and a preflight against the target database only happens when a connection is supplied, otherwise nothing touches a database. That conditional side effect is exactly the kind of information annotations don't convey. It stops short of 5 because it doesn't say how warnings are surfaced or whether preflight can fail the call.

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?

Three tight sentences, capabilities front-loaded, with usage and alternative routing packed into the remainder and no filler. Slightly dense but each clause carries information the agent needs.

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?

With an output schema present and full annotation coverage, the description only needs to cover capability, side effects and routing — and it does all three, including the conditional database preflight. Only the treatment of warnings (blocking vs advisory) is left unstated.

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 100%, so both dialects and the connection parameter are already documented in the schema, which sets the baseline at 3. The description adds one useful constraint beyond the schema — the connection must be of the target dialect for preflight to run — plus the implicit source-dialect assumption, but it otherwise repeats information the schema already carries.

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?

States a specific verb and resource ('Translate SQL between DuckDB, Postgres, BigQuery and Snowflake') and adds the scope of what it produces ('warnings for anything that may not carry over'). It also distinguishes itself from gulliver_diff, though it doesn't differentiate from the other siblings (gulliver_lint, gulliver_preflight, gulliver_check) that an agent might confuse with a translation/safety check.

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?

Gives a clear trigger ('Use it for migrations between engines') plus post-call advice ('check the warnings before trusting the result') and names the alternative for row-level comparison ('use gulliver_diff to compare the rows on both engines'). The connection/no-connection branch is also spelled out, but there is no explicit when-not-to-use case, which keeps it short of a 5.

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