Run a read-only query
run_queryExecutes one read-only SQL statement against a DBeaver connection using parameterized placeholders, returning up to 1000 rows. Every query runs in an always-rolled-back transaction, so data stays unchanged.
Instructions
Runs one read statement (SELECT, WITH; also SHOW, VALUES, TABLE where the engine has them) in a transaction that is always rolled back. Returns at most 1000 rows (default 100); long values are shortened. Pass values with 'params' and placeholders instead of pasting them into the SQL: the connection's param_style from list_connections ($1, $2... on PostgreSQL; ? on MySQL, MariaDB and SQLite; @p1, @p2... on SQL Server; :1, :2... on Oracle; typed {p1:String}, {p2:UInt64}... on ClickHouse).
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": {
"connection": "<connection>",
"sql": "<sql>"
},
"name": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SQL statement. | |
| params | No | Values for the placeholders, in order. | |
| max_rows | No | Default 100. | |
| connection | Yes | DBeaver connection name (as shown in DBeaver), its id, or project/name. See list_connections. |