Skip to main content
Glama

import_sql

Read-only

Converts CREATE TABLE and ALTER TABLE SQL DDL into DBML for diagrams. Read-only; pass the output to create_diagram or update_diagram to save changes.

Instructions

Convert CREATE TABLE / ALTER TABLE SQL DDL into DBML text. Read-only — never touches the server; pass the result to create_diagram or update_diagram to actually save it.

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": "<sql>"
    },
    "name": "import_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL text to convert (CREATE TABLE / ALTER TABLE ... FOREIGN KEY statements).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false; the description reinforces this with 'never touches the server' and adds genuinely new context: the tool persists nothing and must be chained to a write tool. Remaining gap is behavior on malformed/unsupported SQL, which is undisclosed.

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?

Two short sentences: the conversion purpose is front-loaded, then the non-persistence caveat and next step. No redundant or filler wording.

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

Completeness5/5

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

No output schema exists, and the description tells the agent the return is DBML text plus what to do with it. For a one-parameter, read-only converter, nothing needed for correct invocation is missing.

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?

Single parameter with 100% schema description coverage, so the schema carries the detail. The description adds the useful constraint that the accepted input is DDL (CREATE TABLE / ALTER TABLE ... FOREIGN KEY) rather than arbitrary SQL, which affects whether an agent should call it at all.

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?

States a specific verb+resource+output format: 'Convert CREATE TABLE / ALTER TABLE SQL DDL into DBML text.' The scope (DDL only, not queries) and output type (DBML) make it clearly distinguishable from import_mermaid, import_plantuml, and export_sql.

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?

Explicitly says the result must be passed to create_diagram or update_diagram to persist, which is the key routing instruction for a pure-conversion step. It does not name exclusions (e.g., 'use import_mermaid for Mermaid input'), but the input-format clause effectively scopes usage.

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