kb_execute

Execute a DML statement (INSERT, UPDATE, DELETE) against the KingBase database. Returns the number of affected rows. Use parameterized queries ($1, $2, ...) for safe value substitution. 🔑 Auto-schema feature: Unqualified table names (without schema prefix) are automatically qualified with the co...

Server Kingbase kingbase-mcp-server
Category Execute
Risk class High
Parameters 31 required

What kb_execute does on Kingbase

AI agents invoke kb_execute to trigger actions in Kingbase. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
sql string Yes DML statement (INSERT/UPDATE/DELETE) to execute
params array Optional parameterized query values ($1, $2, ...)
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 needs a policy

This tool explicitly runs INSERT, UPDATE, and DELETE statements against a database. While it excludes DDL (schema changes), it can irreversibly modify or remove data rows at scale. An AI agent misusing this tool could corrupt or delete large amounts of data, making it high severity.

From the tool's definition Execute a DML statement (INSERT, UPDATE, DELETE) against the KingBase database

Risk signalsAccepts freeform code/query input (sql)

Questions about kb_execute

What does the kb_execute tool do? +

Execute a DML statement (INSERT, UPDATE, DELETE) against the KingBase database. Returns the number of affected rows. Use parameterized queries ($1, $2, ...) for safe value substitution. 🔑 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 DML statement to execute - params (array, optional): Parameter values for $1, $2, ... placeholders - schema (string, optional): Override the default schema for auto-qualifying table names Returns: Number of rows affected by the operation. Examples: - sql: "UPDATE users SET status = $1 WHERE id = $2", params: ["inactive", 123] - sql: "INSERT INTO users (name, email) VALUES ($1, $2)", params: ["John", "john@example.com"] - sql: "DELETE FROM logs WHERE created_at < $1", params: ["2024-01-01"]. It is categorised as a Execute tool in the Kingbase MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does kb_execute accept? +

kb_execute accepts 3 parameters: sql, params, 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? +

Register the Kingbase MCP server in PolicyLayer and add a rule for kb_execute: 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? +

kb_execute is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit kb_execute? +

Yes. Add a rate_limit block to the kb_execute 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 completely? +

Set action: deny in the PolicyLayer policy for kb_execute. 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? +

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