run_mutation_query
Executes INSERT, UPDATE, REPLACE, or DELETE against the provider. Real side effects -- a successful call changes cloud state.
Gated by the server mode:
| Mode | INSERT / UPDATE / REPLACE | DELETE |
|---|---|---|
read_only | refused | refused |
safe (default) | needs approval (elicitation) | needs approval |
delete_safe | allowed | needs approval |
full_access | allowed | allowed |
When a mutation needs approval and the client did not advertise the MCP elicitation capability, the call is refused.
See also:
[ MCP overview ] [ run_lifecycle_operation ] [ describe_method ] [ INSERT language spec ] [ DELETE language spec ]
Inputs
| Argument | Required | Description |
|---|---|---|
sql | Yes | An INSERT, UPDATE, REPLACE, or DELETE statement. |
Output
| Renderer | Shape |
|---|---|
| KV | {messages: [...], timestamp} -- dispatch confirmation, not the API response body |
Example
Try this prompt with any elicitation-capable MCP client with the StackQL MCP server registered:
The firewall rule allow-test-old in project my-project
is no longer needed. Please remove it.
The MCP client will surface an approval prompt before the delete is dispatched, unless the server is running in full_access mode.
The following clip shows the elicitation flow when the StackQL MCP server is running in the default safe mode -- the client is prompted to approve the DELETE before any cloud-side change is dispatched. You can reproduce this against your own StackQL MCP server using the official MCP Inspector using npx @modelcontextprotocol/inspector: