# fabric-dw-mcp-cli - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for fabric-dw-mcp-cli. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`, `plugins/fabric-dw/skills/query-optimizer/SKILL.md`, `plugins/fabric-dw/skills/warehouse-performance/SKILL.md` Claim: `clm_0005` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`, `plugins/fabric-dw/skills/query-optimizer/SKILL.md`, `plugins/fabric-dw/skills/warehouse-performance/SKILL.md` Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution** (Verify after install): The project contains plugin or marketplace configuration, indicating it targets install and distribution across one or more AI hosts. Evidence: `.claude-plugin/marketplace.json`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json` Claim: `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md`, `docs/install.md` Claim: `clm_0003` supported 0.86

## How to Start

- `pip install fabric-dw` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `uv tool install fabric-dw` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `uv tool install --prerelease allow fabric-dw` Evidence: `docs/install.md` Claim: `clm_0008` supported 0.86
- `claude mcp add fabric-dw --scope user \` Evidence: `docs/install.md` Claim: `clm_0009` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`, `plugins/fabric-dw/skills/query-optimizer/SKILL.md`, `plugins/fabric-dw/skills/warehouse-performance/SKILL.md` Claim: `clm_0005` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`, `plugins/fabric-dw/skills/query-optimizer/SKILL.md`, `plugins/fabric-dw/skills/warehouse-performance/SKILL.md` Claim: `clm_0001` supported 0.86
- **Capability exists: Multi-Host Install and Distribution** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.claude-plugin/marketplace.json`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json` Claim: `clm_0002` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md`, `docs/install.md` Claim: `clm_0003` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0006` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `.claude-plugin/marketplace.json`, `CLAUDE.md`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json` et al.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment. Evidence: `.claude-plugin/marketplace.json`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json`
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`, `docs/install.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `.claude-plugin/marketplace.json`, `CLAUDE.md`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json` et al.
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `.claude-plugin/marketplace.json`, `README.md`, `docs/install.md`, `plugins/fabric-dw/.claude-plugin/plugin.json` et al.
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `README.md`, `docs/authentication.md`, `docs/commands/dbt.md`, `docs/guides/dbt-setup.md` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0010` inferred 0.45
- **Host AI plugin or Skill rule conflicts**: New rules may change how the user's existing host AI behaves. Mitigation: Inspect the plugin manifest and Skill files before installing, and test in isolation if needed. Evidence: `.claude-plugin/marketplace.json`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json` Claim: `clm_0011` supported 0.86
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md`, `docs/install.md` Claim: `clm_0012` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`, `plugins/fabric-dw/skills/query-optimizer/SKILL.md`, `plugins/fabric-dw/skills/warehouse-performance/SKILL.md` Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `.claude-plugin/marketplace.json`, `plugins/fabric-dw/.claude-plugin/plugin.json`, `plugins/fabric-dw/.github/plugin/plugin.json` Claim: `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md`, `docs/install.md` Claim: `clm_0003` supported 0.86

### Context Scale

- Total files: 189
- Important-file coverage: 40/189
- Evidence index entries: 77
- Role / Skill entries: 3

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for fabric-dw-mcp-cli, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat fabric-dw-mcp-cli as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for fabric-dw-mcp-cli, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 3 role / Skill / project-doc entries.

- **dbt-setup** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “dbt-setup”, use it for a pre-install experience first, then decide whether to install. Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`
- **query-optimizer** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “query-optimizer”, use it for a pre-install experience first, then decide whether to install. Evidence: `plugins/fabric-dw/skills/query-optimizer/SKILL.md`
- **warehouse-performance** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “warehouse-performance”, use it for a pre-install experience first, then decide whether to install. Evidence: `plugins/fabric-dw/skills/warehouse-performance/SKILL.md`

## Evidence Index

- Indexed 77 evidence entries.

- **Install** (documentation): fabric-dw ships two surfaces from a single package: a CLI fabric-dw , short alias fdw and an MCP server fabric-dw-mcp for AI assistants. Both share the same authentication, connection, and business logic, so you install one package regardless of how you plan to use it. Evidence: `docs/install.md`
- **Description** (documentation): Python CLI and MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints: administer, query, optimize, and secure them from your terminal or your AI agent. Evidence: `README.md`
- **Contributing** (documentation): --- title: Contributing --- --8<-- "CONTRIBUTING.md" Evidence: `docs/contributing.md`
- **CLAUDE.md** (documentation): This repo is fabric-dw-mcp-cli : a CLI and MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `CLAUDE.md`
- **Authentication** (documentation): If you are already signed in via Azure CLI https://learn.microsoft.com/cli/azure/reference-index?view=azure-cli-latest&WT.mc id=MVP 310840 az-login or Azure PowerShell https://learn.microsoft.com/powershell/module/az.accounts/connect-azaccount?WT.mc id=MVP 310840 , you don't need to configure anything - fabric-dw picks up your session automatically. Evidence: `docs/authentication.md`
- **fabric-dw** (documentation): Python CLI and MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints: administer, query, optimize, and secure them from your terminal or your AI agent. Evidence: `docs/index.md`
- **Security** (documentation): --- title: Security --- --8<-- "SECURITY.md" Evidence: `docs/security.md`
- **Telemetry** (documentation): fabric-dw collects opt-out usage telemetry to understand how the tool is used and to prioritise improvements. Evidence: `docs/telemetry.md`
- **Troubleshooting** (documentation): This page collects failure modes that real users have encountered, with the exact error message and the resolution. Evidence: `docs/troubleshooting.md`
- **Commands** (documentation): fabric-dw exposes every operation as both a CLI command and an MCP tool. The two surfaces share the same authentication, connection, and business logic - a fix or new feature lands in both at once. Evidence: `docs/commands/index.md`
- **SQL Analytics Endpoints** (documentation): Manage Microsoft Fabric SQL Analytics Endpoints. Evidence: `docs/commands/sql-endpoints.md`
- **SQL Pools** (documentation): Manage custom SQL Pools at the workspace level with sub-resource commands that mirror the Azure CLI style. Callers must hold the workspace admin role . Evidence: `docs/commands/sql-pools.md`
- **Warehouses** (documentation): Manage Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/warehouses.md`
- **Workspaces** (documentation): Manage Microsoft Fabric workspaces - list all workspaces the authenticated principal can see, inspect a single workspace's details including its default Data Warehouse collation , and update that collation. All workspace commands operate at the workspace level and do not target a specific Data Warehouse or SQL Analytics Endpoint item. Evidence: `docs/commands/workspaces.md`
- **Guides** (documentation): Task-oriented walkthroughs that thread several fabric-dw commands and MCP tools into a single end-to-end workflow. Each guide shows runnable CLI examples fdw … and names the equivalent MCP tool, so the same steps apply whether you drive from a terminal or an AI assistant. For the full option reference of any one command, see the per-domain Commands ../commands/index.md pages. Evidence: `docs/guides/index.md`
- **Contributing** (documentation): Thank you for your interest in contributing to fabric-dw-mcp-cli ! Evidence: `CONTRIBUTING.md`
- **dbt Project Bootstrap for Fabric DW** (skill_instruction): dbt Project Bootstrap for Fabric DW Evidence: `plugins/fabric-dw/skills/dbt-setup/SKILL.md`
- **Query Performance Analysis & Optimization** (skill_instruction): Query Performance Analysis & Optimization Evidence: `plugins/fabric-dw/skills/query-optimizer/SKILL.md`
- **Warehouse-Wide Performance Investigation & Tuning** (skill_instruction): Warehouse-Wide Performance Investigation & Tuning Evidence: `plugins/fabric-dw/skills/warehouse-performance/SKILL.md`
- **Marketplace** (structured_config): { "name": "fabric-dw", "owner": { "name": "Sam Debruyn", "email": "sam@debruyn.dev" }, "metadata": { "description": "Agent skills and MCP server for Microsoft Fabric Data Warehouses" }, "plugins": { "name": "fabric-dw", "source": "./plugins/fabric-dw", "description": "Agent skills for Fabric Data Warehouse: query performance analysis, warehouse-wide performance investigation and tuning, and dbt project bootstrap.", "author": { "name": "Sam Debruyn", "email": "sam@debruyn.dev" }, "skills": "./skills/dbt-setup", "./skills/query-optimizer", "./skills/warehouse-performance" , "keywords": "microsoft-fabric", "fabric", "data-warehouse", "mcp", "model-context-protocol", "sql-analytics-endpoint", "… Evidence: `.claude-plugin/marketplace.json`
- **Plugin** (structured_config): { "name": "fabric-dw", "displayName": "Fabric DW Agent Skills", "version": "2026.7.1", "description": "Agent skills for Fabric Data Warehouse: query performance analysis, warehouse-wide performance investigation and tuning, and dbt project bootstrap.", "homepage": "https://github.com/sdebruyn/fabric-dw-mcp-cli", "author": { "name": "Sam Debruyn", "email": "sam@debruyn.dev" }, "license": "MIT", "keywords": "microsoft-fabric", "fabric", "data-warehouse", "mcp", "model-context-protocol", "sql-analytics-endpoint", "agent-skills", "dbt" , "repository": "https://github.com/sdebruyn/fabric-dw-mcp-cli", "skills": "./skills/dbt-setup", "./skills/query-optimizer", "./skills/warehouse-performance" , "… Evidence: `plugins/fabric-dw/.claude-plugin/plugin.json`
- **License** (source_file): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Evidence: `LICENSE`
- **Security** (documentation): We use GitHub Private Vulnerability Reporting https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability?WT.mc id=MVP 310840 for security disclosures. Evidence: `SECURITY.md`
- **Code Of Conduct** (documentation): --- title: Code of Conduct --- --8<-- "CODE OF CONDUCT.md" Evidence: `docs/code-of-conduct.md`
- **Shell Completion** (documentation): fabric-dw ships with tab-completion for bash , zsh , and fish via Click's built-in shell completion https://click.palletsprojects.com/en/stable/shell-completion/ . Evidence: `docs/completion.md`
- **Concepts** (documentation): The sections below describe cross-cutting concepts that apply to all fdw / fabric-dw commands: how the CLI distinguishes between item kinds, which global flags are available on every invocation, and how the target workspace is resolved. Evidence: `docs/concepts.md`
- **License** (documentation): --- title: License --- --8<-- "LICENSE" Evidence: `docs/license.md`
- **Agent Skills** (documentation): fabric-dw ships three Claude Code Agent Skills https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview that orchestrate multi-step administration workflows on top of the MCP server. Evidence: `docs/skills.md`
- **Plugin** (structured_config): { "name": "fabric-dw", "description": "Agent skills for Fabric Data Warehouse: query performance analysis, warehouse-wide performance investigation and tuning, and dbt project bootstrap.", "version": "2026.7.1", "author": { "name": "Sam Debruyn", "email": "sam@debruyn.dev" }, "license": "MIT", "keywords": "microsoft-fabric", "fabric", "data-warehouse", "mcp", "model-context-protocol", "sql-analytics-endpoint", "agent-skills", "dbt" , "repository": "https://github.com/sdebruyn/fabric-dw-mcp-cli", "skills": "./skills/dbt-setup", "./skills/query-optimizer", "./skills/warehouse-performance" , "mcpServers": { "fabric-dw": { "type": "stdio", "command": "uvx", "args": "--from", "fabric-dw", "fabri… Evidence: `plugins/fabric-dw/.github/plugin/plugin.json`
- **Audit** (documentation): Manage SQL audit settings for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/audit.md`
- **Cache** (documentation): Manage the local name-to-UUID lookup cache. fabric-dw caches workspace and item name-to-GUID mappings to avoid repeated API round-trips. Use these commands if you rename items outside the CLI or need to force a fresh lookup. Evidence: `docs/commands/cache.md`
- **Shell completion command** (documentation): Manage shell completion scripts. See Shell Completion ../completion.md for full installation details. Evidence: `docs/commands/completion.md`
- **Configuration & defaults** (documentation): fabric-dw can store persistent defaults so you do not have to repeat options on every invocation. Stored defaults apply when neither the corresponding CLI option nor environment variable is set. Evidence: `docs/commands/config.md`
- **dbt** (documentation): Scaffold a dbt https://docs.getdbt.com/ project pre-wired to a Microsoft Fabric Data Warehouse using the dbt-fabric https://docs.getdbt.com/docs/core/connect-data-platform/fabric-setup adapter. Evidence: `docs/commands/dbt.md`
- **Functions** (documentation): Manage T-SQL user-defined functions on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/functions.md`
- **Permissions** (documentation): Manage Fabric item-level and T-SQL in-database permissions. Evidence: `docs/commands/permissions.md`
- **Stored procedures** (documentation): Manage stored procedures on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/procedures.md`
- **Queries** (documentation): Inspect and manage running queries on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/queries.md`
- **Restore Points** (documentation): Manage Microsoft Fabric Warehouse restore points. Evidence: `docs/commands/restore-points.md`
- **Schemas** (documentation): Manage SQL schemas on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/schemas.md`
- **Settings** (documentation): Manage server-side database settings on a Fabric Data Warehouse or SQL Analytics Endpoint. Evidence: `docs/commands/settings.md`
- **Snapshots** (documentation): Manage Microsoft Fabric Data Warehouse snapshots. Evidence: `docs/commands/snapshots.md`
- **Running SQL** (documentation): SQL execution and query-plan capture against a Fabric Data Warehouse or SQL Analytics Endpoint. Evidence: `docs/commands/sql.md`
- **Statistics** (documentation): Manage user-defined statistics on Fabric Data Warehouses and read their details on SQL Analytics Endpoints. Evidence: `docs/commands/statistics.md`
- **Tables** (documentation): Manage SQL tables on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Commands and tools cover listing, counting, reading, creating including CTAS, empty DDL from schema inference, and zero-copy clone , deleting, clearing, renaming, transferring to another schema, and loading data via COPY INTO from local files or remote URLs. Evidence: `docs/commands/tables.md`
- **Views** (documentation): Manage SQL views on Microsoft Fabric Data Warehouses and SQL Analytics Endpoints. Evidence: `docs/commands/views.md`
- **Set up a dbt environment** (documentation): This guide walks an analytics engineer end-to-end through standing up a working dbt https://docs.getdbt.com/ environment on a Microsoft Fabric Data Warehouse with fabric-dw . The headline feature is fdw dbt init --with-sources : it introspects the live warehouse and writes a complete models/staging/ sources.yml : one dbt source: per schema, listing every table with column names and types - so you never hand-author source definitions: Evidence: `docs/guides/dbt-setup.md`
- **Ingesting data** (documentation): This guide walks through getting file-based data - CSV, Parquet, or JSON - into a Microsoft Fabric Data Warehouse table with fabric-dw , end to end: create the schema, create the destination table, stage and load the data via COPY INTO , verify the result, and refresh statistics. It covers both the CLI fdw … and the MCP server for AI assistants . Evidence: `docs/guides/ingesting-data.md`
- **Investigating and improving query performance** (documentation): Investigating and improving query performance Evidence: `docs/guides/query-performance.md`
- **Creating & managing tables and views** (documentation): Creating & managing tables and views Evidence: `docs/guides/tables-and-views.md`
- **Investigating & improving warehouse performance** (documentation): Investigating & improving warehouse performance Evidence: `docs/guides/warehouse-performance.md`
- **Exit codes** (documentation): Code Meaning --- --- 0 Success. 1 Usage error, aborted confirmation prompt, or a Fabric API error. 2 Reserved. Evidence: `docs/reference/exit-codes.md`
- **Upper bound <1: httpx 1.0.dev removed both httpx.TransportError and the http2** (source_file): build-system requires = "hatchling", "hatch-vcs" build-backend = "hatchling.build" Evidence: `pyproject.toml`
- **Init** (source_file): all = " version " Evidence: `src/fabric_dw/__init__.py`
- **Fabric Api** (source_file): all = ⋮---- endpoint id str = str endpoint id .lower ⋮---- props = lh.get "properties" props dict = cast "dict str, Any ", props if isinstance props, dict else {} sql ep = props dict.get "sqlEndpointProperties" sql ep dict = cast "dict str, Any ", sql ep if isinstance sql ep, dict else {} ⋮---- conn = str sql ep dict.get "connectionString", "" Evidence: `src/fabric_dw/_fabric_api.py`
- **Init** (source_file): HELP FLAGS: frozenset str = frozenset {"-h", "--help"} ⋮---- UNEXPECTED ERROR EXIT CODE = 1 ⋮---- def main - None ⋮---- def render unexpected error exc: BaseException - None ⋮---- message = str exc .replace "\r", " " .replace "\n", " " .strip or type exc . name ⋮---- message = type exc . name Evidence: `src/fabric_dw/cli/__init__.py`
- **Context** (source_file): @dataclass class CliContext ⋮---- json output: bool = False yes: bool = False auth: CredentialMode = CredentialMode.DEFAULT workspace: str None = None max 429 retries: int None = None retry deadline s: int None = None config: UserConfig None = field default=None, repr=False, compare=False ⋮---- @property def config self - UserConfig Evidence: `src/fabric_dw/cli/_context.py`
- **Compute destructive flag:** (source_file): logger = logging.getLogger name ⋮---- CLI TELEMETRY KEY = "fabric dw telemetry command name" CLI SEGMENTS KEY = CLI TELEMETRY KEY + " segments" ⋮---- DESTRUCTIVE CLI COMMANDS: frozenset str = frozenset ⋮---- CLI CONDITIONAL DESTRUCTIVE KEY = "fabric dw conditional destructive op" ⋮---- HELP MAX WIDTH = max 80, min shutil.get terminal size fallback= 120, 24 .columns, 160 ⋮---- META KEY JSON = "fabric dw global json output" META KEY YES = "fabric dw global yes" META KEY VERBOSE = "fabric dw global verbose" META KEY WORKSPACE = "fabric dw global workspace" META KEY AUTH = "fabric dw global auth mode" META KEY MAX 429 RETRIES = "fabric dw global max 429 retries" META KEY RETRY DEADLINE = "fabri… Evidence: `src/fabric_dw/cli/_main.py`
- **Default mode without -o: render Rich terminal tree.** (source_file): @click.group "sql" def sql group - None ⋮---- query = load sql body query text, query file, inline opt="-q/--query", file opt="-f/--file" ⋮---- ws = resolve workspace ctx wh = resolve warehouse arg ctx, item ⋮---- result = await sql exec svc.execute target, query, mode=ctx.auth ⋮---- plan xml = await sql exec svc.get plan target, query, mode=ctx.auth ⋮---- operators = parse showplan plan xml payload = operator to dict op for op in operators json text = json.dumps sanitise json payload , indent=2, allow nan=False ⋮---- diagram = render plan mermaid operators ⋮---- dot text = render plan dot operators ⋮---- svg bytes = render plan svg operators ⋮---- html text = render plan html plan xml ⋮---… Evidence: `src/fabric_dw/cli/commands/sql.py`
- **Unmapped 4xx — surface the full Fabric error body so callers can see** (source_file): logger = logging.getLogger "fabric dw.http" ⋮---- all = ⋮---- DEFAULT RPS: int = 2 DEFAULT TIMEOUT: float = 60.0 MAX 429 RETRIES: int = 10 DEFAULT POLL INTERVAL: float = 2.0 TOKEN REFRESH BUFFER: float = 300.0 ⋮---- DEFAULT COMBINED DEADLINE S: float = 300.0 ⋮---- IDEMPOTENT METHODS: frozenset str = frozenset {"GET", "HEAD", "OPTIONS"} ⋮---- STATUS TO EXC: dict int, type FabricError = { ⋮---- CAPACITY NOT ACTIVE ERROR CODE = "CapacityNotActive" ⋮---- class HttpBase StrEnum ⋮---- FABRIC = "https://api.fabric.microsoft.com/v1" POWERBI = "https://api.powerbi.com/v1.0/myorg" ⋮---- def parse retry after value: str - float ⋮---- value = value.strip ⋮---- retry dt = parsedate to datetime value now… Evidence: `src/fabric_dw/http_client.py`
- The remaining 17 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `docs/install.md`, `README.md`, `docs/contributing.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `docs/install.md`, `README.md`, `docs/contributing.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Project Overview & Architecture**: importance `high`
  - source_paths: README.md, src/fabric_dw/__init__.py, src/fabric_dw/_fabric_api.py, src/fabric_dw/http_client.py, src/fabric_dw/cli/_main.py
- **Core Features & Command Domains**: importance `high`
  - source_paths: README.md, docs/commands/index.md, docs/commands/workspaces.md, docs/commands/warehouses.md, docs/commands/sql-endpoints.md
- **MCP Server & AI Agent Integration**: importance `high`
  - source_paths: README.md, src/fabric_dw/mcp/server.py, src/fabric_dw/mcp/_context.py, src/fabric_dw/mcp/_guards.py, src/fabric_dw/mcp/_helpers.py
- **Deployment, Configuration & Operations**: importance `high`
  - source_paths: README.md, docs/install.md, docs/authentication.md, docs/security.md, docs/telemetry.md

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `5b175d84eefe61dfc29227449b8965c04a3eb0e2`
- inspected_files: `Dockerfile`, `README.md`, `pyproject.toml`, `uv.lock`, `docs/authentication.md`, `docs/code-of-conduct.md`, `docs/commands/audit.md`, `docs/commands/cache.md`, `docs/commands/completion.md`, `docs/commands/config.md`, `docs/commands/dbt.md`, `docs/commands/functions.md`, `docs/commands/index.md`, `docs/commands/permissions.md`, `docs/commands/procedures.md`, `docs/commands/queries.md`, `docs/commands/restore-points.md`, `docs/commands/schemas.md`, `docs/commands/settings.md`, `docs/commands/snapshots.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: Track: measure execute_sql overuse after the MCP instructions block (needs telemetry)
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Track: measure execute_sql overuse after the MCP instructions block (needs telemetry). Context: Observed when using python
- Why it matters: Developers may expose sensitive permissions or credentials: Track: measure execute_sql overuse after the MCP instructions block (needs telemetry)
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/985
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: feat(mcp): add server instructions and steer execute_sql toward dedicated tools
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: feat(mcp): add server instructions and steer execute_sql toward dedicated tools. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may expose sensitive permissions or credentials: feat(mcp): add server instructions and steer execute_sql toward dedicated tools
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/984
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: feat(mcp): name the remaining tool domains in the server instructions
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: feat(mcp): name the remaining tool domains in the server instructions. Context: Observed when using python
- Why it matters: Developers may expose sensitive permissions or credentials: feat(mcp): name the remaining tool domains in the server instructions
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/992
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Security or permission risk requires verification

- Trigger: Developers should check this security_permissions risk before relying on the project: fix(cli): leading optional ITEM positional swallows the first required argument
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: fix(cli): leading optional ITEM positional swallows the first required argument. Context: Observed during version upgrade or migration.
- Why it matters: Developers may expose sensitive permissions or credentials: fix(cli): leading optional ITEM positional swallows the first required argument
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/981
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: fix(ci): replace uv sync --frozen with --locked in remaining workflows
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: fix(ci): replace uv sync --frozen with --locked in remaining workflows. Context: Observed when using python, docker
- Why it matters: Developers may fail before the first successful local run: fix(ci): replace uv sync --frozen with --locked in remaining workflows
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/990
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: fix(ci): uv.lock is out of sync with pyproject.toml, and nothing detects it
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: fix(ci): uv.lock is out of sync with pyproject.toml, and nothing detects it. Context: Observed when using python
- Why it matters: Developers may fail before the first successful local run: fix(ci): uv.lock is out of sync with pyproject.toml, and nothing detects it
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/988
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: fix(deps): cap httpx below 2.0 so the pre-release build is installable
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: fix(deps): cap httpx below 2.0 so the pre-release build is installable. Context: Observed when using python
- Why it matters: Developers may fail before the first successful local run: fix(deps): cap httpx below 2.0 so the pre-release build is installable
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/995
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: test(integration): add an end-to-end journey smoke test exercising config defaults
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: test(integration): add an end-to-end journey smoke test exercising config defaults. Context: Observed during installation or first-run setup.
- Why it matters: Developers may fail before the first successful local run: test(integration): add an end-to-end journey smoke test exercising config defaults
- Evidence: failure_mode_cluster:github_issue | https://github.com/sdebruyn/fabric-dw-mcp-cli/issues/982
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
