DBeaver Database MCP
Provides tools for discovering and using existing DBeaver PostgreSQL connection configurations from the local DBeaver workspace, including listing available connections and their database summaries.
Provides structured, read-only access to PostgreSQL databases, including schema, table, view, column, constraint, index, and comment discovery; query analysis, explanation, and bounded execution; database settings inspection; and sanitized PostgreSQL log summaries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DBeaver Database MCPlist my saved PostgreSQL connections in DBeaver"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DBeaver Database MCP
本地 STDIO MCP 服务,复用 DBeaver 保存的连接配置与凭据。模型只提交结构化 JSON;数据库适配器校验对象、生成参数化 SELECT,并在只读事务中执行。服务不接受自由 SQL、SQL 片段、临时地址、账号、密码或文件路径。
数据库支持
数据库 | 范围 |
PostgreSQL | 目录、结构化查询、只读执行计划、配置及脱敏日志摘要 |
Oracle 12.1+ | Thin 驱动、基本 Service Name/SID 直连、目录、结构化查询、NLS 会话设置 |
实际连接由 Python 数据库驱动建立;DBeaver 提供保存的配置,不充当查询执行引擎。SSH、代理和其他网络处理器不支持。Oracle 的 TNS 描述符、OCI、钱包及自定义 TLS 配置会明确拒绝,避免忽略保存的安全配置。
Oracle 的 database 参数表示当前保存连接的服务或 SID,不能用于切换服务或 PDB。访问其他服务应使用另一条 DBeaver 连接。Oracle 12.1 的对象名限制为 30 字节;12.2+ 使用 128 字节上限,数据库自身的兼容性设置仍然生效。
Related MCP server: MCP PostgreSQL Read-Only Server
安全边界
条件值全部使用驱动参数绑定。标识符经目录校验并安全引用;结构、函数、运算符和类型来自固定白名单。
database_type 必须与保存连接的数据库类型一致。未知类型、额外参数和未实现能力均明确拒绝。
每次调用独立建立只读事务,保留数据库账号的原生权限,结束时回滚并关闭,不切换角色或提升权限。
查询执行前检查可执行依赖。Oracle 拒绝远程数据库链接、外部表、虚拟列、VPD SELECT 策略、函数/域索引、对象类型及无法验证的视图依赖。
表达式中的日期与数值显式绑定;Oracle NUMBER 结果使用十进制字符串保持精度。
限制请求复杂度、执行时间、返回行数、单元格及响应大小。Oracle 同时使用驱动调用超时和请求取消期限;文本在服务端截断,二进制内容不返回。
业务数据、凭据和日志不由 MCP 落盘。错误与诊断不回显 SQL、参数值、地址、凭据或数据库原始消息。
只读事务并不能证明所有 SELECT 依赖都没有外部或自治事务副作用,依赖检查不能跳过。对象定义和安全策略应由可信的数据库管理流程维护;目录审查不是针对恶意并发 DDL 的隔离机制。
安装与接入
需要 Python 3.11+、DBeaver,以及已保存账号凭据的受支持连接。Oracle 使用 Thin 模式,不需要安装 Oracle Client。
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install .在 MCP 客户端中注册虚拟环境 Python,并传入以下启动参数:
-m dbeaver_database_mcp.mcp_server现有启动入口保持兼容。更新安装后重新启动 MCP 服务,使工具定义和已加载的模块生效。
服务自动发现当前用户 DBeaver 工作区内的项目,读取项目 .project 中的名称(缺失或无效时使用目录名),并检查各项目 .dbeaver 内的连接配置文件。默认工作区:
系统 | 位置 |
Windows | %APPDATA%\DBeaverData\workspace6 |
macOS | ~/Library/DBeaverData/workspace6 |
Linux | ~/.local/share/DBeaverData/workspace6 |
不依赖 General 项目,也不通过 MCP 参数接受任意文件路径。项目 ID 是工作区内的项目目录名;显示名称可以与 ID 不同。项目发现只返回名称、ID 和 data-sources.json / credentials-config.json 是否存在,不读取连接正文、解密凭据或连接数据库。空项目和配置缺失项目仍可被发现,missing_files 指明缺失项。
凭据只在本地服务进程中用于建立连接。不要将工作区文件、个人连接、运行日志或数据集加入仓库。
调用方式
首次调用 list_dbeaver_projects,使用返回的精确 project_id 调用 select_dbeaver_project。例如:
{"project": "已发现的项目 ID"}选定项目在当前 MCP 进程会话内保持。后续直接调用 list_dbeaver_connections、list_databases、list_schemas、search_catalog 和 get_table_context,无需重复发现项目或传递项目参数。连接列表及连接上下文携带 project_id / project_name,同名连接和相同连接 ID 只在当前项目中解析。
只有用户明确要求切换项目时才再次调用 select_dbeaver_project。项目列表不会改变选择;连接失败、配置缺失或连接未找到也不会自动改用其他项目。失败的项目选择保留原选择。MCP 重启后需重新选择;若首次调用连接工具且只有一个项目有 data-sources.json,服务会自动选定它,否则返回 PROJECT_REQUIRED。
项目会话保持选择,不缓存底层数据库连接或事务;每次数据库调用仍独立建立只读事务并清理连接。Python 调用者仍可通过 Settings.from_dbeaver(config_dir) 使用明确的本地项目配置目录。
所有工具接受可选的 database_type 枚举。新调用建议显式传 postgresql 或 oracle;旧调用省略时从所选连接识别。get_query_capabilities 不连接数据库,省略类型时返回 PostgreSQL 能力以兼容旧客户端。
{
"database_type": "oracle",
"connection": "已发现的连接 ID",
"database": "已发现的服务标识",
"schema": "已发现的 schema",
"query": {
"table": "已发现的表",
"alias": "t",
"columns": [{"source": "t", "column": "已发现的字段"}],
"limit": 50
}
}analyze_query 校验并描述查询,不读取业务行;execute_query 执行有界查询。explain_query 按数据库能力提供计划。Oracle 暂不提供计划接口,因为 EXPLAIN PLAN 会写计划表。read_postgresql_logs 仅适用于 PostgreSQL,read_database_settings 在 Oracle 中仅返回白名单 NLS 会话设置。
Oracle 支持 ON 关联、分组、HAVING、CASE、非递归 CTE、窗口函数、标量/存在性子查询、集合运算和分页;各函数、类型与条件的精确范围以 get_query_capabilities 为准。结构规范见 query-schema.json,PostgreSQL 结构示例见 query-examples.json。共享语言的合法结构不代表所有数据库都实现该能力。
代码结构与扩展
src/dbeaver_database_mcp/
core/
adapter.py # 公共适配接口与连接参数模型
registry.py # 数据库类型、DBeaver provider 与适配器注册
connection.py # DBeaver 配置与凭据读取
projects.py # 项目元数据发现与进程会话选择
service.py # 类型核对与公共调度
mcp_server.py # MCP 协议、工具定义与请求/响应限制
validation.py # 结构和复杂度校验
query_schema.py # 封闭的公共查询语言
catalog.py # 公共关系模型与依赖收集
errors.py # 脱敏错误与诊断
config.py # 服务配置与硬限制
adapters/
postgresql/ # PostgreSQL 执行、编译、目录、安全与日志
oracle/ # Oracle 执行、编译、目录、安全与会话
mcp_server.py # 兼容原启动入口新增数据库时:
在 adapters// 实现 core.adapter.DatabaseAdapter,返回 ConnectionParameters 和准确的 capabilities。数据库驱动、SQL 方言、值绑定、目录检查、依赖审查及事务清理均留在该目录。
在 core.registry 注册固定模块和 DBeaver provider。不得把 MCP 参数转为模块路径、连接字符串或自由 SQL。工具的 database_type 枚举自动取注册列表。
注册只返回固定安全信息的错误翻译器。所有工具方法必须遵守接口中的权限、绑定、只读、结果限制与清理要求。新增查询原子如需扩展公共语言,应更新 query_schema,并同步各适配器的能力或明确拒绝逻辑。
公共核心不导入数据库驱动。适配器不调用其他数据库的实现,也不通过字符串替换转换已有 SQL。
开发检查
python -m pip install -e ".[dev]"
python -m ruff check src tests
python -m pytest tests仓库只保留生产源码、接口说明和无需数据库连接的自动化测试源码。连接文件、测试数据集、临时服务、审计记录、构建产物与本地验证材料应放在仓库外。
许可证
Apache License 2.0。DBeaver、PostgreSQL、Oracle 及相关产品名称属于各自权利人。本项目并非这些产品的官方发布。
Available Tools
13 toolsanalyze_queryARead-onlyIdempotent
校验结构化查询的表、字段、权限和类型,返回查询结构摘要;不读取业务行。
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| schema | Yes | 所选database中的精确schema名字;未知时先用list_schemas或省略search_catalog的schema跨schema搜索。 | |
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 | |
| timeout_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuine context beyond that: it does NOT read business rows and it validates permissions/types, telling the agent this is a structural check rather than a data read.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded clause stating the validation scope, the return value, and the negative constraint. Every element earns its place with zero filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description at least states that a query-structure summary is returned. For a read-only validator with a self-describing nested query schema, this is largely sufficient, though the contents of the summary could be clearer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 60% - connection, database and schema carry good inline descriptions, but the large nested query object and timeout_ms are undocumented. The description adds nothing about individual parameters, so it relies on the schema; baseline 3 fits the moderate coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (校验/validate) and resource (结构化查询 - structured query), plus the scope of validation (tables, fields, permissions, types) and what it returns (查询结构摘要). The tagline '不读取业务行' sharpens it against siblings like execute_query, though it never names them explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: validating a query without reading rows suggests a pre-execution check, but the description never states when to reach for this vs explain_query or execute_query, nor any prerequisites. No explicit when/when-not guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dbeaver_statusBRead-onlyIdempotent
验证一个DBeaver连接下的精确database、可见schemas、双重只读状态、服务端版本和硬限制;不返回地址或账密。
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the full safety profile (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint=false), so the description adds only the disclosure that address and credentials are not returned. That is useful because there is no output schema, but it is thin on behavioral context such as what 'dual read-only status' means or how hard limits are surfaced.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, tightly packed sentence with the verb leading and the enumerated outputs following; the negative return clause is appended cleanly. No wasted words, though the density makes it slightly back-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only verification tool with no output schema, the description lists what is checked but does not describe the shape or format of the result, which matters when no output schema exists. Annotations cover the safety dimension, leaving this mostly adequate but with a real gap in return expectations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both required parameters with sourcing and prohibition rules (no guessing, no address/credentials). The description adds nothing beyond what the schema provides, which is the expected baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb (验证/verify) and resource (a DBeaver connection) and enumerates the exact facets inspected: database, visible schemas, dual read-only status, server version, and hard limits. It also states a negative scope (no address/credentials returned). It does not name which sibling it complements, so it falls short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named. The only workflow hint is indirect, carried by the parameter descriptions ('通过list_databases发现的...'), not by the tool description itself.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_queryBRead-onlyIdempotent
执行服务端组装的结构化SELECT;只读事务、账号原生读权限与RLS、依赖安全校验、参数绑定和有界结果。
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| schema | Yes | 所选database中的精确schema名字;未知时先用list_schemas或省略search_catalog的schema跨schema搜索。 | |
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 | |
| timeout_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent and non-destructive, so the safety bar is lower, yet the description adds substantial context: read-only transaction, account-native read permissions with RLS, dependency security validation, parameter binding, and bounded results. This goes well beyond the annotations, though it does not address rate limits or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence that front-loads the core action before listing behavioral constraints. It is compact and free of filler, though the comma-separated clause list is somewhat telegraphic.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and a deeply nested, complex query parameter, the description covers the execution/safety profile but says nothing about result shape, row limits actually returned, or timeout behavior. For a tool this complex, the return-value picture is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 60% with the four connection/database/schema/query params partly documented in the schema itself. The description adds only the general notion of 参数绑定 and 有界结果 (implying limit behavior) and does not clarify connection/database/schema/timeout semantics, so it is a baseline-adequate contribution.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (执行) and resource (服务端组装的结构化SELECT), which is clear and distinguishes it from catalog siblings. However, it does not explicitly contrast with query-analysis siblings like analyze_query or explain_query, so full sibling differentiation is missing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use or when-not-to-use guidance is given, and the alternatives (analyze_query, explain_query, scan_database, search_catalog) are never referenced. The agent must infer that this is the execution tool versus the analysis tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explain_queryARead-onlyIdempotent
对服务端生成的结构化SELECT读取计划成本摘要;不运行ANALYZE,返回脱敏的计划树与成本,隐藏条件值。
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| schema | Yes | 所选database中的精确schema名字;未知时先用list_schemas或省略search_catalog的schema跨schema搜索。 | |
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 | |
| timeout_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish readOnly/idempotent/non-destructive, and the description adds real behavioral value: it does not execute ANALYZE, returns a desensitized plan tree with costs, and hides condition values. That disclosure about masking and non-execution goes beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence that front-loads what the tool does and immediately appends the key non-behaviors. It is compact and wastes no words, though the semicolon-separated clauses pack several ideas that could be slightly clearer.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter tool with 4 required params, a deeply nested query schema, and no output schema, the description adequately frames purpose and safety but does not explain the returned plan/cost structure or parameter expectations. It is minimally viable but leaves gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 60%, so the schema documents connection/database/schema but leaves timeout_ms and the nested query structure without descriptions. The description adds nothing about parameter syntax or format, so it neither compensates nor regresses; baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (生成成本摘要) and resource (结构化SELECT读取计划), and clarifies it is a read-plan cost summarizer. However it does not explicitly differentiate itself from the sibling analyze_query, relying on the phrase '不运行ANALYZE' to imply the contrast.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage for server-side structured SELECT costing and signals it will not run ANALYZE, which hints at when it is preferred over analyze_query. But it gives no explicit when-to-use/when-not guidance or named alternatives among the 13 siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_query_capabilitiesARead-onlyIdempotent
查看结构化查询能力、参数语言和安全限制;不连接数据库。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered structurally. The description adds genuinely new behavioral context by clarifying that no database connection is made, but it says nothing about the shape or format of the returned capability data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compact clause pair, front-loaded with the three capabilities and ending with the key scoping constraint. Every element earns its place with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-argument, read-only discovery tool with full annotation coverage and no nested parameters, the definition supplies enough to call it correctly. The only minor gap is that, absent an output schema, it does not hint at what the returned capability description looks like.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, which is the baseline-4 case: there is nothing for the description to disambiguate and the empty schema is fully self-describing. No additional parameter semantics are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (查看/view) plus three concrete resources: structured query capabilities, parameter language, and security restrictions. The clause '不连接数据库' implicitly separates it from execute_query/analyze_query siblings, though no sibling is named explicitly, which keeps it just shy of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase '不连接数据库' signals this is a safe, non-executing inspection step, hinting a caller uses it to discover capabilities before invoking query tools. However, there is no explicit when-to-use statement or named alternative among the many query-oriented siblings (analyze_query, explain_query, execute_query), leaving usage to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_contextARead-onlyIdempotent
读取DBeaver连接内精确database/schema中的表或视图字段、注释、主外键、索引和近似行数;不读取业务行。
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | Yes | 所选database中的精确schema名字;未知时先用list_schemas或省略search_catalog的schema跨schema搜索。 | |
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=false, and destructiveHint=false, so the safety profile is covered. The description adds genuine behavioral value by clarifying the read is metadata-only and explicitly excludes business row data, which is the key operational distinction. It does not cover error behavior, cost, or latency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence that first states the scope (connection → exact database/schema) and then the metadata categories, closed by a semicolon-delimited exclusion. No filler, no restatement of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully enumerates the returned metadata categories (columns, comments, keys, indexes, approximate row count) and explicitly scopes out row data, which is what an agent needs to decide whether to call it. Only finer return-shape details and pagination/limits are unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75%, with the 'table' parameter lacking a description in the schema. The description compensates by clarifying that table accepts either a table OR a view ('表或视图'), and by emphasising that database/schema must be exact ('精确'), reinforcing the precision requirement on parameters that would otherwise be guessable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (读取/read) and enumerates exactly what metadata is retrieved: columns, comments, primary/foreign keys, indexes, and approximate row count, scoped to a precise database/schema. The explicit '不读取业务行' (does not read business rows) cleanly separates it from siblings like execute_query or scan_database.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states the operating context (metadata inside a specific DBeaver connection/database/schema) and provides one explicit exclusion ('does not read business rows'), which implicitly routes data-reading tasks elsewhere. It stops short of naming the alternative tool or stating prerequisites like 'connection must already exist' and 'database/schema must be discovered first', which the schema fields carry instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_databasesARead-onlyIdempotent
列出一个DBeaver PostgreSQL连接下当前账号可连接的全部数据库;返回默认库、模板库标志和注释。
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=false), so the bar is lower. The description still adds useful context by stating the result scope (only databases the current account can connect to) and what is returned (default DB, template flag, comments).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One compact sentence that front-loads the resource and scope and appends the return fields; no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-output-schema, single-parameter read tool, the description conveys scope, constraints, and the returned fields adequately. Output format details (ordering, pagination) are absent but not critical here.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With a single parameter and 100% schema description coverage, the schema already documents the connection argument and its prohibition on addresses/credentials. The description adds nothing about the parameter beyond what the schema states, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource (列出...数据库) and scopes it precisely to databases reachable by the current account under a DBeaver PostgreSQL connection. The resource noun inherently separates it from siblings like list_schemas, though no sibling is named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The scope (per-connection, current-account databases) implies when the tool applies, but there is no explicit when-to-use guidance or routing to alternatives such as list_schemas or list_dbeaver_connections.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_dbeaver_connectionsARead-onlyIdempotent
列出DBeaver中已有且可用的PostgreSQL连接,并返回每个连接可进入的数据库摘要;不返回地址或账密。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint and non-destructive behavior, so the safety profile is covered. The description adds genuinely useful disclosure beyond that: it explicitly states that addresses and credentials are NOT returned, which is a meaningful data-disclosure boundary an agent cannot derive from the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compact sentence with the resource and scope front-loaded and a semicolon-delimited exclusion clause. Every element earns its place with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
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 return-value burden, and it does explain that each connection comes with a usable-database summary and that sensitive fields are omitted. Ordering, pagination and count details are unstated, but for a zero-parameter read listing they are minor gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4; there is nothing for the description to document semantically. It correctly avoids inventing parameters or filter syntax that does not exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (列出) and resource (DBeaver中已有且可用的PostgreSQL连接), plus the scope (available/usable connections) and the return content (数据库摘要). An agent can tell this apart from list_databases, which enumerates databases within a connection, without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance, and no sibling is named as an alternative. The implied workflow (find a connection before calling list_databases) is inferable but left to the agent, which is the definition of minimum-viable usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_schemasARead-onlyIdempotent
列出一个DBeaver连接下精确database中的可见schema及每个schema的表、视图和对象计数。
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds that only visible schemas are returned and that table/view/object counts are included, but it does not cover permission requirements, pagination, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence states scope and return content without filler. It is appropriately sized for a simple listing tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a low-complexity listing tool: annotations cover safety, schema covers both required params, and the description states the returned content (schemas and counts). Missing output format and explicit usage sequencing keep it from being fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%; both required parameters have detailed schema-level descriptions. The tool description adds no parameter-level detail beyond that, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (列出/list) and resource (可见schema及每个schema的表、视图和对象计数) within an exact DBeaver connection/database. It is clearly distinct from sibling tools like list_databases and table-level tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The tool description gives no when-to-use, prerequisites, or alternative guidance. The only routing hint appears in the schema field description for database ('通过list_databases发现...'), not in the description itself.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_database_settingsARead-onlyIdempotent
读取当前账号可见的数据库配置,替代SHOW/SHOW ALL;敏感配置值脱敏。
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | ||
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only, idempotent and non-destructive semantics, and the description adds genuinely new context: results are scoped to the current account's visibility and sensitive config values are masked (脱敏). It does not, however, describe output shape or any permission requirements beyond account scope.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compressed sentence front-loads the action, scope, replacement semantics and the masking guarantee. Nothing is wasted, though the density leaves the 'names' filter unexplained.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-parameter read tool with no output schema, the description covers what the tool is and its safety-relevant behavior, but omits what the returned settings look like and the purpose of 'names'. Adequate but leaves clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67%: database and connection carry explicit constraints (must come from list_databases / DBeaver connection list, no addresses or credentials), while 'names' is undocumented. The description adds no parameter-level meaning, so it neither compensates for nor extends the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (read database configuration) and narrows scope with 'visible to the current account'. The 'replaces SHOW/SHOW ALL' clause helpfully distinguishes it from raw-query siblings like execute_query, though no sibling tool is named directly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'替代SHOW/SHOW ALL' gives an implied when-to-use signal by routing agents away from running SHOW manually via execute_query. However, it offers no explicit when-not or named alternative among the large sibling set (scan_database, search_catalog, etc.).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_postgresql_logsARead-onlyIdempotent
读取精确database的PostgreSQL当前JSON/CSV日志尾部;仅安全事件摘要,不接收路径或返回SQL/原始消息。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| since | No | ||
| levels | No | ||
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| max_bytes | No | ||
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the full safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description nevertheless adds genuine behavioral context: output is limited to security-event summaries, it does not accept user-supplied paths, and it will not return raw SQL/messages — useful constraints that go beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense, front-loaded sentence that leads with the verb and resource and then appends constraints; there is no filler. The clauses are packed but each carries information, so only minor readability cost.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter tool with no output schema, the description covers the target and output scope adequately, and annotations cover safety. The gap is the undocumented input parameters (limit, since, levels, max_bytes), which an agent needs to call the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33% (2 of 6 parameters documented), so the description must compensate. It clarifies only the data source (exact database, no paths) and says nothing about limit, since, levels, or max_bytes, leaving half the input contract unexplained in both the schema and the prose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (读取/read) plus resource (PostgreSQL 当前 JSON/CSV 日志尾部) and the scope constraint (精确 database, log tail). An agent can immediately distinguish this from read_database_settings or execute_query without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the resource ('read the log tail for a specific database'), and there is a boundary statement ('不接收路径... 不返回SQL/原始消息'). However, no explicit when-to-use vs alternatives or when-not conditions are given, and no sibling tool is named to route the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_databaseARead-onlyIdempotent
扫描DBeaver连接内一个精确database/schema的表和视图目录,返回对象类型、注释、近似行数和计数;不读取业务行。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| schema | Yes | 所选database中的精确schema名字;未知时先用list_schemas或省略search_catalog的schema跨schema搜索。 | |
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 | |
| name_pattern | No | ||
| object_types | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world). The description adds genuine value beyond them: it enumerates what is returned (object type, comment, approximate row count, counts) and, critically, states what is NOT done ('不读取业务行'). It stops short of disclosing cost/limits of the approximate row counting.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded clause leads with the verb and scope, and every element earns its place, including the terminal negation '不读取业务行' which meaningfully bounds behavior. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only catalog scanner with no output schema, the description adequately establishes scope and return contents, and annotations carry the safety profile. But it says nothing about the filtering parameters (name_pattern, object_types) or the limit/pagination behavior, leaving the 50% schema-coverage gap unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: connection, database, and schema carry rich descriptions, but limit, name_pattern, and object_types have none. The description adds no parameter-level meaning at all, so it does not compensate for the undocumented half. Baseline 3 given the schema already handles the required parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete verb (扫描/scan) and resource (表/视图目录 - table and view catalog) scoped to an exact database/schema within a DBeaver connection, and explicitly notes it does NOT read business rows. The scope is well drawn, but siblings like search_catalog and get_table_context are not named in the description itself for differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied rather than stated: the 'returns metadata, does not read business rows' framing signals a catalog-inspection use case as opposed to a data-reading one. However, the description never says when to prefer this over search_catalog, list_schemas, or get_table_context; that routing only appears in the schema-level description of the 'schema' parameter.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_catalogARead-onlyIdempotent
按表名、字段名或注释搜索精确database目录;schema可省略以跨全部可见非系统schema搜索。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| schema | No | 所选database中的精确schema名字;未知时先用list_schemas或省略search_catalog的schema跨schema搜索。 | |
| database | Yes | 通过list_databases发现的精确PostgreSQL数据库名;不得猜测或传地址。 | |
| connection | Yes | DBeaver中已有PostgreSQL连接的显示名称或连接ID;不得传地址、账号或密码。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior, so safety is covered. The description adds a scope behavior: omitting schema searches all visible non-system schemas. It does not describe return format, pagination, or authentication beyond what annotations and schema provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence separated by a semicolon. It immediately states what is searched and then gives the schema-omission behavior. No words are wasted, and it is appropriately sized for a read-only search tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The definition is adequate for invocation: required parameters and key semantics are covered. However, with no output schema, the description does not explain what results look like, and it omits return or pagination behavior. Annotations and schema descriptions carry much of the context, leaving some gaps but not enough to prevent correct use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions cover 60% of parameters (connection, database, schema), and the description adds meaning for the query parameter by specifying table/column/comment search. It also restates the schema-omission behavior already documented on the schema parameter. It does not clarify the limit parameter or compensate fully for the uncovered parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states a specific verb (搜索/search) and resource (精确database目录/exact database catalog), and specifies search fields: table name, column name, or comment. It also clarifies default schema scope when schema is omitted. It does not explicitly differentiate from siblings like scan_database or get_table_context, so it misses the top tier.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the stated search fields and the note that schema can be omitted to search across all visible non-system schemas. However, there is no explicit guidance on when to prefer this tool over scan_database, get_table_context, or list_schemas, and no exclusions or prerequisites are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
13 tool updates
v0.5.0- First observed
analyze_query - First observed
dbeaver_status - First observed
execute_query - First observed
explain_query - First observed
get_query_capabilities - First observed
get_table_context - First observed
list_databases - First observed
list_dbeaver_connections - First observed
list_schemas - First observed
read_database_settings - First observed
read_postgresql_logs - First observed
scan_database - First observed
search_catalog
TDQS
Scored across 13 tools
Tools are mostly clearly distinct along a database-exploration hierarchy (connections → databases → schemas → catalog → table context) plus a query lifecycle (analyze → explain → execute). Minor overlap exists between scan_database, search_catalog, and get_table_context, and between dbeaver_status and list_dbeaver_connections, but descriptions disambiguate them reasonably well.
Nearly all tools follow a consistent snake_case verb_noun pattern (list_databases, scan_database, get_table_context, execute_query, read_postgresql_logs). The lone outlier is 'dbeaver_status', which lacks a verb prefix and breaks the otherwise predictable convention.
13 tools is well-scoped for a read-only database exploration/inspection server covering connection, catalog, query, and diagnostic concerns. Each tool earns its place without obvious redundancy.
The read-only surface is comprehensive: connections, databases, schemas, catalog scan/search, table context, query analyze/explain/execute, plus logs and settings. Minor gaps exist (no dedicated index/constraint or view-listing tool, though these are partly folded into get_table_context), and write operations are intentionally absent.
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Query your Postgres from ChatGPT or Claude without exposing the database or handing over credentials. Run npx boltschema connect next to your database and it dials out over HTTPS — no inbound firewall rule, no open port, works with localhost and VPC-private databases. Read-only is enforced by a SQL guard, a Postgres READ ONLY transaction, and a scoped role generated for you.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables secure read-only interactions with PostgreSQL databases through natural language. Provides database inspection, table listing, and SQL query execution with built-in security validation.-
- AlicenseNot gradedqualityDmaintenanceEnables secure read-only access to PostgreSQL databases through SELECT queries only, with tools for exploring schemas, listing tables, and executing common queries while preventing any data modification operations.889 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables secure read-only access to PostgreSQL databases, allowing users to list tables, query schemas, execute SELECT statements, and inspect table structures through natural language interactions.977 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables safe interaction with PostgreSQL databases through read-only queries, schema exploration, and performance analysis.161 npmMIT