Skip to main content
Glama
dkp5897

SQL Server MCP Server

by dkp5897

sql_run_write

Execute write SQL statements like INSERT, UPDATE, DELETE, or DDL. Requires a dry-run preview first, then explicit confirmation to apply changes.

Instructions

Execute a write SQL statement (INSERT, UPDATE, DELETE, DROP TABLE, ALTER TABLE, CREATE, TRUNCATE, EXEC stored proc, etc.).

IMPORTANT PERMISSION RULE:

  • When confirm is false (default): returns a DRY-RUN PREVIEW — nothing is executed.

  • When confirm is true: actually executes the statement.

Always call with confirm=false first to show the user what will happen, then call again with confirm=true only after the user explicitly approves.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL statement to execute (INSERT/UPDATE/DELETE/DDL/EXEC etc.)
confirmNoSet to true ONLY after the user has seen the preview and explicitly approved execution. Default: false.
Behavior4/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 of behavioral disclosure. It clearly discloses the destructive/mutating nature of the tool, explains the dry-run behavior when confirm=false vs actual execution when confirm=true, and emphasizes the safety gate. The only minor gap is not describing the return format or what the preview output 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.

Conciseness4/5

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

The description is well-organized with a clear header, bolded permission rule, and bulleted sub-points. The protocol for confirm usage is front-loaded and emphasized. Minor redundancy exists between the schema description and the description's confirm explanation, but the description's value-add justifies the length for a high-risk destructive tool.

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

Completeness5/5

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

For a high-risk mutating tool with no annotations and no output schema, the description is thorough: it enumerates supported statement types, explains the two-phase execution safety mechanism, and details the confirm flag semantics. It handles the risk profile exceptionally well, leaving little ambiguity for an agent deciding how and when to invoke it.

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

Parameters5/5

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

Schema coverage is 100%, so the schemas document both parameters, but the description adds substantial value beyond the schema. It explains the critical behavioral difference of the confirm parameter (dry-run vs execute) in detail, including the exact protocol for safely invoking it. This goes well beyond the schema's 'Set to true ONLY after preview and approval'.

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) plus resource (write SQL statement) and enumerates the exact statement types (INSERT, UPDATE, DELETE, DROP TABLE, ALTER TABLE, CREATE, TRUNCATE, EXEC stored proc). It clearly distinguishes from sql_run_query (read) and other sibling tools like sql_list_tables/sql_inspect_table which are structural inspection tools.

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

Usage Guidelines5/5

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

The description includes an explicit two-phase usage protocol: always call with confirm=false first to show a dry-run preview, then call with confirm=true only after explicit user approval. This is exceptionally clear operational guidance that prevents accidental destructive actions and directly addresses when this tool should be used vs alternatives.

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/dkp5897/sql-server-mcp'

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