Skip to main content
Glama
sijunkim

DB Gateway MCP Server

by sijunkim

mysql_execute_batch

Execute multiple SQL queries sequentially on a single connection, preserving session variables and temporary tables across statements. Returns an array with each query and its result.

Instructions

Execute multiple SQL queries sequentially on a single connection. Useful for running several queries at once. All queries share the same connection, so SET variables and temporary tables persist across queries. Returns an array of { query, result } pairs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoMySQL connection alias (optional, uses default if omitted)
queriesYesArray of SQL queries to execute sequentially
Behavior3/5

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

Without annotations, the description discloses key behavioral traits: sequential execution, shared connection, and persistence of SET variables/temporary tables. However, it omits crucial error-handling behavior (e.g., whether a failing query interrupts the batch, rolls back, or continues) and does not mention transactionality, which is important for a multi-query execution tool.

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?

The description is only two sentences and immediately states the core behavior, return format, and key connection semantics. Every sentence adds value; there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the return format and connection behavior, but for a batch execution tool, failure semantics are essential context. Without mentioning error handling, an AI agent may not correctly anticipate the tool's behavior when a query fails. This leaves a notable gap.

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?

The input schema provides full descriptions for both alias and queries, covering the baseline. The description adds meaningful context about how the queries interact (shared connection) and the return format ({query,result} pairs), enriching the semantics 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 uses the specific verb 'Execute multiple SQL queries sequentially on a single connection,' clearly identifying the tool's function and distinguishing it from the singular mysql_execute_query sibling. This is specific and 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?

It states 'Useful for running several queries at once,' providing clear context for when to choose this tool. It does not explicitly name alternatives or exclusions, but implies that this is for multi-query scenarios. The shared-connection persistence is a practical usage consideration.

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/sijunkim/db-gateway'

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