functions

functions is a command for coding agents from sdebruyn/fabric-dw-mcp-cli. It costs 0 tokens per session (2,398 once invoked), scanned A, original, MIT.

Commands for managing T-SQL user-defined functions in Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. A user-defined function is reusable SQL logic that returns a value or table.

In plain words
What is it for?
Create, drop, inspect, and manage T-SQL functions using inline SQL or a .sql file.
Why use it?
They avoid manually carrying out the same function-creation and removal steps through separate database tools.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sdebruyn/fabric-dw-mcp-cli/functions
Clone the repo
git clone --depth 1 https://github.com/sdebruyn/fabric-dw-mcp-cli

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for functions

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdebruyn/fabric-dw-mcp-cli/functions.svg)](https://agentmods.dev/commands/sdebruyn/fabric-dw-mcp-cli/functions)
Your own site
<a href="https://agentmods.dev/commands/sdebruyn/fabric-dw-mcp-cli/functions"><img src="https://agentmods.dev/badge/commands/sdebruyn/fabric-dw-mcp-cli/functions.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,398 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02398
Opus 5 $0.00000 $0.01199
Sonnet 5 $0.00000 $0.00480
Haiku 4.5 $0.00000 $0.00240

Measured 5d ago against content hash 0dc0bac7a5e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

functions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/functions.md · 292 lines

How it starts

The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Functions

Manage T-SQL user-defined functions on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints.

Targets: Data Warehouse / SQL Analytics Endpoint

CLI

functions create

Targets: Data Warehouse / SQL Analytics Endpoint

Create a new T-SQL user-defined function.

Synopsis

fdw [-w WORKSPACE] functions create [OPTIONS] [ITEM]
Option Description
--name SCHEMA.FN Required. Qualified function name (e.g. dbo.fn_clean_input).
--body TEXT Inline function body (parameter list, RETURNS clause, and implementation).
--from-file PATH Path to a .sql file containing the function body.

Exactly one of --body or --from-file must be provided.

Example

fdw -w MyWorkspace functions create SalesWH \
  --name dbo.fn_clean_input \
  --body "(@input NVARCHAR(100)) RETURNS NVARCHAR(100) AS BEGIN RETURN LTRIM(RTRIM(@input)) END"

functions drop

Targets: Data Warehouse / SQL Analytics Endpoint

Drop a T-SQL user-defined function. You will be asked to confirm unless --yes is passed.

Synopsis

fdw [-w WORKSPACE] functions drop [OPTIONS] [ITEM] QUALIFIED_NAME
Option Description
--if-exists No-op when the function does not exist (DROP FUNCTION IF EXISTS).

Example

fdw -w MyWorkspace --yes functions drop SalesWH dbo.fn_clean_input

functions get

Targets: Data Warehouse / SQL Analytics Endpoint

Get the full definition of a single T-SQL user-defined function, including its parameter list.

Synopsis

fdw [-w WORKSPACE] functions get [ITEM] QUALIFIED_NAME

QUALIFIED_NAME must be a dot-separated schema.fn_name string, e.g. dbo.fn_clean_input.

Example

fdw -w MyWorkspace functions get SalesWH dbo.fn_clean_input

functions list

Targets: Data Warehouse / SQL Analytics Endpoint

List T-SQL user-defined functions on a warehouse or SQL Analytics Endpoint. Pass --schema to filter by schema, or --kind to filter by function kind.

Read the full file on GitHub · 292 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 292 lines · 0 tokens per session scan A 0dc0bac7a5e6

Subscribe to this mod's changes

functions is a command published in the GitHub repository sdebruyn/fabric-dw-mcp-cli (10 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,398 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.