execute_write_query

Run a mutating SQL statement. DISABLED unless MSSQL_ENABLE_WRITES=true. There is no keyword denylist - the database user's grants are the source of truth. Use a least-privilege account for the relevant dbKey.

Server Mssql Mcp Node mssql-mcp-node
Category Execute
Risk class High
Parameters 21 required

What execute_write_query does on Mssql Mcp Node

AI agents invoke execute_write_query to trigger actions in Mssql Mcp Node. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
dbKey string Database key (lowercased). Optional in single-database mode. Call `list_databases` to discover valid keys.
query string Yes Mutating SQL (INSERT/UPDATE/DELETE/MERGE/DDL). Disabled unless MSSQL_ENABLE_WRITES=true.

Parameters from the server's own tool schema.

Why execute_write_query needs a policy

This tool executes arbitrary mutating SQL, which can include INSERT, UPDATE, DELETE, DROP, or TRUNCATE statements with no keyword-level restrictions. The blast radius is critical because a misconfigured or misused account could irreversibly destroy or corrupt data.

From the tool's definition "Run a mutating SQL statement" and "There is no keyword denylist - the database user's grants are the source of truth"

Risk signalsAccepts freeform code/query input (query)

Questions about execute_write_query

What does the execute_write_query tool do? +

Run a mutating SQL statement. DISABLED unless MSSQL_ENABLE_WRITES=true. There is no keyword denylist - the database user's grants are the source of truth. Use a least-privilege account for the relevant dbKey. It is categorised as a Execute tool in the Mssql Mcp Node MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does execute_write_query accept? +

execute_write_query accepts 2 parameters: dbKey, query. Required: query. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on execute_write_query? +

Register the Mssql Mcp Node MCP server in PolicyLayer and add a rule for execute_write_query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mssql Mcp Node. Nothing to install.

What risk level is execute_write_query? +

execute_write_query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit execute_write_query? +

Yes. Add a rate_limit block to the execute_write_query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block execute_write_query completely? +

Set action: deny in the PolicyLayer policy for execute_write_query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides execute_write_query? +

execute_write_query is provided by the Mssql Mcp Node MCP server (mssql-mcp-node). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.