Skip to main content
Glama
dixitayush
by dixitayush

generate_sql

Generate SQL DDL from Mermaid ER diagrams to review table definitions before applying them to a database.

Instructions

Generate SQL DDL statements from the ER diagram without executing them. Useful for reviewing the SQL before creating tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diagramNoMermaid ER diagram text. Uses configured source if not provided.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It clearly states that SQL is generated 'without executing them,' which is the key non-destructive behavioral trait. It could add more detail about reliance on a configured source or error behavior, but the core transparency is present.

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 sentences with no filler. The core action and the critical non-execution caveat are front-loaded, followed by a brief use-case clause. Every phrase earns its place.

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?

For a single-optional-parameter tool with no output schema, the description is mostly complete: it names the input source, the output (SQL DDL statements), and the non-execution behavior. It does not elaborate on return shape or edge cases, but the low complexity and schema coverage make it sufficient.

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%, and the parameter description already explains both the 'diagram' input and the fallback to a configured source. The tool description adds no new parameter-level meaning beyond echoing 'from the ER diagram,' so the baseline 3 applies.

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 states a specific verb ('Generate'), a specific resource ('SQL DDL statements'), and a clear source ('from the ER diagram'). It also explicitly distinguishes itself by noting 'without executing them,' which sets it apart from sibling execution tools like create_schema.

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?

The phrase 'Useful for reviewing the SQL before creating tables' gives clear context for when to use the tool. It implies an exclusion of execution, but does not explicitly name an alternative such as create_schema, so it stops short of full when/when-not guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dixitayush/mcp-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server