Skip to main content
Glama

export_sql

Read-only

Generates CREATE TABLE and ALTER TABLE SQL DDL from a saved diagram or DBML source for PostgreSQL, MySQL, MSSQL, or Oracle.

Instructions

Generate CREATE TABLE / ALTER TABLE SQL DDL for a diagram, in a given dialect.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "export_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
dialectNopostgres
diagram_idNoA saved diagram to export (its UUID).
dbml_sourceNoOr export unsaved DBML text directly instead of a saved diagram.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real context by saying the output is SQL DDL and that both CREATE TABLE and ALTER TABLE statements may be produced and that the dialect affects output, but says nothing about precedence when both a saved diagram and raw DBML are supplied.

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?

A single front-loaded sentence with no filler; the artifact and its dialect scoping come first.

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?

No output schema exists, so the description should say more about the returned DDL (single string vs multiple statements, whether ALTER statements are conditional). For a three-parameter read-only exporter it is adequate but leaves the agent guessing on return shape and parameter precedence.

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 is 67% and both diagram_id and dbml_source already carry descriptions, so the baseline would be 3. The description adds the pairing of 'diagram' and 'dialect', which frames the otherwise undocumented dialect enum as the output-dialect selector, but it still does not resolve what takes precedence if both source parameters are provided.

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 artifact: 'Generate CREATE TABLE / ALTER TABLE SQL DDL ... in a given dialect.' That clearly separates it from the export_laravel_*, export_mermaid and export_plantuml siblings by naming the emitted format, though it does not name a sibling explicitly.

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?

The description gives no when-to-use guidance beyond the bare purpose: no indication of which source parameter to pick, no prerequisites, and no statement of what this tool is not for (e.g. importing SQL is a separate tool).

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