update_view
Redefine a SQL view by running a CREATE OR ALTER VIEW statement with a read-only SELECT body, automatically rejecting write operations and semicolons for safety.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| workspace | Yes | ||
| select_body | Yes | ||
| qualified_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||