Skip to main content
Glama
NekoTarou

kingbase-mcp-server

by NekoTarou

Execute DDL

kb_execute_ddl
Destructive

Execute DDL statements like CREATE, ALTER, DROP, and TRUNCATE on a KingBase database, with automatic schema qualification for unqualified table names.

Instructions

Execute a DDL statement (CREATE, ALTER, DROP, TRUNCATE, etc.) against the KingBase database.

WARNING: DDL operations modify database structure and can be destructive. DROP and TRUNCATE operations are irreversible.

šŸ”‘ Auto-schema feature: Unqualified table names (without schema prefix) are automatically qualified with the configured schema (DB_SCHEMA env var). You can optionally override this with the 'schema' parameter.

Args:

  • sql (string): The DDL statement to execute

  • schema (string, optional): Override the default schema for auto-qualifying table names

Returns: Confirmation message. For dangerous operations (DROP/TRUNCATE/CASCADE), a warning is included.

Examples:

  • sql: "CREATE TABLE test (id SERIAL PRIMARY KEY, name VARCHAR(100))"

  • sql: "ALTER TABLE users ADD COLUMN phone VARCHAR(20)"

  • sql: "CREATE INDEX idx_users_email ON users(email)"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesDDL statement (CREATE/ALTER/DROP/TRUNCATE) to execute
schemaNoSchema name for tables without explicit schema prefix (default: from DB_SCHEMA env or 'public')
Behavior5/5

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

The description explicitly warns that DDL operations modify database structure and that DROP/TRUNCATE are irreversible. It also details the confirmation message and warnings for dangerous operations. This adds behavioral context beyond the destructiveHint annotation, which is already true.

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?

The description is well-structured with sections (warning, auto-schema, args, returns, examples) and front-loaded with the warning. It is slightly lengthy but each sentence adds value; no redundancy.

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?

Given the tool has no output schema, the description adequately states the return is a confirmation message with optional warnings for dangerous operations. It covers all key aspects: purpose, parameters, behavior, and examples, leaving no major gaps.

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 100%, so the schema already documents parameters. The description adds meaning by explaining the auto-schema feature for unqualified table names and how the optional 'schema' parameter overrides the default. Examples further clarify usage.

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 clearly states the tool executes DDL statements (CREATE, ALTER, DROP, TRUNCATE) against KingBase, using a specific verb and resource. It distinguishes from sibling tools, which include query, description, and other non-DDL operations, making the purpose unambiguous.

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 description provides a warning about destructive operations and explains auto-schema qualification, but does not explicitly contrast with sibling tools like kb_execute or specify when not to use it. However, the warning and focus on DDL implicitly guide usage.

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

Install Server

Other Tools

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/NekoTarou/kingbase-mcp-server'

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