create_function
Create a new T-SQL user-defined function in a Microsoft Fabric warehouse or SQL Analytics endpoint using DDL.
Instructions
Create a new T-SQL user-defined function.
Scalar UDFs and inline TVFs are preview features on Fabric DW as of mid-2026. Function DDL is supported on both Data Warehouses and SQL Analytics Endpoints.
CAUTION: body is executed verbatim as DDL. Ensure the body matches the
user's intent before calling this tool.
The body should include the parameter list, RETURNS clause, and function body
(everything that follows CREATE FUNCTION [schema].[name]).
Args:
workspace: Workspace name or GUID.
item: Warehouse or SQL Analytics Endpoint name or GUID.
qualified_name: Dot-separated qualified function name, e.g. dbo.fn_clean_input.
body: The function body (parameter list, RETURNS clause, and implementation).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | ||
| item | Yes | ||
| qualified_name | Yes | ||
| body | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||