Skip to main content
Glama
huang-develop

SQLServer MCP Server

configure_connection

Update SQL Server connection settings (server, port, instance, database, credentials) and apply them immediately to subsequent database operations. Optionally persist changes to config.json with persist=true.

Instructions

修改 SQL Server 连接配置(server/port/instanceName/database/user/password 等)。设置后立即生效,下次数据库操作使用新配置;persist=true 时写入 config.json 永久保存。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo端口,默认 1433
userNoSQL 登录名
serverNo服务器地址,如 localhost 或 192.168.1.10
encryptNo是否加密连接,默认 true
persistNo是否写入 config.json 永久保存,默认 false
databaseNo默认数据库,如 master
passwordNoSQL 登录密码
odbcDriverNoWindows 认证使用的 ODBC 驱动名,默认 "ODBC Driver 17 for SQL Server"
windowsAuthNo是否使用 Windows 集成认证(需安装 msnodesqlv8)
instanceNameNo命名实例名,如 SQLEXPRESS
requestTimeoutNo单条 SQL 超时毫秒数,默认 60000
trustServerCertificateNo是否信任服务器证书,默认 true
Behavior4/5

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

无注解,描述承担了行为披露责任。它说明了设置后立即生效、下次数据库操作使用新配置,以及 persist=true 时持久化到 config.json。这些是核心行为,但未提及权限要求、验证过程或返回值。

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?

描述简洁,两句话,信息密度高,无冗余。先说明用途,再说明行为和持久化,结构清晰。

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?

核心行为(生效时机、持久化)已说明,但缺少返回值、错误处理、验证行为等。由于无输出 schema,描述未说明返回内容,对于配置变更工具来说信息不够完整。

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 覆盖 100%,每个参数都有详细描述。工具描述列举了部分参数,并额外说明了 persist 的行为,但未提供超出 schema 的语法或格式细节,baseline 为 3。

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?

描述明确说明工具用于修改 SQL Server 连接配置,并列举了 server/port/instanceName/database/user/password 等关键字段。与兄弟工具(list_databases、execute_query 等)有清晰区分,动词+资源明确。

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?

描述未显式说明何时使用或排除替代工具,但从名称和功能可清晰判断这是配置变更工具,与数据查询类工具区分明显。上下文暗示了使用场景,但缺少显式替代方案说明。

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

Install Server

Other Tools

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/huang-develop/SQLServer-MCP'

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