Skip to main content
Glama
huang-develop

SQLServer MCP Server

execute_script

Execute multi-statement SQL scripts with GO batch separators, running sequentially and stopping on first failure. Use for table creation and data initialization.

Instructions

批量执行一段 SQL 脚本,支持多条语句与 GO 分隔符(按顺序执行,任一批次失败即停止并报告)。适合建表、初始化数据等场景。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL 脚本内容(多条语句用 ; 或 GO 分隔)
timeoutNo每个批次的超时毫秒数
databaseNo目标数据库名,默认当前连接数据库
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It states that statements execute in order and stop on first failure ('按顺序执行,任一批次失败即停止并报告'), which is useful. However, it does not disclose potential side effects (e.g., whether it can modify data), transactional behavior, or permission requirements—critical for a script 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?

The description is exceptionally concise: one sentence stating the main action and execution behavior, plus a short use-case clause. It is front-loaded with the core purpose and contains no redundant or filler information. Every word earns its place.

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?

The tool is moderately complex (executes arbitrary SQL scripts) and has no annotations or output schema. The description covers the execution model and intended use but lacks safety warnings, return-value expectations, or notes about whether the script runs in a transaction. Given the potential for data modification, this omission makes the description incomplete, though not severely.

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?

All three parameters have descriptions in the schema (100% coverage), so the baseline is 3. The description does not add significant meaning beyond the schema; it only restates that the script supports multiple statements and GO delimiters, which is already in the sql parameter description. No additional insight is provided for timeout or database 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 tool's function: '批量执行一段 SQL 脚本' (batch execute a SQL script). It specifies the resource (SQL script) and adds distinct features like support for multiple statements and GO separators, which differentiates it from the sibling execute_query tool. The use case ('适合建表、初始化数据') further clarifies its purpose.

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 description gives clear context for when to use the tool: for batch operations like creating tables and initializing data. It implicitly distinguishes from execute_query by emphasizing batch execution and GO delimiter support. However, it does not explicitly mention when not to use it or name alternative tools, which would be needed for a score of 5.

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