Skip to main content
Glama

sql_statements_execute

Execute a SQL statement on a Databricks warehouse and retrieve the statement ID and initial result. Poll to get final results when the statement completes.

Instructions

Execute a SQL statement against a warehouse. Returns the statement statement_id and result.

Poll :func:`sql_statements_get` (or fetch a chunk via :func:`sql_statements_get_result_chunk`)
to retrieve results once the statement finishes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statementYesThe SQL statement to execute
warehouse_idYesWarehouse ID that runs the statement
catalogNoDefault catalog
schemaNoDefault schema
parametersNoPositional/named parameter values (legacy positional form)
row_limitNoRow limit for the statement result set
byte_limitNoByte limit for the statement result set
dispositionNoINLINE | EXTERNAL_LINKS
formatNoResult format: JSON | ARROW | CSV
wait_timeoutNoHow long to wait: '0s'..'50s' (default '10s')
on_wait_timeoutNoCONTINUE | CANCEL — what to do if wait_timeout elapses
parameters_listNoList of statement parameters: [{name, type, value}, ...]. type may be STRING | INT | FLOAT | DOUBLE | BOOLEAN | DATE | TIMESTAMP | DECIMAL.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate readOnlyHint=false (mutation). Description confirms 'Execute' and returns statement_id/result, consistent with mutation. Polling instructions disclose async behavior. No contradictions.

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?

Two concise sentences with no fluff. Front-loaded with core action and return, then provides usage pattern.

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?

Output schema exists, so return value details not needed. Description covers execution flow and polling. Adequate for a tool with 12 parameters, though could mention async nature explicitly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description does not add meaning beyond schema; no parameter details are explained.

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?

Clearly states 'Execute a SQL statement' which is a specific verb+resource. Distinguished from siblings like sql_statements_cancel and polling tools by mentioning polling instructions.

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?

Explicitly instructs to poll sql_statements_get or sql_statements_get_result_chunk after execution, providing clear post-invocation steps. Lacks explicit when-not-to-use guidance but is adequate.

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/inav/databricks-mcp'

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