Skip to main content
Glama

Execute multiple SQL statements

execute_sql_multi
Destructive

Execute multiple SQL statements sequentially, reporting success or failure per statement and stopping at the first error unless continue_on_error is set. No transaction rollback.

Instructions

Execute several SQL statements sequentially, preserving order, and report success/failure per statement with statement-level errors. Stops at the first failure unless continue_on_error=true (remaining statements are reported as 'skipped'). There is no transaction: completed statements are not rolled back. Safety is the union of all statements' classifications (any destructive statement requires confirm=true).

Safety classification: depends on input (DESTRUCTIVE, EXECUTION, READ_ONLY, SECURITY_SENSITIVE, WRITE).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoDefault schema.
scriptNoA SQL script; split on top-level semicolons (comments/literals respected).
catalogNoDefault catalog.
confirmNoSet to true ONLY after the user has reviewed the plan returned by a previous call with status 'confirmation_required'. Required for destructive/security-sensitive actions.
dry_runNoIf true, validate and return the planned change without executing it.
row_formatNo'arrays' (compact, aligned with columns) or 'objects' (one dict per row).arrays
statementsNoStatements to run in order. Alternatively pass `script`.
warehouse_idNoSQL warehouse id. If omitted: DBX_MCP_DEFAULT_WAREHOUSE_ID, else automatic selection (reported in the response).
continue_on_errorNoKeep executing after a failed statement (default: stop at first failure).
max_rows_per_statementNoRow cap per statement result.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
pageNo
planNo
toolYes
actionNo
safetyNo
statusNosuccess
summaryYes
warningsNo
next_stepsNoSuggested follow-up calls.
request_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Despite destructiveness already flagged in annotations, the description adds substantial context: no transaction/rollback semantics, stop-at-first-failure default, 'skipped' reporting for remaining statements, and the union-of-classifications safety model requiring confirm=true. This goes well beyond what structured fields convey.

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 core behavioral rules are front-loaded and dense with no filler. The trailing 'Safety classification: depends on input (...)' line is a somewhat terse tag list, but it is short and does not bloat the definition.

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?

With annotations covering the safety profile, a full 100% schema description coverage, and an output schema handling return values, the description supplies exactly the behavioral context an agent needs for a multi-statement, non-transactional executor. Nothing critical is missing.

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%, establishing a baseline of 3, but the description adds genuine meaning for continue_on_error ('remaining statements reported as skipped') and confirm (required for destructive/security-sensitive actions), clarifying behavior the schema text does not fully capture.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause states a specific verb and resource: 'Execute several SQL statements sequentially, preserving order.' This clearly differentiates it from the single-statement execute_sql sibling by emphasizing multiplicity, though it never names the sibling explicitly to route the agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the continue_on_error and confirm behaviors well, but gives no explicit when-to-use guidance relative to execute_sql or execute_code. The choice of this tool over its single-statement sibling is only implied by the word 'multi'.

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