kb_execute_ddl

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 automat...

Server Kingbase kingbase-mcp-server
Category Destructive
Risk class Critical
Parameters 21 required

What kb_execute_ddl does on Kingbase

AI agents call kb_execute_ddl to permanently remove resources in Kingbase — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

ParameterTypeRequiredDescription
sql string Yes DDL statement (CREATE/ALTER/DROP/TRUNCATE) to execute
schema string Schema name for tables without explicit schema prefix (default: from DB_SCHEMA env or 'public')

Parameters from the server's own tool schema.

Why kb_execute_ddl needs a policy

While the tool can perform reversible operations (CREATE, ALTER), it explicitly enables destructive operations (DROP, TRUNCATE) that cannot be undone. The warning emphasizes irreversibility. DROP and TRUNCATE are classic destructive operations that permanently remove database objects and data. When a tool spans multiple categories (Write for CREATE/ALTER, Destructive for DROP/TRUNCATE), the most severe applies.

From the tool's definition Tool description explicitly states: 'Execute a DDL statement (CREATE, ALTER, DROP, TRUNCATE, etc.)' and warns 'DROP and TRUNCATE operations are irreversible.' The tool accepts arbitrary DDL statements including DROP and TRUNCATE which permanently delete…

Risk signalsAccepts freeform code/query input (sql)

Questions about kb_execute_ddl

What does the kb_execute_ddl tool do? +

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)". It is categorised as a Destructive tool in the Kingbase MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.

What parameters does kb_execute_ddl accept? +

kb_execute_ddl accepts 2 parameters: sql, schema. Required: sql. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on kb_execute_ddl? +

Register the Kingbase MCP server in PolicyLayer and add a rule for kb_execute_ddl: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Kingbase. Nothing to install.

What risk level is kb_execute_ddl? +

kb_execute_ddl is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit kb_execute_ddl? +

Yes. Add a rate_limit block to the kb_execute_ddl rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block kb_execute_ddl completely? +

Set action: deny in the PolicyLayer policy for kb_execute_ddl. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides kb_execute_ddl? +

kb_execute_ddl is provided by the Kingbase MCP server (kingbase-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.