Skip to main content
Glama
dbeaver-mcp

dbeaver-mcp

by bnuprst

Run a read-only query

run_query
Read-only

Executes 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

NameRequiredDescriptionDefault
sqlYesOne SQL statement.
paramsNoValues for the placeholders, in order.
max_rowsNoDefault 100.
connectionYesDBeaver connection name (as shown in DBeaver), its id, or project/name. See list_connections.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond readOnlyHint/openWorldHint by disclosing that the transaction is always rolled back, that results are capped at 1000 rows (default 100), and that long values are shortened. It also explains the per-engine placeholder syntax the params must match, which is behavior an agent could not infer from annotations or schema.

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?

A single front-loaded paragraph: purpose first, then execution semantics, then parameterization guidance. The long parenthetical engine list is dense but each item carries operational value; nothing is redundant filler.

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?

With no output schema, the description carries the burden of describing returns and does so at a high level (row cap, truncated long values, rollback semantics). It stops short of describing result shape or error behavior, but an agent has enough to call it correctly.

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%, so the baseline is 3, but the description adds real meaning: the engine-specific placeholder formats ($1, ?, @p1, :1, typed {p1:String}) that tie 'params' ordering to 'sql' text. The max_rows details largely restate what the schema already documents.

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?

States a specific verb and resource ('Runs one read statement') and enumerates the accepted statement classes (SELECT, WITH, SHOW, VALUES, TABLE), so an agent knows exactly what will execute. It does not explicitly name explain_query as the non-executing alternative, so sibling differentiation is implied rather than stated.

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?

Gives concrete guidance on how to call it correctly: pass values via 'params' with placeholders rather than pasting literals into SQL, and points at list_connections for the engine's param_style. The 'one read statement' constraint implicitly excludes writes and multi-statement batches, but no explicit when-not-to-use or routing to explain_query/describe_table is given.

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