Skip to main content
Glama
NekoTarou

kingbase-mcp-server

by NekoTarou

Execute DML

kb_execute
Destructive

Execute INSERT, UPDATE, or DELETE statements on KingBase database and return affected row count. Supports parameterized queries for safe value substitution.

Instructions

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"]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesDML statement (INSERT/UPDATE/DELETE) to execute
paramsNoOptional parameterized query values ($1, $2, ...)
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?

Annotations already indicate destructiveHint=true. The description adds crucial details: returns number of affected rows, parameterized queries for safety, and the auto-schema qualification feature, all beyond what annotations provide.

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?

Well-structured with sections, front-loaded purpose, and efficient use of brief bullet-like list for Args and Returns. No unnecessary words.

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?

Covers main purpose, parameters with examples, and return value. Though no output schema, the return type is explicitly stated. Could mention error handling, but adequate for a DML execution tool.

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 baseline 3. The description adds value by explaining the auto-schema behavior for the 'schema' parameter and providing real examples for params, enhancing understanding beyond the schema.

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 DML statements (INSERT, UPDATE, DELETE) against the KingBase database, distinguishing it from query and DDL tools among siblings.

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?

Provides clear context for when to use (DML operations) and includes examples. Could explicitly mention not to use for SELECT or DDL, but the sibling names imply the distinction.

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