execute_sql
Execute validated, read-only SQL on Azure SQL Database with row limits and static analysis for safe data retrieval.
Instructions
Execute statically validated, row-capped read-only SQL. The query may be preceded by DECLARE @var and SET @var = ... statements, followed by exactly one SELECT. DML, DDL, dynamic SQL, and stored procedure execution are always rejected.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "execute_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-only SQL to execute. | |
| database_name | No | Optional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||