Execute Sql
Execute raw SQL against a connected database and return results.
Supports both human and agent callers. Agent callers are subject to guardrail levels that restrict which statement types are allowed.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
UUID of the registered database connection.
Raw SQL statement to execute.
Who is executing this query: ‘human’ (no guardrails) or ‘agent’ (guardrails apply).
Agent guardrail level. Only applies when caller=‘agent’. strict=SELECT only, moderate=SELECT+DML, permissive=all SQL.
Maximum number of rows to return.
Query execution timeout in seconds.
Responses
Section titled “ Responses ”Successful Response
object
Whether the query executed successfully.
object
Column names from the result set.
Result rows as arrays of values.
Number of rows returned.
True if results were capped by row_limit.
object
Error code (e.g., GUARDRAIL_VIOLATION, SQL_ERROR, TIMEOUT).
Human-readable error message.
Validation Error