Skip to main content
Glama
eeantoss

mysql-mcp-server

by eeantoss

MySQL/PostgreSQL MCP 服务器

一个基于 Model Context Protocol (MCP) 的 MySQL 与 PostgreSQL 数据库操作服务器,支持跨平台使用,可以通过 MCP 协议执行 SQL 语句、脚本和数据库管理操作。

TL;DR(精简版)

  • 项目诉求(一句话):面向多项目多环境的智能数据库管理,通过 MCP 无需本地数据库客户端即可执行 SQL/脚本与环境切换。

  • 安装(两选一)

    • 本机开发:npm run build && npm link

    • 全局安装(Git):npm i -g git+https://github.com/eeantoss/mysql-mcp-server.git

  • Windsurf/Claude MCP 最小配置

    {
     "mcpServers":{ 
    
      "mysql": {
        "command": "mysql-mcp-server.cmd",
        "env": {
          "DEBUG": "false"
        }
      }
     } 
    }

在规则中添加,调用mysql数据库连接的时候,执行mcp服务

  • 三大典型场景(即贴即用)

    • 本地未安装 MySQL 客户端(仍可执行 SQL)

      { "tool": "database_connect", "arguments": {"host":"localhost","port":3306,"user":"root","password":"pwd","database":"test"} }
      SELECT 1 AS ok;  -- 校验
      SHOW TABLES;     -- 列出表
    • 数据库在 Docker 容器中

      { "tool": "database_connect", "arguments": {"connectionType":"docker","containerName":"database_container","user":"root","password":"pwd","database":"test"} }
    • 数据库在远程 IP(如 1.1.1.2:3306)

      { "tool": "database_connect", "arguments": {"host":"1.1.1.2","port":3306,"user":"root","password":"pwd","database":"prod"} }

更多功能/演示:见下方"文档导航"。

Related MCP server: mysql-mcp-server

📚 文档导航

功能特性

🌟 核心功能

  • 🔌 多种连接方式:支持直连、Docker 容器、远程连接

  • 🖥️ 跨平台兼容:支持 Windows、Linux、macOS

  • 📝 SQL 执行:单条 SQL 语句执行,支持参数化查询

  • 📄 脚本执行:支持 SQL 脚本文件和批量 SQL 语句执行

  • 🗄️ 数据库结构查询:获取表、列、索引、外键、视图信息

  • 🔍 连接测试:测试数据库连接状态和性能

  • 连接池管理:自动管理数据库连接池,提高性能

  • 🛡️ 错误处理:完善的错误处理和日志记录

🚀 智能项目管理 (新功能)

  • 🔍 自动项目检测:智能识别 Spring Boot、Node.js、Laravel、Django 项目

  • 🌍 多环境支持:自动解析 dev、test、prod 等多个环境配置

  • 🔄 动态环境切换:无需重启即可在不同数据库环境间切换

  • 📁 项目感知:根据工作目录自动加载项目配置文件

  • 🎯 会话管理:支持多项目多环境的并发连接管理

🛠️ Node.js 版本管理 (新功能)

  • 🔍 版本检查:自动检查 Node.js 版本是否符合要求 (≥ 18.0.0)

  • 📋 切换指导:提供详细的 Node.js 版本切换指导

  • 🔄 包装脚本:提供带版本检查的启动脚本

安装和配置

1. 安装依赖

npm install

Node 版本要求(重要)

  • 需要 Node.js ≥ 18。

  • 若使用 nvm(Windows):

nvm use 18.20.8
node -v   # 期望输出 v18.x

全局安装(两种方式,选其一)

  • 开发者本地(推荐):

npm run build
npm link   # 将本项目注册为全局命令 mysql-mcp-server
  • 从 GitHub 全局安装:

npm i -g git+https://github.com/eeantoss/mysql-mcp-server.git

2. 环境配置

复制 .env.example.env 并配置您的数据库连接信息:

cp .env.example .env

编辑 .env 文件:

# 数据库类型:mysql 或 postgresql
DATABASE_TYPE=mysql

# 通用连接配置
DATABASE_HOST=localhost
DATABASE_PORT=3306
DATABASE_USER=root
DATABASE_PASSWORD=your_password
DATABASE_NAME=your_database

# PostgreSQL 默认 schema(可选,默认 public)
DATABASE_SCHEMA=public

# Docker 连接配置 (可选)
DOCKER_CONTAINER_NAME=database_container
DOCKER_DATABASE_PORT=3306

# 连接池配置
DATABASE_CONNECTION_LIMIT=10
DATABASE_ACQUIRE_TIMEOUT=60000
DATABASE_TIMEOUT=60000

# 调试模式
DEBUG=false

3. 编译项目

npm run build

4. 启动服务器

npm start

或者开发模式:

npm run dev

或者带版本检查的启动模式:

npm run start:check

5. 在 Windsurf / Claude 中以 MCP 方式启动(示例)

c:\\Users\\26811\\.codeium\\windsurf\\mcp_config.json 中配置:

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": ["C:\\Users\\26811\\CascadeProjects\\mysql-mcp-server\\build\\index.js"],
      "env": { "DEBUG": "false" }
    }
  }
}

或者使用带版本检查的包装脚本:

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": ["C:\\Users\\26811\\CascadeProjects\\mysql-mcp-server\\bin\\mysql-mcp-server-with-check.js"],
      "env": { "DEBUG": "false" }
    }
  }
}

注意:使用全局 CLI 后,无需写死绝对路径;部分 IDE 不允许设置 cwd 字段,请仅指定 command 即可。

MCP 工具列表

🌟 智能项目管理工具

1. database_detect_project - 检测项目配置

自动检测当前项目的数据库配置文件和环境设置。

参数:

  • workingDirectory (string, 可选): 项目根目录路径,默认为当前目录

支持的项目类型:

  • Spring Boot (application.yml, application-*.yml)

  • Node.js (.env, .env.*)

  • Laravel (.env, config/database.php)

  • Django (settings.py)

2. database_list_environments - 列出环境

列出检测到的所有数据库环境配置。

3. database_connect_environment - 连接环境

连接到指定的项目环境。

参数:

  • environmentName (string, 必需): 环境名称(如:dev, test, prod)

4. database_switch_environment - 切换环境

切换到不同的数据库环境。

参数:

  • environmentName (string, 必需): 要切换到的环境名称

5. database_list_sessions - 列出会话

列出所有活跃的数据库连接会话。

6. database_get_project_summary - 项目摘要

获取项目数据库配置的完整摘要信息。

🔧 基础数据库工具

7. database_connect - 手动连接数据库

连接到 MySQL 数据库。

参数:

  • host (string): MySQL 服务器地址,默认 'localhost'

  • port (number): MySQL 端口号,默认 3306

  • user (string): 用户名,默认 'root'

  • password (string): 密码 (必需)

  • database (string): 数据库名称(可选)

  • connectionType (string): 连接类型,可选值:'direct', 'docker', 'remote',默认 'direct'

  • containerName (string): Docker 容器名称(仅当 connectionType 为 'docker' 时需要)

示例:

{
  "host": "localhost",
  "port": 3306,
  "user": "root",
  "password": "mypassword",
  "database": "testdb",
  "connectionType": "direct"
}

8. database_execute_sql - 执行 SQL 语句

执行单条 SQL 语句。

参数:

  • sql (string): 要执行的 SQL 语句 (必需)

  • params (array): SQL 参数(可选)

示例:

{
  "sql": "SELECT * FROM users WHERE age > ?",
  "params": ["25"]
}

9. database_execute_script - 执行 SQL 脚本文件

执行 SQL 脚本文件。

参数:

  • scriptPath (string): SQL 脚本文件的完整路径 (必需)

示例:

{
  "scriptPath": "/path/to/your/script.sql"
}

10. database_execute_batch - 批量执行 SQL

批量执行多条 SQL 语句。

参数:

  • sqlScript (string): 包含多条 SQL 语句的脚本内容 (必需)

示例:

{
  "sqlScript": "CREATE TABLE test (id INT PRIMARY KEY); INSERT INTO test VALUES (1);"
}

11. database_get_schema - 获取数据库结构

获取数据库结构信息,包括表、列、索引、外键、视图等。

参数:

  • databaseName (string): 数据库名称(可选,默认使用当前连接的数据库)

示例:

{
  "databaseName": "mydb"
}

12. database_test_connection - 测试连接

测试当前数据库连接状态。

参数:

🛠️ Node.js 版本管理工具

13. check_node_version - 检查 Node.js 版本

检查当前 Node.js 版本是否符合 MySQL MCP 服务器的要求。

参数:

返回信息:

  • 当前 Node.js 版本

  • 最低要求版本 (v18.0.0)

  • 检查结果 (符合/不符合要求)

  • 如果不符合要求,提供详细的解决方案指导

常用操作示例(可复制)

以下示例展示"连接 → 验证 → 列表 → CRUD"的完整流程,所有 SQL 均明确显示:

  • 连接(示例:localhost:3308/poseidon,root/root)

{ "tool": "database_connect", "arguments": {"host":"localhost","port":3308,"user":"root","password":"root","database":"poseidon"} }
  • 连接校验 SQL

SELECT 1 AS ok;
  • 列出当前库所有表

SHOW TABLES;
  • CRUD 演示

-- 建表(存在则忽略)
CREATE TABLE IF NOT EXISTS test_user (
  id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(64) NOT NULL,
  age INT NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 插入
INSERT INTO test_user (name, age) VALUES ("Alice", 28), ("Bob", 35);

-- 查询
SELECT id, name, age, created_at FROM test_user ORDER BY id;

-- 更新
UPDATE test_user SET age = age + 1 WHERE name = "Alice";

-- 验证更新
SELECT id, name, age FROM test_user WHERE name = "Alice";

-- 删除
DELETE FROM test_user WHERE name = "Bob";

建议在对话式智能体中,每一步先回显"将执行的 SQL/动作",再调用 MCP 工具执行,最后回显结果,保证可观测性。

14. database_disconnect - 断开连接

断开数据库连接。

参数:

使用场景

场景 1:多项目多环境管理 🌟

问题:开发者经常需要在不同项目的不同环境间切换操作数据库

  • 项目A:开发环境(1.1.1.1:3306)、测试环境(1.1.1.1:3307)、生产环境(1.1.1.2:3306)

  • 项目B:本地环境(localhost:3306)、云端环境(cloud.db.com:3306)

解决方案

您: "检测当前Spring Boot项目的数据库配置"
Claude: [自动检测] → 发现dev、test、prod三个环境

您: "连接到开发环境,查询用户数据"
Claude: [连接dev环境] → [执行查询]

您: "切换到生产环境,执行相同查询对比数据"
Claude: [切换prod环境] → [执行查询] → [对比结果]

场景 2:替代命令行 MySQL 客户端

当您的系统没有安装 MySQL 客户端,或者 MySQL 运行在 Docker 容器中时,可以使用此 MCP 服务器来执行 SQL 操作。

# 传统方式(可能失败)
mysql -u root -p mydb < script.sql

# 使用 MCP 方式
# 通过 MCP 客户端调用 database_execute_script 工具

场景 3:智能体 SQL 操作

在 AI 智能体中集成数据库操作能力,让智能体能够:

  • 自动检测项目配置并连接相应环境

  • 执行数据查询和分析

  • 运行数据库脚本

  • 管理数据库结构

  • 执行数据迁移

  • 在多环境间进行数据对比

场景 4:跨平台数据库管理

在不同操作系统上提供统一的数据库操作接口,无需安装特定的数据库客户端。

Docker 支持

连接到 Docker 中的 MySQL

如果您的 MySQL 运行在 Docker 容器中,可以这样连接:

{
  "host": "localhost",
  "port": 3306,
  "user": "root",
  "password": "password",
  "connectionType": "docker",
  "containerName": "database_container"
}

在 Docker 中运行 MCP 服务器

您也可以将 MCP 服务器本身运行在 Docker 中:

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
CMD ["npm", "start"]

故障排除

常见问题

  1. 连接失败

    • 检查 MySQL 服务是否运行

    • 验证连接参数(主机、端口、用户名、密码)

    • 确认防火墙设置

  2. 权限错误

    • 确保用户有足够的数据库权限

    • 检查 MySQL 用户配置

  3. Docker 连接问题

    • 确认容器名称正确

    • 检查端口映射

    • 验证网络连接

  4. MCP 报错:failed to initialize server: transport error: server terminated

    • 常见原因:Node 版本过低或 ESM 主入口判断差异。

    • 处理:确保 Node ≥ 18;我们已在 src/index.ts 修复入口判断(pathToFileURL(process.argv[1]) 比较)并使用 process.stdin.resume() 保活。

    • 若更新后仍报错,请在 IDE 中 Reload Window 或重存 mcp_config.json 触发重启。

  5. PowerShell 提示 Execution Policy / profile.ps1 安全警告

    • 这是终端环境提示,不影响构建与运行,可忽略或按需调整系统策略。

  6. 连接测试语句报错 near 'current_time'

    • 旧版本使用 NOW() as current_time 在部分 MySQL/MariaDB/SQL 模式下可能报错。

    • 已改为更高兼容的探针:SELECT 1 AS ok; 与可选 SELECT @@version AS version;

    • 如仍遇到此错误,请确认已重启 MCP 进程并加载最新构建。

Node.js 版本问题

如果遇到 ReferenceError: AbortController is not defined 错误,这表明您正在使用低于 v18.0.0 的 Node.js 版本。

解决方案:

  1. 使用 check_node_version 工具检查当前版本

  2. 按照工具提供的指导切换到合适的 Node.js 版本

  3. 或者使用带版本检查的启动脚本 (npm run start:check)

设置环境变量 DEBUG=true 启用调试模式,查看详细的日志信息。

开发

项目结构

mysql-mcp-server/
├── src/
│   ├── index.ts                    # MCP 服务器主程序
│   ├── enhanced-connection-manager.ts # 会话管理
│   ├── project-detector.ts         # 项目配置自动检测
│   ├── connection-manager-factory.ts # 连接管理器工厂
│   ├── dialect-factory.ts        # SQL 方言工厂
│   └── core/
│       ├── types.ts               # 通用类型定义
│       ├── config-resolver.ts     # 配置解析
│       ├── connection-manager.ts  # 连接管理器接口
│       ├── dialect.ts             # SQL 方言接口
│       ├── database-client.ts     # 数据库客户端工厂
│       ├── database-tools.ts      # 通用数据库工具
│       └── sql-parser.ts          # SQL 脚本解析
│   ├── mysql/
│   │   ├── mysql-connection-manager.ts
│   │   └── mysql-dialect.ts
│   └── postgres/
│       ├── postgres-connection-manager.ts
│       └── postgres-dialect.ts
├── build/                         # 编译输出
├── package.json
├── tsconfig.json
└── README.md

开发命令

# 安装依赖
npm install

# 编译
npm run build

# 开发模式(监听文件变化)
npm run watch

# 启动服务器
npm start

# 带版本检查的启动模式
npm run start:check

# 开发模式启动
npm run dev

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

更新日志

v1.0.0

  • 初始版本

  • 支持基本的 MySQL 操作

  • 跨平台兼容

  • Docker 支持

  • 完整的 MCP 协议实现

v1.1.0

  • 新增:智能项目检测与多环境管理(database_detect_project 等 6 个工具)

  • 新增:增强连接管理器,支持多会话与快速切换

  • 新增:启动与生命周期详细日志,改进 ESM 入口判断与保活

  • 优化:连接测试改为 SELECT 1 AS ok / SELECT @@version AS version,提升兼容性

  • 文档:新增 Windsurf/Claude MCP 配置示例与完整 CRUD 演练

v2.0.0

  • 破坏性变更:所有工具名从 mysql_* 改为 database_*

  • 新增:PostgreSQL 数据库支持(pg 驱动)

  • 新增:统一的 ConnectionManager / SQLDialect 抽象层,支持未来扩展更多数据库

  • 新增:环境变量支持 DATABASE_TYPEDATABASE_HOST 等中性变量(保留 MYSQL_*/PG* fallback)

  • 新增:database_connect 支持显式传入数据库类型

  • 优化:项目检测器支持识别 PostgreSQL 配置

v1.2.0

  • 新增:Node.js 版本检查工具 (check_node_version)

  • 新增:带版本检查的启动脚本

  • 新增:Node.js 版本管理相关文档

  • 优化:改进错误处理和用户指导信息

Available Tools

14 tools
check_node_versionB

Check Node.js version

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states 'Check Node.js version' without revealing what the tool actually does (e.g., executes a command, returns a string, or may fail if Node.js is missing). This is minimal and leaves significant ambiguity about behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no unnecessary words. It is front-loaded and immediately states the purpose, earning the maximum score for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter, no-output-schema tool, the description is adequate but minimal. It does not mention what the returned information looks like (e.g., version string) or any potential failure modes, which would be useful context. However, its simplicity means it is not severely incomplete, warranting a middle score.

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?

The tool has zero parameters, so the schema provides no parameter details. Per the baseline for zero-parameter tools, a score of 4 is appropriate since the description does not need to explain parameters, but could still mention any implicit inputs (e.g., environment variables).

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?

The description uses a specific verb ('Check') and resource ('Node.js version'), clearly distinguishing it from the database-focused sibling tools. However, it could be more precise by stating whether it returns the version or validates it, 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.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor any context for expected usage. While siblings are all database-related, the description itself does not mention any use cases or exclusions, leaving the agent without explicit direction.

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

database_connectC

Connect to a MySQL or PostgreSQL database

ParametersJSON Schema
NameRequiredDescriptionDefault
sslNoEnable SSL (boolean) or SSL options (object)
hostNoDatabase host
portNoDatabase port (mysql default 3306, postgresql default 5432)
typeNoDatabase type: mysql or postgresql
userNoDatabase user
schemaNoPostgreSQL schema (default: public)
charsetNoMySQL charset (default: utf8mb4)
databaseNoDatabase name
passwordNoDatabase password
timezoneNoMySQL timezone (default: local)
dockerPortNoDocker mapped port (when connectionType is docker)
containerNameNoDocker container name (when connectionType is docker)
connectionTypeNoConnection type: direct, docker, or remotedirect

TDQS

C2.4/5.0
Behavior1/5

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

With no annotations, the description carries the full burden of disclosing behavioral traits, but it only says 'Connect'. It fails to mention that this likely creates a persistent session, may require cleanup via database_disconnect, how authentication works, or what happens on duplicate connections. The description is essentially a label, not an explanation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is concise but not appropriately structured for a tool with 13 parameters and multiple connection types. It lacks any kind of organization or detail that would guide an agent, making it under-specified rather than elegantly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (13 parameters, no output schema, no annotations), the description is severely incomplete. It does not explain what a successful connection yields, how connection sessions are managed, or how this tool fits into the broader database workflow. The omission of side effects and return behavior leaves the agent with insufficient context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema itself includes detailed descriptions for all 13 parameters, including defaults and enums. The description adds no extra parameter insight, but the baseline of 3 applies because the schema already thoroughly documents parameters.

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?

The description states the verb 'Connect' and the resource 'MySQL or PostgreSQL database', making the core purpose clear. However, it does not distinguish this tool from siblings like database_test_connection or database_connect_environment, which also relate to connecting or establishing sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as database_test_connection or database_connect_environment. There are no mentions of prerequisites, connection types, or typical scenarios.

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

database_connect_environmentB

Connect to a specific detected database environment

ParametersJSON Schema
NameRequiredDescriptionDefault
environmentNameYesName of the environment to connect to

TDQS

B3/5.0
Behavior2/5

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

The description only says 'Connect' without revealing side effects (e.g., session creation, persistent state) or prerequisites beyond 'detected'. With no annotations, the description carries the full burden but provides minimal behavioral disclosure.

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?

The description is a single concise sentence with no wasted words. It is appropriately short for the tool's simplicity, though its brevity contributes to lack of context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple schema and lack of annotations, the description should provide more context about when to use this tool, what 'connect' implies (session, transaction, etc.), and any prior steps like environment detection. It is too minimal for safe invocation.

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% with a clear param description. The description adds the qualifier 'detected,' which clarifies that the environment must be one that was previously discovered, thereby adding meaning beyond the schema.

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?

The description clearly states the action ('Connect') and the resource ('specific detected database environment'), distinguishing it from the generic database_connect by requiring a previously detected environment. It is specific but not as precise as naming the exact purpose or differentiating from database_switch_environment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like database_connect or database_switch_environment. The word 'detected' implies a prerequisite, but there is no clear statement of prerequisites or exclusions.

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

database_detect_projectB

Detect database configuration from a project directory

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the project directory

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not state whether the operation is read-only, whether it scans files, network access is needed, or any side effects. The term 'detect' implies a non-mutating operation, but this is not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the verb and object. Every word contributes to the core meaning, with no redundancy or filler. It is appropriately sized for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description is mostly adequate but does not explain the return value or any behavioral details like what 'detect' produces (e.g., a configuration object). The lack of output schema increases the need for description, but given the low complexity, a score of 3 is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides a full description of the sole parameter 'projectPath' as 'Path to the project directory'. The tool description adds little beyond that, merely echoing 'project directory'. Since schema description coverage is 100%, the baseline is 3; there is no extra semantic value added.

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?

The description 'Detect database configuration from a project directory' clearly identifies the verb ('detect'), the resource ('database configuration'), and the context ('project directory'). This is specific enough to distinguish it from sibling tools like database_connect or database_execute_sql, though it could be more explicit about what detection entails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description simply states what it does without mentioning prerequisites, use cases, or exclusions. There is no reference to sibling tools or scenarios where this should be preferred.

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

database_disconnectB

Close the active database connection

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdNoOptional session ID to disconnect (defaults to active session)

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description must convey behavioral traits. It states 'close' as a mutation but does not disclose side effects, reversibility, or error behavior (e.g., what happens if no connection is active). The description adds minimal value beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no redundant words. It is front-loaded with the action verb and resource, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional parameter, no output schema), the description is minimally adequate. However, it lacks context about return values, error conditions, or the effect of passing a sessionId, which could leave an agent uncertain about edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides a description for the sessionId parameter, so the description does not need to repeat it. The tool description adds no extra param semantics, but the baseline of 3 applies due to full schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Close' and identifies the resource 'database connection', clearly stating the action. It distinguishes from sibling tools like database_connect (which opens) and database_list_sessions (which lists), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description only states what it does, not when to invoke it, nor does it mention any prerequisites or exclusions (e.g., not for closing other environments' connections).

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

database_execute_batchB

Execute multiple SQL statements as a batch on the active database connection

ParametersJSON Schema
NameRequiredDescriptionDefault
batchYesArray of SQL statements with optional parameters

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It reveals the dependency on an active connection but does not disclose transaction behavior, error handling, whether results are returned, or whether the batch is atomic. This is a significant gap for a mutation-capable SQL tool.

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?

The description is a single clear sentence with no wasted words. It is appropriately front-loaded, though it sacrifices necessary detail for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema and no annotations, and batch SQL execution is complex. The description only notes the active connection requirement, leaving out behavior on failure, return values, and the distinction from script execution. This is insufficient for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description covers 100% of parameters with the 'batch' array described. The tool description does not add additional parameter guidance beyond restating that it executes multiple statements. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (execute), the object (multiple SQL statements as a batch), and the scope (active database connection). It distinguishes from sibling database_execute_sql, which likely handles a single statement, though it doesn't explicitly differentiate from database_execute_script.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool instead of database_execute_sql or database_execute_script. The word 'batch' implies multiple statements, but there is no explicit statement of prerequisites (e.g., must have an active connection) or when to use alternatives.

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

database_execute_scriptB

Execute a SQL script with multiple statements on the active database connection

ParametersJSON Schema
NameRequiredDescriptionDefault
scriptYesSQL script to execute

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool executes a script and requires an active connection, but it does not mention side effects, return values, transaction handling, or error behavior—important for an execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence conveys the essential action, resource, and context without any filler or redundant restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool, the description covers purpose and prerequisite. However, with no output schema and no annotations, it omits expected return values and side-effect details, leaving notable gaps for an execution tool.

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?

The schema only says the 'script' is a 'SQL script to execute'. The description adds valuable semantics: it is a multi-statement script, and it runs on the active database connection. This goes beyond the schema and helps the agent understand the parameter's role.

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?

The description uses a specific verb ('Execute') and names the resource ('SQL script') while adding scope ('multiple statements', 'active database connection'). It is close to distinguishing from siblings, but 'database_execute_batch' likely overlaps on multi-statement execution, so differentiation is not fully explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'on the active database connection' implies a prerequisite, and 'multiple statements' hints at the intended use case. However, it does not explicitly state when to prefer this tool over database_execute_sql or database_execute_batch.

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

database_execute_sqlA

Execute a single SQL statement on the active database connection

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL statement to execute
paramsNoOptional parameters for prepared statement

TDQS

A3.8/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral disclosure burden. It only says 'execute' and does not disclose whether the SQL may be read-only or mutating, what side effects may occur, or what the return value looks like. The active connection context is a minor prerequisite but insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no unnecessary words. It states the action, resource, and key constraints efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an arbitrary SQL execution tool with no output schema and no annotations, the description omits crucial return value information (e.g., result sets, affected rows), error behavior, and side effects. The sibling tool names suggest variants but provide no usage guidance. The description is too sparse to fully inform an agent about executing a potentially destructive statement safely.

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% with descriptions for both parameters, but the tool description adds the important constraint that the sql parameter must contain a single statement (not a script/batch). This adds semantic value beyond the schema's generic 'SQL statement to execute'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Execute') and resource ('SQL statement') with a clear scope qualifier ('single', 'active database connection'). It effectively distinguishes this tool from sibling tools like database_execute_script and database_execute_batch, which handle multiple statements.

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?

The phrase 'single SQL statement' clearly implies usage for one statement only, distinguishing it from script/batch variants. It also hints at a prerequisite (active database connection). However, it does not explicitly name alternatives or state exclusions.

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

database_get_project_summaryB

Get summary of the currently detected project

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It implies a read-only operation via 'get', but does not disclose what the summary contains, whether a connection is required, or what happens if no project is detected. This is minimal behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, front-loaded with the verb and resource. Every word earns its place, with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (no params, no output schema), but the description omits important context: what a 'project summary' includes, whether a prior project detection or active connection is needed, and what happens in error cases. For a getter that depends on global state, this is incomplete.

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?

The tool has zero parameters, so the schema is empty and needs no explanation. The description adds context by indicating the tool operates on the 'currently detected project', which is useful implicit state information. Baseline for 0 params is 4, and this description meets it.

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?

The description clearly states the tool's action (get) and resource (summary of the currently detected project), which distinguishes it from siblings like database_get_schema and database_detect_project. However, 'summary' is somewhat vague, so it doesn't fully achieve a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites (e.g., 'after detecting a project') or exclusions, leaving the agent to infer usage from the name alone.

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

database_get_schemaA

Get the database schema (tables, columns, indexes, foreign keys, views)

ParametersJSON Schema
NameRequiredDescriptionDefault
schemaNoPostgreSQL schema to inspect (default: configured schema or public)

TDQS

A3.6/5.0
Behavior2/5

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

No annotations, and the description only says 'get' without mentioning side effects, error conditions, connection requirements, or return structure. Lacks behavioral detail expected for a tool with zero annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence that directly states the tool's function. No repetition or unnecessary qualifiers.

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?

For a simple read-only tool with one optional parameter, the description adequately enumerates the returned metadata types. Could mention default schema behavior or connection dependency, but the parameter description covers the default aspect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter 'schema' is fully described in the input schema (100% coverage). The description adds no extra semantic detail beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Says 'Get the database schema' with a specific list of schema elements (tables, columns, indexes, foreign keys, views). Clearly distinguishes from execute-style sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit use-case guidance or comparison to alternatives. However, the purpose is clear enough that usage is implied; not misleading.

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

database_list_environmentsA

List detected database environments for the current project

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the burden of behavioral disclosure. It only states what the tool does, not whether it has side effects, read-only guarantees, or dependencies on prior connection/detection steps. It does not mention that it is a safe read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that is easy to parse and front-loads the verb. No redundant information.

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?

Given that this is a simple list operation with no parameters or output schema, the description provides sufficient context to understand its function. However, it does not explicitly describe the return format or any prerequisites, though these are implied by the tool's name and siblings.

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?

The tool has zero parameters, and the schema is empty with 100% coverage (vacuously). Per the rubric, the baseline for 0 params is 4; the description does not need to elaborate on parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (List) and the resource (database environments) with a scoping qualifier ('for the current project'). This differentiates it from sibling tools that connect or switch environments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (to see detected environments) but does not explicitly state use cases or contrast with alternatives like database_connect_environment or database_switch_environment. No exclusions are mentioned.

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

database_list_sessionsB

List active database sessions

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description must carry full responsibility for disclosing behavior. It only says 'List active database sessions' without mentioning whether this is a read-only operation, whether it requires an existing connection, how 'active' is defined, or any potential side effects. This is minimal and lacks transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that immediately conveys the purpose. It is concise and well-structured, with no unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is simple (no parameters), the description is relatively complete for a basic list operation. However, there is no output schema, and the description does not explain what information is returned for each session, what 'active' means, or any operational requirements. This leaves gaps for an agent to correctly interpret the tool's behavior.

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?

The tool has zero parameters, and the schema is empty. Per the rubric, a baseline of 4 is appropriate when there are no parameters. The description correctly matches this, adding no confusion about parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description exactly states the verb 'List' and the resource 'active database sessions', which clearly identifies what the tool does. It distinguishes itself from sibling tools like database_list_environments by focusing specifically on sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor any context about prerequisites, side effects, or intended scenarios. For a simple list operation, usage is implied, but no explicit guidance is given.

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

database_switch_environmentB

Switch to a different detected database environment

ParametersJSON Schema
NameRequiredDescriptionDefault
environmentNameYesName of the environment to switch to

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must carry the full burden of behavioral disclosure. It only states the high-level action but does not explain side effects, such as whether switching closes existing connections, changes the default environment for subsequent commands, or requires an active connection. This is insufficient for a state-changing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that is immediately understandable. Every word earns its place, and there is no redundant or verbose phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description is minimally adequate. However, the presence of similar sibling tools like 'database_connect_environment' and the lack of usage guidance or behavioral nuance make it incomplete for an agent to confidently select and invoke the tool without ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the parameter 'environmentName' is described as 'Name of the environment to switch to'. The description adds only the word 'detected', which provides minor context that the environment must already be known, but it does not add substantive meaning beyond the schema.

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?

The description 'Switch to a different detected database environment' clearly states the action (switch) and the resource (database environment), and adds 'detected' to indicate it operates on already known environments. However, it does not differentiate from the sibling tool 'database_connect_environment', which may have a similar purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to use this tool versus alternatives like 'database_connect_environment' or 'database_list_environments'. The description implies it is used after detection but does not state prerequisites, behavior relative to current sessions, or exclusions.

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

database_test_connectionB

Test the active database connection

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries full responsibility for disclosing behavior. It only says 'Test' without explaining what the test does (e.g., ping, verify credentials), whether it has side effects, or what the return/error behavior looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence of eight words with no redundant information. It is appropriately sized for a tool with no parameters and a simple function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite its simplicity, the description lacks essential context for a tool with no output schema and no annotations. It does not state what a successful test returns (e.g., a boolean, a message) or what failure conditions look like, leaving the agent uncertain about how to interpret the result.

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?

The tool has zero parameters and the schema is empty (100% coverage), so there are no parameter semantics for the description to add. The baseline score of 4 applies since no parameter documentation is needed.

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?

The description clearly states the action ('Test') and the resource ('the active database connection'), making the tool's purpose unambiguous. However, it doesn't distinguish from sibling tools beyond the verb, so it lacks the specificity of a top-tier purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like database_connect or database_execute_sql. There is no mention of prerequisites (e.g., 'use after connecting') or situations where this test is appropriate.

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. Dates show when Glama detected each change.

  1. 14 tool updatesv2.0.0
    • First observedcheck_node_version
    • First observeddatabase_connect
    • First observeddatabase_connect_environment
    • First observeddatabase_detect_project
    • First observeddatabase_disconnect
    • First observeddatabase_execute_batch
    • First observeddatabase_execute_script
    • First observeddatabase_execute_sql
    • First observeddatabase_get_project_summary
    • First observeddatabase_get_schema
    • First observeddatabase_list_environments
    • First observeddatabase_list_sessions
    • First observeddatabase_switch_environment
    • First observeddatabase_test_connection

TDQS

C2.9/5.0
Disambiguation2/5

Several tools have overlapping purposes: database_execute_sql, database_execute_script, and database_execute_batch all execute SQL but with subtle differences, while database_connect, database_connect_environment, and database_switch_environment cover similar connection territory. The presence of check_node_version, which has nothing to do with database operations, further confuses tool selection.

Naming Consistency3/5

Most tools follow a consistent database_verb_noun pattern (e.g., database_connect, database_execute_sql), but the lone check_node_version breaks the convention entirely. The naming is readable but not fully uniform.

Tool Count3/5

At 14 tools, the count is at the high end of the typical range but still acceptable for a database server. However, the inclusion of check_node_version, which is unrelated to MySQL/PostgreSQL work, suggests the count could be reduced or the tool placed in a separate utility server.

Completeness4/5

The tool set covers core database operations well: connecting, disconnecting, testing, executing SQL (single, script, batch), retrieving schema, managing project environments, and listing sessions. Minor gaps like explicit transaction control are not critical for a basic MCP database server, so the surface is fairly complete.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables interaction with MySQL databases through MCP tools for querying table structures, searching data across single or multiple tables, and managing database information. Built with FastMCP framework for secure database operations using environment-based configuration.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables MySQL database operations through MCP, including executing SQL queries, listing databases and tables, and describing table structures.
    454
    5
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Enables interaction with MariaDB/MySQL databases via MCP, supporting read-only mode, SQL execution, and schema inspection.
    6
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/eeantoss/mysql-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server