update_view
Redefine a SQL view by replacing its body with a new read-only SELECT or CTE statement. Validates the input to block write keywords and semicolons, ensuring safe DDL execution.
Instructions
Redefine a SQL view via CREATE OR ALTER VIEW.
CAUTION: select_body is executed verbatim as DDL. Ensure the body
matches the user's intent before calling this tool.
select_body must be a single read-only SELECT or WITH (CTE)
statement. The guard is always on and fail-closed: a write keyword
(DELETE, DROP, INSERT, etc.) or a semicolon anywhere in the body is
rejected, even inside a string literal or quoted identifier. If a
legitimate view body contains a write keyword (e.g. a column alias
'DELETE'), rewrite the expression to avoid the keyword.
Args:
workspace: Workspace name or GUID.
item: Warehouse or SQL endpoint name or GUID.
qualified_name: Dot-separated qualified view name, e.g. dbo.vw_sales.
select_body: Single read-only SELECT or WITH (CTE) statement for the
new view body. Write keywords and semicolons are rejected
fail-closed, even inside string literals or quoted identifiers.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace": "<workspace>",
"item": "<item>",
"qualified_name": "<qualified_name>",
"select_body": "<select_body>"
},
"name": "update_view"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| workspace | Yes | ||
| select_body | Yes | ||
| qualified_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||