Skip to main content
Glama
Andrian17

mssql-mcp-server

by Andrian17

mssql_execute_mutation

Insert, update, delete, or upsert rows in SQL Server tables by specifying operation, table, and data. Use optional WHERE clause for targeted modifications.

Instructions

Execute data modification operations (INSERT/UPDATE/DELETE/UPSERT) - operation="insert/update/delete/upsert" with table and data. Examples: operation="insert", table="Users", data={"Name":"John","Email":"john@example.com"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoData object with column-value pairs (required for insert/update/upsert). Values are always bound as parameters.
tableYesTable name for the operation
whereNoWHERE clause for update/delete operations (without WHERE keyword). Use @w1, @w2 (or $1, $2) with whereParameters.
schemaNoSchema name (defaults to dbo)
operationYesMutation operation: insert (add rows), update (modify rows), delete (remove rows), upsert (insert or update)
returningNoColumns to return via OUTPUT: "*" or a comma-separated list
conflictColumnsNoKey columns for upsert (MERGE ... ON)
whereParametersNoParameter values for @w1, @w2, ... placeholders in the where clause
connectionStringNoSQL Server connection string (optional; requires --allow-tool-connection-string)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/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 of behavioral disclosure, and it falls short. It restates the operation enum but never warns that DELETE removes rows irreversibly or that UPDATE/DELETE without a WHERE clause could affect an entire table. The only behavioral detail (values bound as parameters, connection-string flag requirement) lives in the schema, not in the description.

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 sentence plus one example, with the action verb front-loaded. It is compact and readable with no filler. The pseudo-code example is slightly informal (operation=... data={...} is not valid JSON), but it still earns its place as a quick orientation for the most common call.

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?

This is a high-complexity tool (9 parameters, 4 operation modes, upsert with conflictColumns, parameterized WHERE placeholders) with no output schema and no annotations, yet the description only illustrates the simplest insert path. It never explains default return behavior without the returning parameter, the where/whereParameters pairing at tool level, or destructive-operation safeguards. The detailed schema compensates partially, but the tool-level description leaves an agent under-informed.

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% with detailed per-parameter text (e.g., where: 'Use @w1, @w2 (or $1, $2) with whereParameters'), so the baseline is 3. The description's example adds a concrete invocation shape for operation+table+data but only demonstrates 3 of 9 parameters, leaving where/returning/conflictColumns to the schema. Net added value over the schema is marginal.

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 opens with a specific verb and resource: 'Execute data modification operations (INSERT/UPDATE/DELETE/UPSERT)', reinforced by a concrete example (operation="insert", table="Users", data={...}). This clearly conveys scope and sets it apart from read-oriented siblings like mssql_execute_query. However, it never explicitly contrasts with mssql_execute_sql, which could also run DML, so sibling differentiation is implicit rather than 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 worked example implies the invocation pattern: pass operation, table, and data for an insert. But the description gives no explicit guidance on when to prefer this structured tool over the raw mssql_execute_sql sibling, and no exclusion conditions (e.g., use mssql_execute_query for SELECT-only needs). Usage context is inferred from the example, not stated.

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