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.
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
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.
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)
Attacks that exploit this kind of access
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.
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.
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.
execute_write_query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
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.
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.
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.
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 →