coalesce-transform-mcp 0.4.8 → 0.5.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +295 -177
  2. package/agents/lineage-analyst.agent.md +21 -0
  3. package/agents/pipeline-builder.agent.md +33 -0
  4. package/agents/run-operator.agent.md +28 -0
  5. package/agents/workspace-auditor.agent.md +23 -0
  6. package/dist/cache-dir.d.ts +1 -0
  7. package/dist/cache-dir.d.ts.map +1 -1
  8. package/dist/cache-dir.js +4 -1
  9. package/dist/cache-dir.js.map +1 -1
  10. package/dist/client.d.ts.map +1 -1
  11. package/dist/client.js +3 -11
  12. package/dist/client.js.map +1 -1
  13. package/dist/coalesce/run-schemas.d.ts +28 -31
  14. package/dist/coalesce/run-schemas.d.ts.map +1 -1
  15. package/dist/coalesce/run-schemas.js +5 -77
  16. package/dist/coalesce/run-schemas.js.map +1 -1
  17. package/dist/coalesce/tool-response.d.ts.map +1 -1
  18. package/dist/coalesce/tool-response.js +2 -2
  19. package/dist/coalesce/tool-response.js.map +1 -1
  20. package/dist/mcp/coa.d.ts +308 -0
  21. package/dist/mcp/coa.d.ts.map +1 -0
  22. package/dist/mcp/coa.js +509 -0
  23. package/dist/mcp/coa.js.map +1 -0
  24. package/dist/mcp/lineage.d.ts.map +1 -1
  25. package/dist/mcp/lineage.js +16 -2
  26. package/dist/mcp/lineage.js.map +1 -1
  27. package/dist/mcp/setup.d.ts +4 -0
  28. package/dist/mcp/setup.d.ts.map +1 -0
  29. package/dist/mcp/setup.js +15 -0
  30. package/dist/mcp/setup.js.map +1 -0
  31. package/dist/mcp/tool-helpers.d.ts +8 -0
  32. package/dist/mcp/tool-helpers.d.ts.map +1 -1
  33. package/dist/mcp/tool-helpers.js +31 -0
  34. package/dist/mcp/tool-helpers.js.map +1 -1
  35. package/dist/prompts/index.d.ts.map +1 -1
  36. package/dist/prompts/index.js +63 -0
  37. package/dist/prompts/index.js.map +1 -1
  38. package/dist/resources/coa-describe.d.ts +12 -0
  39. package/dist/resources/coa-describe.d.ts.map +1 -0
  40. package/dist/resources/coa-describe.js +106 -0
  41. package/dist/resources/coa-describe.js.map +1 -0
  42. package/dist/resources/context/aggregation-patterns.md +2 -2
  43. package/dist/resources/context/ecosystem-boundaries.md +130 -0
  44. package/dist/resources/context/tool-usage.md +2 -2
  45. package/dist/resources/index.d.ts.map +1 -1
  46. package/dist/resources/index.js +9 -0
  47. package/dist/resources/index.js.map +1 -1
  48. package/dist/server.d.ts +1 -1
  49. package/dist/server.d.ts.map +1 -1
  50. package/dist/server.js +17 -0
  51. package/dist/server.js.map +1 -1
  52. package/dist/services/cache/snapshots.d.ts.map +1 -1
  53. package/dist/services/cache/snapshots.js +11 -10
  54. package/dist/services/cache/snapshots.js.map +1 -1
  55. package/dist/services/coa/describe.d.ts +49 -0
  56. package/dist/services/coa/describe.d.ts.map +1 -0
  57. package/dist/services/coa/describe.js +182 -0
  58. package/dist/services/coa/describe.js.map +1 -0
  59. package/dist/services/coa/preflight.d.ts +34 -0
  60. package/dist/services/coa/preflight.d.ts.map +1 -0
  61. package/dist/services/coa/preflight.js +211 -0
  62. package/dist/services/coa/preflight.js.map +1 -0
  63. package/dist/services/coa/project.d.ts +11 -0
  64. package/dist/services/coa/project.d.ts.map +1 -0
  65. package/dist/services/coa/project.js +35 -0
  66. package/dist/services/coa/project.js.map +1 -0
  67. package/dist/services/coa/redact.d.ts +22 -0
  68. package/dist/services/coa/redact.d.ts.map +1 -0
  69. package/dist/services/coa/redact.js +84 -0
  70. package/dist/services/coa/redact.js.map +1 -0
  71. package/dist/services/coa/resolver.d.ts +21 -0
  72. package/dist/services/coa/resolver.d.ts.map +1 -0
  73. package/dist/services/coa/resolver.js +90 -0
  74. package/dist/services/coa/resolver.js.map +1 -0
  75. package/dist/services/coa/runner.d.ts +30 -0
  76. package/dist/services/coa/runner.d.ts.map +1 -0
  77. package/dist/services/coa/runner.js +117 -0
  78. package/dist/services/coa/runner.js.map +1 -0
  79. package/dist/services/config/coa-config.d.ts +48 -0
  80. package/dist/services/config/coa-config.d.ts.map +1 -0
  81. package/dist/services/config/coa-config.js +151 -0
  82. package/dist/services/config/coa-config.js.map +1 -0
  83. package/dist/services/config/credentials.d.ts +37 -0
  84. package/dist/services/config/credentials.d.ts.map +1 -0
  85. package/dist/services/config/credentials.js +123 -0
  86. package/dist/services/config/credentials.js.map +1 -0
  87. package/dist/services/lineage/lineage-cache.d.ts.map +1 -1
  88. package/dist/services/lineage/lineage-cache.js +26 -7
  89. package/dist/services/lineage/lineage-cache.js.map +1 -1
  90. package/dist/services/lineage/lineage-propagation.d.ts +1 -0
  91. package/dist/services/lineage/lineage-propagation.d.ts.map +1 -1
  92. package/dist/services/lineage/lineage-propagation.js +139 -56
  93. package/dist/services/lineage/lineage-propagation.js.map +1 -1
  94. package/dist/services/pipelines/intent-resolution.d.ts.map +1 -1
  95. package/dist/services/pipelines/intent-resolution.js +7 -1
  96. package/dist/services/pipelines/intent-resolution.js.map +1 -1
  97. package/dist/services/pipelines/planning-types.d.ts +4 -4
  98. package/dist/services/setup/diagnose.d.ts +124 -0
  99. package/dist/services/setup/diagnose.d.ts.map +1 -0
  100. package/dist/services/setup/diagnose.js +326 -0
  101. package/dist/services/setup/diagnose.js.map +1 -0
  102. package/dist/services/workspace/join-helpers.d.ts +9 -0
  103. package/dist/services/workspace/join-helpers.d.ts.map +1 -1
  104. package/dist/services/workspace/join-helpers.js +20 -2
  105. package/dist/services/workspace/join-helpers.js.map +1 -1
  106. package/dist/services/workspace/join-operations.d.ts.map +1 -1
  107. package/dist/services/workspace/join-operations.js +14 -2
  108. package/dist/services/workspace/join-operations.js.map +1 -1
  109. package/package.json +3 -1
package/README.md CHANGED
@@ -1,16 +1,46 @@
1
1
  # coalesce-transform-mcp
2
2
 
3
- MCP server for the [Coalesce](https://coalesce.io/) Transform API. Connect AI assistants like Claude, Cursor, or Windsurf to your Coalesce workspace to manage nodes, pipelines, environments, jobs, runs, and more.
3
+ MCP server for [Coalesce](https://coalesce.io/). Connect AI assistants like Claude, Cursor, or Windsurf to Coalesce to manage nodes, pipelines, environments, jobs, and runs — **and**, starting with 0.5, drive the local-first `coa` CLI from the same server: validate a project, preview DDL/DML, plan a deployment, and apply it to a cloud environment. One install, two execution surfaces.
4
+
5
+ > **First time here?** Two ways to get credentials to the server: (a) if you already use the `coa` CLI locally, the server reads the same `~/.coa/config` file — one shared credential store, nothing to duplicate; (b) otherwise, set `COALESCE_ACCESS_TOKEN` in your MCP client config. Either path works. The `/coalesce-setup` prompt uses `diagnose_setup` to walk you through whatever you're missing.
6
+
7
+ ## Contents
8
+
9
+ - [What you get](#what-you-get)
10
+ - [Quick Start](#quick-start)
11
+ - [Trying a prerelease (alpha)](#trying-a-prerelease-alpha)
12
+ - [Using the COA CLI tools](#using-the-coa-cli-tools)
13
+ - [Requirements](#requirements)
14
+ - [Environment Variables](#environment-variables)
15
+ - [Safety model](#safety-model)
16
+ - [Resources](#resources)
17
+ - [Tool Reference](#tool-reference)
18
+ - [Cloud REST tools](#cloud-rest-tools)
19
+ - [Intelligent tools](#intelligent-tools)
20
+ - [COA CLI tools](#coa-cli-tools)
21
+ - [Snowflake exploration via Cortex Code](#snowflake-exploration-via-cortex-code)
22
+ - [Notes and conventions](#notes-and-conventions)
23
+ - [Links](#links)
24
+ - [License](#license)
25
+
26
+ ## What you get
27
+
28
+ The server exposes two complementary ways of working with Coalesce:
29
+
30
+ **1. Cloud REST tools** (the original surface) — manage workspaces, environments, nodes, pipelines, jobs, runs, projects, git accounts, and users through the Coalesce Deploy API. All agent interaction flows through the authenticated `COALESCE_ACCESS_TOKEN`. Right for: building pipelines declaratively, editing node YAML, reviewing lineage, running deployed jobs, and auditing documentation.
31
+
32
+ **2. Local COA CLI tools** (new in 0.5) — wrap the bundled [`@coalescesoftware/coa`](https://www.npmjs.com/package/@coalescesoftware/coa) CLI to work against a local project directory and the warehouse directly. Right for: validating a project before checkin, previewing generated DDL/DML (`--dry-run`), iterating on V2 `.sql` node files, and running `plan → deploy → refresh` cycles. COA is bundled — **no separate install step**.
33
+
34
+ The two modes are orthogonal. Use both, one, or the other. Destructive tools require explicit confirmation in both modes.
4
35
 
5
36
  ## Quick Start
6
37
 
7
- **1. Set your access token** in `~/.zshrc` or `~/.bashrc`:
38
+ **1. Provide a Coalesce access token.** Pick one path:
8
39
 
9
- ```bash
10
- export COALESCE_ACCESS_TOKEN="your-token-here"
11
- ```
40
+ - **Option A — reuse `~/.coa/config`** (best if you already use the `coa` CLI). Add a `token=` line under the profile you want to use. See [Reading from ~/.coa/config](#reading-from-coaconfig) for the schema the MCP consumes, and run `npx @coalescesoftware/coa describe config` for COA's own reference.
41
+ - **Option B — env var** (simplest for first-time MCP users). Generate a token from Deploy → User Settings in Coalesce, then set `COALESCE_ACCESS_TOKEN` in your MCP client config (see step 2). No file required.
12
42
 
13
- Generate a token from the Deploy tab in your Coalesce workspace ([docs](https://docs.coalesce.io/docs/api/authentication)).
43
+ When both are set, the env var wins see [Environment Variables](#environment-variables) for precedence details.
14
44
 
15
45
  **2. Add to your MCP client config:**
16
46
 
@@ -21,7 +51,7 @@ Generate a token from the Deploy tab in your Coalesce workspace ([docs](https://
21
51
  | Cursor | `.cursor/mcp.json` in project root |
22
52
  | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
23
53
 
24
- **Claude Code** (`.mcp.json`):
54
+ **Claude Code** (`.mcp.json`) — with env-var auth (Option B):
25
55
 
26
56
  ```json
27
57
  {
@@ -35,41 +65,61 @@ Generate a token from the Deploy tab in your Coalesce workspace ([docs](https://
35
65
  }
36
66
  ```
37
67
 
38
- **Claude Desktop, Cursor, Windsurf**same thing, wrapped in `"mcpServers"`:
68
+ With profile auth (Option A), drop the `env` block entirely the server reads `~/.coa/config` automatically. To use a non-default profile, set `"env": { "COALESCE_PROFILE": "MEDBASE" }`.
69
+
70
+ **Claude Desktop, Cursor, Windsurf** — same thing, wrapped in `"mcpServers"`.
71
+
72
+ See [Environment Variables](#environment-variables) for every knob you might need and the env-vs-profile precedence rules.
73
+
74
+ > **Never hardcode credentials in config files tracked by git.** The `${VAR}` syntax pulls values from your shell environment.
75
+
76
+ ### Trying a prerelease (alpha)
77
+
78
+ Pre-release builds are published to the `@alpha` npm dist-tag while `@latest` stays on stable. Point your MCP client at the alpha channel by appending `@alpha` to the npx arg:
39
79
 
40
80
  ```json
41
81
  {
42
- "mcpServers": {
43
- "coalesce-transform": {
44
- "command": "npx",
45
- "args": ["coalesce-transform-mcp"],
46
- "env": {
47
- "COALESCE_ACCESS_TOKEN": "${COALESCE_ACCESS_TOKEN}"
48
- }
49
- }
82
+ "coalesce-transform": {
83
+ "command": "npx",
84
+ "args": ["coalesce-transform-mcp@alpha"]
50
85
  }
51
86
  }
52
87
  ```
53
88
 
54
- The server defaults to the US region. See [Environment Variables](#environment-variables) if you need to change the region, enable run tools, or configure repo-backed features.
89
+ Restart your MCP client after changing the config so `npx` re-resolves.
55
90
 
56
- > **Never hardcode credentials in config files tracked by git.** The `${VAR}` syntax pulls values from your shell environment.
91
+ To pin to an exact prerelease build rather than whatever `@alpha` resolves to today, replace `@alpha` with the full version, e.g. `coalesce-transform-mcp@0.5.0-alpha.2`. If `npx` is serving a stale cached copy when `@alpha` advances, force a fresh fetch with `npx -y coalesce-transform-mcp@alpha`.
92
+
93
+ To run alpha and stable side-by-side, register both with different server names (e.g. `coalesce-transform` for stable and `coalesce-transform-alpha` for the prerelease). To switch back to stable, drop the `@alpha` suffix and restart.
94
+
95
+ ### Using the COA CLI tools
96
+
97
+ The COA CLI tools require no extra install — COA is bundled as a dependency. Usage notes:
98
+
99
+ - **Local commands** (`coa_doctor`, `coa_validate`, `coa_dry_run_create`, `coa_dry_run_run`, `coa_create`, `coa_run`, `coa_plan`) need a COA project directory (one that contains `data.yml`). Pass the path via the `projectPath` tool argument.
100
+ - **Cloud commands** (`coa_list_environments`, `coa_list_environment_nodes`, `coa_list_runs`, `coa_deploy`, `coa_refresh`) read credentials from `~/.coa/config` — the same file the MCP uses. Populate the file once (see [Reading from ~/.coa/config](#reading-from-coaconfig)) and both surfaces share it.
101
+ - **Profile resolution**: cloud tools accept an optional `profile` arg. When omitted, they fall back to `COALESCE_PROFILE` (env var), then to COA's own `[default]` — so you don't have to pass it on every call.
102
+ - **Warehouse-touching commands** (`coa_create`, `coa_run`) need a valid `workspaces.yml` in the project root with storage-location mappings. Preflight catches a missing file before execution.
57
103
 
58
104
  ## Requirements
59
105
 
60
106
  - [Node.js](https://nodejs.org/) >= 22.0.0
61
- - A [Coalesce](https://coalesce.io/) account with a workspace and access token
107
+ - A [Coalesce](https://coalesce.io/) account with a workspace
62
108
  - An MCP-compatible AI client
63
- - **For run tools only:** Snowflake key pair authentication (see below)
109
+ - A `COALESCE_ACCESS_TOKEN` env var OR a populated `~/.coa/config` with a `token=` field — the server reads both and prefers env when they disagree
110
+ - **For run tools (`start_run`/`run_and_wait`/`retry_*`, `coa_create`/`coa_run`) only:** Snowflake credentials (key-pair or PAT). Same source choice as above — env vars or the matching `snowflake*` keys in `~/.coa/config`
111
+
112
+ Install footprint is ~76 MB unpacked due to the bundled `@coalescesoftware/coa` CLI, which ships its own self-contained runtime. The MCP tarball itself stays under 1 MB.
64
113
 
65
114
  ## Environment Variables
66
115
 
67
- Only `COALESCE_ACCESS_TOKEN` is required. Everything else is optional.
116
+ The server merges values from `~/.coa/config` and the MCP env with **env-wins precedence** — a matching env var always overrides the profile value, so you can pin a single field per session without editing the config file.
68
117
 
69
118
  <!-- ENV_METADATA_CORE_TABLE_START -->
70
119
  | Variable | Description | Default |
71
120
  | -------- | -------- | -------- |
72
- | `COALESCE_ACCESS_TOKEN` | **Required.** Bearer token from the Coalesce Deploy tab. | — |
121
+ | `COALESCE_ACCESS_TOKEN` | Bearer token from the Coalesce Deploy tab. Optional when `~/.coa/config` provides a `token`. | — |
122
+ | `COALESCE_PROFILE` | Selects which `~/.coa/config` profile to load. | `default` |
73
123
  | `COALESCE_BASE_URL` | Region-specific base URL. | `https://app.coalescesoftware.io (US)` |
74
124
  | `COALESCE_ORG_ID` | Fallback org ID for cancel-run. | — |
75
125
  | `COALESCE_REPO_PATH` | Local repo root for repo-backed tools and pipeline planning. | — |
@@ -81,9 +131,31 @@ Only `COALESCE_ACCESS_TOKEN` is required. Everything else is optional.
81
131
  | `COALESCE_MCP_SKILLS_DIR` | Directory for customizable AI skill resources. When set, reads context resources from this directory and seeds defaults on first run. Users can augment or override any skill. | — |
82
132
  <!-- ENV_METADATA_CORE_TABLE_END -->
83
133
 
84
- ### Snowflake (for run tools only)
134
+ ### Reading from ~/.coa/config
135
+
136
+ COA stores credentials in a standard INI file at `~/.coa/config`. You create it by hand (or let `coa` write it as you use the CLI over time). For the authoritative reference, run `npx @coalescesoftware/coa describe config`.
137
+
138
+ The MCP reads the profile selected by `COALESCE_PROFILE` (defaulting to `[default]`) and maps the keys it cares about onto the env vars above: `token` ↔ `COALESCE_ACCESS_TOKEN`, `domain` ↔ `COALESCE_BASE_URL`, and each `snowflake*` key ↔ its corresponding `SNOWFLAKE_*` env var. Env vars override individual fields.
139
+
140
+ ```ini
141
+ [default]
142
+ token=<your-coalesce-refresh-token>
143
+ domain=https://your-org.app.coalescesoftware.io
144
+ snowflakeUsername=YOUR_USER
145
+ snowflakeRole=YOUR_ROLE
146
+ snowflakeWarehouse=YOUR_WAREHOUSE
147
+ snowflakeKeyPairKey=/Users/you/.coa/rsa_key.p8
148
+ snowflakeAuthType=KeyPair
149
+
150
+ [staging]
151
+ # …additional profiles; select with COALESCE_PROFILE
152
+ ```
153
+
154
+ Only the fields the MCP needs are shown above — COA's config supports many more (see `coa describe config`). Unknown keys are ignored by this server.
85
155
 
86
- Required for `start_run`, `retry_run`, `run_and_wait`, and `retry_and_wait`. The server starts without them — they're validated when you first use a run tool.
156
+ ### Snowflake overrides (for run tools only)
157
+
158
+ Run tools (`start_run`, `retry_run`, `run_and_wait`, `retry_and_wait`) and the warehouse-touching COA tools (`coa_create`, `coa_run`) need Snowflake credentials. These normally come from `~/.coa/config`. Override any field via env var if needed:
87
159
 
88
160
  <!-- ENV_METADATA_SNOWFLAKE_TABLE_START -->
89
161
  | Variable | Required | Description |
@@ -96,23 +168,11 @@ Required for `start_run`, `retry_run`, `run_and_wait`, and `retry_and_wait`. The
96
168
  | `SNOWFLAKE_ROLE` | Yes | Snowflake user role |
97
169
  <!-- ENV_METADATA_SNOWFLAKE_TABLE_END -->
98
170
 
99
- To use optional variables, add them to your shell profile and pass them through in your MCP config. Here's a full example with everything enabled:
100
-
101
- **`~/.zshrc`:**
171
+ "Required" means one of env OR the matching `~/.coa/config` field must supply the value. **`SNOWFLAKE_PAT` is env-only** COA's config uses `snowflakePassword` for Basic auth (a different concept), which this server deliberately doesn't read.
102
172
 
103
- ```bash
104
- export COALESCE_ACCESS_TOKEN="your-token-here"
105
- export COALESCE_BASE_URL="https://app.eu.coalescesoftware.io"
106
- export COALESCE_REPO_PATH="/path/to/local/coalesce-repo"
107
- export SNOWFLAKE_USERNAME="your-username"
108
- export SNOWFLAKE_KEY_PAIR_KEY="/path/to/snowflake_key.pem" # Option A: Key Pair
109
- export SNOWFLAKE_KEY_PAIR_PASS="your-passphrase" # (only if key is encrypted)
110
- export SNOWFLAKE_PAT="your-programmatic-access-token" # Option B: PAT (if both set, Key Pair wins)
111
- export SNOWFLAKE_WAREHOUSE="your-warehouse"
112
- export SNOWFLAKE_ROLE="your-role"
113
- ```
173
+ ### Overriding individual fields
114
174
 
115
- **`.mcp.json`:**
175
+ The most common reason to set env vars is to flip a single field for a session without editing the config file:
116
176
 
117
177
  ```json
118
178
  {
@@ -120,49 +180,63 @@ export SNOWFLAKE_ROLE="your-role"
120
180
  "command": "npx",
121
181
  "args": ["coalesce-transform-mcp"],
122
182
  "env": {
123
- "COALESCE_ACCESS_TOKEN": "${COALESCE_ACCESS_TOKEN}",
124
- "COALESCE_BASE_URL": "${COALESCE_BASE_URL}",
125
- "COALESCE_REPO_PATH": "${COALESCE_REPO_PATH}",
126
- "SNOWFLAKE_USERNAME": "${SNOWFLAKE_USERNAME}",
127
- "SNOWFLAKE_KEY_PAIR_KEY": "${SNOWFLAKE_KEY_PAIR_KEY}",
128
- "SNOWFLAKE_KEY_PAIR_PASS": "${SNOWFLAKE_KEY_PAIR_PASS}",
129
- "SNOWFLAKE_PAT": "${SNOWFLAKE_PAT}",
130
- "SNOWFLAKE_WAREHOUSE": "${SNOWFLAKE_WAREHOUSE}",
131
- "SNOWFLAKE_ROLE": "${SNOWFLAKE_ROLE}"
183
+ "COALESCE_PROFILE": "staging",
184
+ "SNOWFLAKE_ROLE": "TRANSFORMER_ADMIN"
132
185
  }
133
186
  }
134
187
  }
135
188
  ```
136
189
 
137
- Only include the variables you need — the Quick Start config with just `COALESCE_ACCESS_TOKEN` is enough to get started.
190
+ That says "use the `[staging]` profile, but override its `snowflakeRole`."
191
+
192
+ ## Safety model
193
+
194
+ The server uses three layers to prevent an agent from doing something destructive by surprise:
138
195
 
139
- ## Skills Directory
196
+ 1. **Tool annotations.** Every tool carries MCP annotations (`readOnlyHint`, `destructiveHint`, `idempotentHint`). MCP clients that respect these can filter tools proactively. The ⚠️ marker in [Tool Reference](#tool-reference) marks `destructiveHint: true` tools.
197
+ 2. **`COALESCE_MCP_READ_ONLY=true`** hides all write-style tools at server startup. Only read/list/search/analyze/review/diagnose/plan tools are registered. Useful for auditing or agent sandboxes.
198
+ 3. **Explicit confirmation for destructive ops.** Tools marked destructive require a `confirmed: true` argument. When the MCP client supports elicitation, the server prompts the user interactively; otherwise it returns a `STOP_AND_CONFIRM` response the agent must surface before retrying with `confirmed: true`. This applies to: `delete_*`, `propagate_column_change`, `cancel_run`, `clear_data_cache`, `coa_create`, `coa_run`, `coa_deploy`, `coa_refresh`.
140
199
 
141
- The server ships 23 AI skill resources that guide how agents interact with Coalesce. By default these are bundled inside the package, but you can make them visible and editable by setting `COALESCE_MCP_SKILLS_DIR`.
200
+ Additionally, the local COA write tools run **preflight validation** before shelling out. Preflight scans the project and blocks on known footguns:
142
201
 
143
- ### Setup
202
+ | Code | Level | What it catches |
203
+ | ---- | ----- | --------------- |
204
+ | `SQL_DOUBLE_QUOTED_REF` | error | `.sql` nodes using `ref("…")` — silently returns `UNKNOWN` columns; must be single-quoted |
205
+ | `WORKSPACES_YML_MISSING` | error | `workspaces.yml` not in project root — required for local create/run |
206
+ | `SELECTOR_COMBINED_OR` | error | `{ A \|\| B }` selector form — matches zero nodes; must be `{ A } \|\| { B }` |
207
+ | `SQL_LITERAL_UNION_ALL` | warning | Literal `UNION ALL` in a V2 `.sql` node — silently dropped by the V2 parser; use `insertStrategy: UNION ALL` instead |
208
+ | `DATA_YML_UNEXPECTED_FILEVERSION` | warning | `data.yml` missing or not `fileVersion: 3` |
209
+ | `DATA_YML_NO_FILEVERSION` | warning | `data.yml` has no `fileVersion` field |
210
+
211
+ Errors block execution; warnings pass through in the tool response as `preflightWarnings` so agents can surface them.
212
+
213
+ ## Resources
214
+
215
+ Resources are read-only context documents exposed via MCP that clients can pull into their prompts on demand. There are two families.
216
+
217
+ ### Coalesce context skills (customizable)
218
+
219
+ 24 curated markdown resources under `coalesce://context/*` that guide how agents interact with the server — SQL conventions per warehouse, node-type selection, pipeline workflows, lineage/impact guidance, and so on. Set `COALESCE_MCP_SKILLS_DIR` to make them editable on disk:
144
220
 
145
221
  ```bash
146
222
  export COALESCE_MCP_SKILLS_DIR="/path/to/my-skills"
147
223
  ```
148
224
 
149
- On first run, the server seeds the directory with 46 files:
225
+ On first run the server seeds the directory with 48 files:
150
226
 
151
227
  - `coalesce_skills.<name>.md` — the default skill content (editable)
152
228
  - `user_skills.<name>.md` — your customization file (starts as an inactive stub with instructions)
153
229
 
154
- ### How customization works
155
-
156
230
  Each resource resolves using this priority:
157
231
 
158
232
  1. **Override** — `user_skills.<name>.md` starts with `<!-- OVERRIDE -->` → only the user file is served
159
233
  2. **Augment** — `user_skills.<name>.md` has custom content (remove the `<!-- STUB -->` line first) → default + user content are concatenated
160
234
  3. **Default** — `user_skills.<name>.md` is missing, empty, or still has the seeded stub → default skill content is served
161
- 4. **Disabled** — both files deleted → empty content is served (effectively disabled)
235
+ 4. **Disabled** — both files deleted → empty content is served
162
236
 
163
237
  Seeding is idempotent — it never overwrites files you've already modified.
164
238
 
165
- ### Available Skills
239
+ #### Available context skills
166
240
 
167
241
  | Skill | File | Description |
168
242
  | ----- | ---- | ----------- |
@@ -189,168 +263,206 @@ Seeding is idempotent — it never overwrites files you've already modified.
189
263
  | Run Diagnostics Guide | `run-diagnostics-guide` | Using `diagnose_run_failure` to analyze failed runs and determine fixes |
190
264
  | Pipeline Review Guide | `pipeline-review-guide` | Using `review_pipeline` for pipeline analysis and optimization |
191
265
  | Pipeline Workshop Guide | `pipeline-workshop-guide` | Using pipeline workshop tools for iterative, conversational pipeline building |
266
+ | Ecosystem Boundaries | `ecosystem-boundaries` | Scope of this MCP vs adjacent data engineering MCPs (Snowflake, Fivetran, dbt, Catalog) |
267
+
268
+ ### COA describe topics (sourced from the CLI)
269
+
270
+ 10 resources under `coalesce://coa/describe/*` that surface the bundled COA CLI's self-describing documentation. Content is fetched from `coa describe <topic>` on first access and cached to disk, keyed by the pinned COA version — so agents always see docs that match the CLI they're driving. Topics: `overview`, `commands`, `selectors`, `schemas`, `workflow`, `structure`, `concepts`, `sql-format`, `node-types`, `config`.
271
+
272
+ For parameterized topics (`command <name>`, `schema <type>`), use the `coa_describe` tool with a `subtopic` argument.
192
273
 
193
274
  ## Tool Reference
194
275
 
195
- ⚠️ = Destructive operation
276
+ ⚠️ = Destructive (requires `confirmed: true`). 🧰 = Runs bundled `coa` CLI.
196
277
 
197
- ### API Tools
278
+ ### Cloud REST tools
198
279
 
199
- Coalesce Platform Tools: manage workspaces, environments, projects, runs, and other platform resources.
280
+ Manage Coalesce platform resources through the Deploy API.
200
281
 
201
282
  #### Environments
202
283
 
203
- - `list_environments` - List all available environments
204
- - `get_environment` - Get details of a specific environment
205
- - `create_environment` - Create a new environment within a project
206
- - `delete_environment` - Delete an environment ⚠️
284
+ - `list_environments` List all available environments
285
+ - `get_environment` Get details of a specific environment
286
+ - `create_environment` Create a new environment within a project
287
+ - `delete_environment` Delete an environment ⚠️
207
288
 
208
289
  #### Workspaces
209
290
 
210
- - `list_workspaces` - List all workspaces
211
- - `get_workspace` - Get details of a specific workspace
291
+ - `list_workspaces` List all workspaces
292
+ - `get_workspace` Get details of a specific workspace
212
293
 
213
294
  #### Nodes
214
295
 
215
- - `list_environment_nodes` - List nodes in an environment
216
- - `list_workspace_nodes` - List nodes in a workspace
217
- - `get_environment_node` - Get a specific environment node
218
- - `get_workspace_node` - Get a specific workspace node
219
- - `set_workspace_node` - Replace a workspace node with a full body
220
- - `update_workspace_node` - Safely update selected fields of a workspace node
221
- - `delete_workspace_node` - Delete a node from a workspace ⚠️
296
+ - `list_environment_nodes` List nodes in an environment
297
+ - `list_workspace_nodes` List nodes in a workspace
298
+ - `get_environment_node` Get a specific environment node
299
+ - `get_workspace_node` Get a specific workspace node
300
+ - `set_workspace_node` Replace a workspace node with a full body
301
+ - `update_workspace_node` Safely update selected fields of a workspace node
302
+ - `delete_workspace_node` Delete a node from a workspace ⚠️
222
303
 
223
304
  #### Jobs
224
305
 
225
- - `list_environment_jobs` - List all jobs for an environment
226
- - `create_workspace_job` - Create a job in a workspace with node include/exclude selectors
227
- - `get_environment_job` - Get details of a specific job (via environment)
228
- - `update_workspace_job` - Update a job's name and node selectors
229
- - `delete_workspace_job` - Delete a job ⚠️
306
+ - `list_environment_jobs` List all jobs for an environment
307
+ - `create_workspace_job` Create a job in a workspace with node include/exclude selectors
308
+ - `get_environment_job` Get details of a specific job (via environment)
309
+ - `update_workspace_job` Update a job's name and node selectors
310
+ - `delete_workspace_job` Delete a job ⚠️
230
311
 
231
312
  #### Subgraphs
232
313
 
233
- - `list_workspace_subgraphs` - List subgraphs in a workspace
234
- - `get_workspace_subgraph` - Get details of a specific subgraph
235
- - `create_workspace_subgraph` - Create a subgraph to group nodes visually
236
- - `update_workspace_subgraph` - Update a subgraph's name and node membership
237
- - `delete_workspace_subgraph` - Delete a subgraph (nodes are NOT deleted) ⚠️
314
+ - `list_workspace_subgraphs` List subgraphs in a workspace
315
+ - `get_workspace_subgraph` Get details of a specific subgraph
316
+ - `create_workspace_subgraph` Create a subgraph to group nodes visually
317
+ - `update_workspace_subgraph` Update a subgraph's name and node membership
318
+ - `delete_workspace_subgraph` Delete a subgraph (nodes are NOT deleted) ⚠️
238
319
 
239
320
  #### Runs
240
321
 
241
- - `diagnose_run_failure` - Diagnose a failed run with error classification, root-cause analysis, and actionable fix suggestions
242
- - `list_runs` - List runs with optional filters
243
- - `get_run` - Get details of a specific run
244
- - `get_run_results` - Get results of a completed run
245
- - `start_run` - Start a new run; requires Snowflake auth (Key Pair or PAT, credentials from env vars)
246
- - `run_status` - Check status of a running job
247
- - `retry_run` - Retry a failed run; requires Snowflake auth (Key Pair or PAT, credentials from env vars)
248
- - `cancel_run` - Cancel a running job (requires `runID` and `environmentID`; `orgID` may come from `COALESCE_ORG_ID`) ⚠️
322
+ - `diagnose_run_failure` Diagnose a failed run with error classification, root-cause analysis, and actionable fix suggestions
323
+ - `list_runs` List runs with optional filters
324
+ - `get_run` Get details of a specific run
325
+ - `get_run_results` Get results of a completed run
326
+ - `start_run` Start a new run; requires Snowflake auth (Key Pair or PAT, credentials from env vars)
327
+ - `run_status` Check status of a running job
328
+ - `retry_run` Retry a failed run; requires Snowflake auth (Key Pair or PAT, credentials from env vars)
329
+ - `cancel_run` Cancel a running job (requires `runID` and `environmentID`; `orgID` may come from `COALESCE_ORG_ID`) ⚠️
249
330
 
250
331
  #### Projects
251
332
 
252
- - `list_projects` - List all projects
253
- - `get_project` - Get project details
254
- - `create_project` - Create a new project
255
- - `update_project` - Update a project
256
- - `delete_project` - Delete a project ⚠️
333
+ - `list_projects` List all projects
334
+ - `get_project` Get project details
335
+ - `create_project` Create a new project
336
+ - `update_project` Update a project
337
+ - `delete_project` Delete a project ⚠️
257
338
 
258
339
  #### Git Accounts
259
340
 
260
- - `list_git_accounts` - List all git accounts
261
- - `get_git_account` - Get git account details
262
- - `create_git_account` - Create a new git account
263
- - `update_git_account` - Update a git account
264
- - `delete_git_account` - Delete a git account ⚠️
265
-
266
- #### Users
267
-
268
- - `list_org_users` - List all organization users
269
- - `get_user_roles` - Get roles for a specific user
270
- - `list_user_roles` - List all user roles
271
- - `set_org_role` - Set organization role for a user
272
- - `set_project_role` - Set project role for a user
273
- - `delete_project_role` - Remove project role from a user ⚠️
274
- - `set_env_role` - Set environment role for a user
275
- - `delete_env_role` - Remove environment role from a user ⚠️
276
-
277
- ### Intelligent Tools
278
-
279
- Custom logic built on top of the API: pipeline planning, config completion, join analysis, workspace analysis, and more.
280
-
281
- #### Node Creation and Configuration
341
+ - `list_git_accounts` List all git accounts
342
+ - `get_git_account` Get git account details
343
+ - `create_git_account` Create a new git account
344
+ - `update_git_account` Update a git account
345
+ - `delete_git_account` Delete a git account ⚠️
346
+
347
+ #### Users and roles
348
+
349
+ - `list_org_users` List all organization users
350
+ - `get_user_roles` Get roles for a specific user
351
+ - `list_user_roles` List all user roles
352
+ - `set_org_role` Set organization role for a user
353
+ - `set_project_role` Set project role for a user
354
+ - `delete_project_role` Remove project role from a user ⚠️
355
+ - `set_env_role` Set environment role for a user
356
+ - `delete_env_role` Remove environment role from a user ⚠️
357
+
358
+ ### Intelligent tools
359
+
360
+ Custom logic on top of the Coalesce API: pipeline planning, config completion, join analysis, lineage, and more.
361
+
362
+ #### Node creation and configuration
363
+
364
+ - `create_workspace_node_from_scratch` — Create a workspace node with no predecessors, apply fields to the requested completion level, and run automatic config completion
365
+ - `create_workspace_node_from_predecessor` — Create a node from predecessor nodes, verify column coverage, suggest join columns, and run automatic config completion
366
+ - `replace_workspace_node_columns` — Replace `metadata.columns` wholesale and optionally apply additional changes for complex column rewrites
367
+ - `convert_join_to_aggregation` — Convert a join-style node into an aggregated fact-style node with generated JOIN/GROUP BY analysis
368
+ - `apply_join_condition` — Auto-generate and write a FROM/JOIN/ON clause for a multi-predecessor node
369
+ - `create_node_from_external_schema` — Create a workspace node whose columns match an existing warehouse table or external schema
370
+ - `complete_node_configuration` — Intelligently complete a node's configuration by analyzing context and applying best-practice rules
371
+ - `list_workspace_node_types` — List distinct node types observed in current workspace nodes
372
+ - `analyze_workspace_patterns` — Analyze workspace nodes to detect package adoption, pipeline layers, methodology, and generate recommendations
373
+
374
+ #### Pipeline planning and execution
375
+
376
+ - `plan_pipeline` — Plan a pipeline from SQL or a natural-language goal without mutating the workspace; ranks best-fit node types from the local repo
377
+ - `create_pipeline_from_plan` — Execute an approved pipeline plan using predecessor-based creation
378
+ - `create_pipeline_from_sql` — Plan and create a pipeline directly from SQL
379
+ - `build_pipeline_from_intent` — Build a pipeline from a natural language goal with automatic entity resolution and node type selection
380
+ - `review_pipeline` — Analyze an existing pipeline for redundant nodes, missing joins, layer violations, naming issues, and optimization opportunities
381
+ - `parse_sql_structure` — Parse a SQL statement into structural components (CTEs, source tables, projected columns) without touching the workspace
382
+ - `select_pipeline_node_type` — Rank and select the best Coalesce node type for a pipeline step using the deliberative selection loop against repo or workspace-observed types
383
+
384
+ #### Pipeline workshop
385
+
386
+ - `pipeline_workshop_open` — Open an iterative pipeline builder session with workspace context pre-loaded
387
+ - `pipeline_workshop_instruct` — Send a natural language instruction to modify the current workshop plan
388
+ - `get_pipeline_workshop_status` — Get the current state of a workshop session
389
+ - `pipeline_workshop_close` — Close a workshop session and release resources
390
+
391
+ #### Repo-backed node types and templates
392
+
393
+ - `list_repo_packages` — Inspect a committed local Coalesce repo and list package aliases plus enabled node-type coverage
394
+ - `list_repo_node_types` — List exact resolvable committed node-type identifiers from `nodeTypes/`
395
+ - `get_repo_node_type_definition` — Resolve one exact committed node type and return its outer definition plus parsed `nodeMetadataSpec`
396
+ - `generate_set_workspace_node_template` — Generate a YAML-friendly `set_workspace_node` body template from a definition object or committed repo definition
397
+ - `search_node_type_variants` — Search the committed node-type corpus by normalized family, package, primitive, or support status
398
+ - `get_node_type_variant` — Load one exact node-type corpus variant by variant key
399
+ - `generate_set_workspace_node_template_from_variant` — Generate a `set_workspace_node` body template from a committed corpus variant
400
+
401
+ #### Lineage and impact
402
+
403
+ - `get_upstream_nodes` — Walk the full upstream dependency graph for a node
404
+ - `get_downstream_nodes` — Walk the full downstream dependency graph for a node
405
+ - `get_column_lineage` — Trace a column through the pipeline upstream and downstream via column-level references
406
+ - `analyze_impact` — Analyze downstream impact of changing a node or specific column — returns impacted counts, grouped by depth, and critical path
407
+ - `propagate_column_change` — Update all downstream columns after a column rename or data type change ⚠️
408
+ - `search_workspace_content` — Search across node SQL, column names, descriptions, and config values using the lineage cache as a searchable index
409
+ - `audit_documentation_coverage` — Scan all workspace nodes and columns for missing descriptions and report coverage statistics
410
+
411
+ #### Cache and snapshots
412
+
413
+ - `cache_workspace_nodes` — Fetch every page of workspace nodes, write a full snapshot, and return cache metadata
414
+ - `cache_environment_nodes` — Fetch every page of environment nodes, write a full snapshot, and return cache metadata
415
+ - `cache_runs` — Fetch every page of run results, write a full snapshot, and return cache metadata
416
+ - `cache_org_users` — Fetch every page of organization users, write a full snapshot, and return cache metadata
417
+ - `clear_data_cache` — Delete all cached snapshots, auto-cached responses, and plan summaries ⚠️
418
+
419
+ #### Run workflows
420
+
421
+ - `run_and_wait` — Start a run and poll until completion; requires Snowflake auth (Key Pair or PAT)
422
+ - `retry_and_wait` — Retry a failed run and poll until completion; requires Snowflake auth (Key Pair or PAT)
423
+ - `get_run_details` — Get run metadata and results in one call
424
+ - `get_environment_overview` — Get environment details with full node list
425
+ - `get_environment_health` — Comprehensive health dashboard: node counts by type, run statuses, failed runs in last 24h, stale nodes, dependency health, and overall health score (walks all paginated environment runs before scoring — slower on busy environments)
282
426
 
283
- - `create_workspace_node_from_scratch` - Create a workspace node with no predecessors, apply fields to the requested completion level, and run automatic config completion
284
- - `create_workspace_node_from_predecessor` - Create a node from predecessor nodes, verify column coverage, suggest join columns, and run automatic config completion
285
- - `replace_workspace_node_columns` - Replace `metadata.columns` wholesale and optionally apply additional changes for complex column rewrites
286
- - `convert_join_to_aggregation` - Convert a join-style node into an aggregated fact-style node with generated JOIN/GROUP BY analysis
287
- - `apply_join_condition` - Auto-generate and write a FROM/JOIN/ON clause for a multi-predecessor node
288
- - `create_node_from_external_schema` - Create a workspace node whose columns match an existing warehouse table or external schema
289
- - `complete_node_configuration` - Intelligently complete a node's configuration by analyzing context and applying best-practice rules
290
- - `list_workspace_node_types` - List distinct node types observed in current workspace nodes
291
- - `analyze_workspace_patterns` - Analyze workspace nodes to detect package adoption, pipeline layers, methodology, and generate recommendations
292
-
293
- #### Pipeline Planning and Execution
294
-
295
- - `plan_pipeline` - Plan a pipeline from SQL or a natural-language goal without mutating the workspace; ranks best-fit node types from the local repo
296
- - `create_pipeline_from_plan` - Execute an approved pipeline plan using predecessor-based creation
297
- - `create_pipeline_from_sql` - Plan and create a pipeline directly from SQL
298
- - `build_pipeline_from_intent` - Build a pipeline from a natural language goal with automatic entity resolution and node type selection
299
- - `review_pipeline` - Analyze an existing pipeline for redundant nodes, missing joins, layer violations, naming issues, and optimization opportunities
300
- - `parse_sql_structure` - Parse a SQL statement into structural components (CTEs, source tables, projected columns) without touching the workspace
301
- - `select_pipeline_node_type` - Rank and select the best Coalesce node type for a pipeline step using the deliberative selection loop against repo or workspace-observed types
427
+ #### Skills
302
428
 
303
- #### Pipeline Workshop
429
+ - `personalize_skills` — Export bundled skill files to a local directory for customization; creates editable `coalesce_skills.{name}.md` and `user_skills.{name}.md` pairs (idempotent — never overwrites existing files)
304
430
 
305
- - `pipeline_workshop_open` - Open an iterative pipeline builder session with workspace context pre-loaded
306
- - `pipeline_workshop_instruct` - Send a natural language instruction to modify the current workshop plan
307
- - `get_pipeline_workshop_status` - Get the current state of a workshop session
308
- - `pipeline_workshop_close` - Close a workshop session and release resources
431
+ #### Setup
309
432
 
310
- #### Repo-Backed Node Types and Templates
433
+ - `diagnose_setup` — Stateless probe reporting which first-time-setup pieces are configured: access token, Snowflake credentials, `~/.coa/config` profile, local repo path, and a best-effort `coa doctor` check. Returns a structured report plus ordered `nextSteps` and per-field `source` markers (`env`, `profile:<name>`, or `missing`). Paired with the `/coalesce-setup` MCP prompt, which walks a user through any remaining gaps.
311
434
 
312
- - `list_repo_packages` - Inspect a committed local Coalesce repo and list package aliases plus enabled node-type coverage from `packages/*.yml`
313
- - `list_repo_node_types` - List exact resolvable committed node-type identifiers from `nodeTypes/`, optionally scoped to one package alias or currently in-use types
314
- - `get_repo_node_type_definition` - Resolve one exact committed node type from a local repo and return its outer definition plus raw and parsed `metadata.nodeMetadataSpec`
315
- - `generate_set_workspace_node_template` - Generate a YAML-friendly `set_workspace_node` body template from either a raw definition object or an exact committed repo definition resolved by `repoPath` or `COALESCE_REPO_PATH`
435
+ ### COA CLI tools
316
436
 
317
- #### Node Type Corpus
437
+ Wrap the bundled `@coalescesoftware/coa` CLI. All local tools accept a `projectPath` argument and validate that it contains `data.yml` before shelling out. Destructive tools run preflight validation; see [Safety model](#safety-model).
318
438
 
319
- - `search_node_type_variants` - Search the committed node-type corpus snapshot by normalized family, package, primitive, or support status
320
- - `get_node_type_variant` - Load one exact node-type corpus variant by variant key
321
- - `generate_set_workspace_node_template_from_variant` - Generate a `set_workspace_node` body template from a committed corpus variant without needing the original external source repo at runtime; partial variants are rejected unless `allowPartial=true`
439
+ #### Read-only, local
322
440
 
323
- #### Cache and Snapshots
441
+ - 🧰 `coa_doctor` — Check config, credentials, and warehouse connectivity for a project. Wraps `coa doctor --json`
442
+ - 🧰 `coa_validate` — Validate YAML schemas and scan a project for configuration problems. Wraps `coa validate --json`
443
+ - 🧰 `coa_list_project_nodes` — List all nodes defined in a local project (pre-deploy). Wraps `coa create --list-nodes`
444
+ - 🧰 `coa_dry_run_create` — Preview DDL without executing against the warehouse. Forces `--dry-run --verbose`
445
+ - 🧰 `coa_dry_run_run` — Preview DML without executing against the warehouse. Forces `--dry-run --verbose`
324
446
 
325
- - `cache_workspace_nodes` - Fetch every page of workspace nodes, write the full snapshot to `coalesce_transform_mcp_data_cache/nodes/`, and return only cache metadata
326
- - `cache_environment_nodes` - Fetch every page of environment nodes, write the full snapshot to `coalesce_transform_mcp_data_cache/nodes/`, and return only cache metadata
327
- - `cache_runs` - Fetch every page of run results, write the full snapshot to `coalesce_transform_mcp_data_cache/runs/`, and return only cache metadata
328
- - `cache_org_users` - Fetch every page of organization users, write the full snapshot to `coalesce_transform_mcp_data_cache/users/`, and return only cache metadata
329
- - `clear_data_cache` - Delete all cached snapshots, auto-cached responses, and plan summaries under `coalesce_transform_mcp_data_cache/` ⚠️
447
+ #### Read-only, cloud (require `~/.coa/config`)
330
448
 
331
- #### Workflows
449
+ - 🧰 `coa_list_environments` — List deployment environments. Wraps `coa environments list --format json`
450
+ - 🧰 `coa_list_environment_nodes` — List deployed nodes in an environment. Wraps `coa nodes list --environmentID ...`
451
+ - 🧰 `coa_list_runs` — List pipeline runs in a cloud environment (or across all environments). Wraps `coa runs list`
332
452
 
333
- - `run_and_wait` - Start a run and poll until completion; requires Snowflake auth (Key Pair or PAT)
334
- - `retry_and_wait` - Retry a failed run and poll until completion; requires Snowflake auth (Key Pair or PAT)
335
- - `get_run_details` - Get run metadata and results in one call
336
- - `get_environment_overview` - Get environment details with full node list
337
- - `get_environment_health` - Get a comprehensive health dashboard: node counts by type, run statuses, failed runs in last 24h, stale nodes, dependency health, and overall health score. This walks all paginated environment runs before scoring, so it can take longer on busy environments.
453
+ #### Describe
338
454
 
339
- #### Skills
455
+ - 🧰 `coa_describe` — Fetch a section of COA's self-describing documentation by topic + optional subtopic. Also exposed as `coalesce://coa/describe/*` [resources](#coa-describe-topics-sourced-from-the-cli)
340
456
 
341
- - `personalize_skills` - Export bundled skill files to a local directory for customization; creates editable `coalesce_skills.{name}.md` and `user_skills.{name}.md` pairs (idempotent — never overwrites existing files)
457
+ #### Write and deploy
342
458
 
343
- #### Lineage & Impact
459
+ - 🧰 `coa_plan` — Generate a deployment plan JSON by diffing the local project against a cloud environment. Writes `coa-plan.json` (configurable via `out`). Non-destructive
460
+ - 🧰 `coa_create` — Run DDL (CREATE/REPLACE) against the warehouse for selected nodes. Preflight-gated. ⚠️
461
+ - 🧰 `coa_run` — Run DML (INSERT/MERGE) to populate selected nodes. Preflight-gated. ⚠️
462
+ - 🧰 `coa_deploy` — Apply a plan JSON to a cloud environment. Verifies the plan file exists before running. ⚠️
463
+ - 🧰 `coa_refresh` — Run DML for selected nodes in an already-deployed environment (no local project required). ⚠️
344
464
 
345
- - `get_upstream_nodes` - Walk the full upstream dependency graph for a node and return every ancestor with depth level (no depth limit)
346
- - `get_downstream_nodes` - Walk the full downstream dependency graph for a node and return every dependent with depth level (no depth limit)
347
- - `get_column_lineage` - Trace a column through the entire pipeline upstream and downstream via column-level references
348
- - `analyze_impact` - Analyze downstream impact of changing a node or specific column — returns impacted counts, grouped by depth, and critical path
349
- - `propagate_column_change` - Update all downstream columns after a column rename or data type change ⚠️
350
- - `search_workspace_content` - Search across node SQL, column names, descriptions, and config values using the lineage cache as a searchable index
351
- - `audit_documentation_coverage` - Scan all workspace nodes and columns for missing descriptions and report coverage statistics
352
-
353
- ## Snowflake Exploration via Cortex Code
465
+ ## Snowflake exploration via Cortex Code
354
466
 
355
467
  This server manages node definitions, not live warehouse data. For Snowflake data questions (tables, schemas, row counts, sample data, permissions), add [Cortex Code](https://ai.snowflake.com) as a companion MCP server. The agent will automatically route Snowflake questions to cortex tools.
356
468
 
@@ -376,17 +488,23 @@ This server manages node definitions, not live warehouse data. For Snowflake dat
376
488
 
377
489
  The agent will see both servers' tools and route Snowflake data questions to cortex and node/pipeline questions to Coalesce tools.
378
490
 
379
- ## Notes
491
+ ## Notes and conventions
380
492
 
493
+ - **Credential resolution order.** For every Coalesce/Snowflake credential field: env var wins when set, otherwise the `~/.coa/config` profile selected by `COALESCE_PROFILE` (default `[default]`) fills in. Call `diagnose_setup` to see which source supplied each value — the `source` tags in its output read `env`, `profile:default`, etc.
494
+ - **Profile file is optional.** If `~/.coa/config` doesn't exist, the server falls back to env-only mode. Startup never fails because of a missing or malformed profile file — it just logs a stderr warning.
495
+ - **SQL override is disallowed.** Nodes are built via YAML/config (columns, transforms, join conditions), not raw SQL. Template generation strips `overrideSQLToggle`, and write helpers reject `overrideSQL` fields.
381
496
  - **Caching:** Large responses are auto-cached to disk. Use `cache_workspace_nodes` and similar tools when you want a reusable snapshot. Configure the threshold with `COALESCE_MCP_AUTO_CACHE_MAX_BYTES`.
382
497
  - **Repo-backed tools:** Set `COALESCE_REPO_PATH` to your local Coalesce repo root (containing `nodeTypes/`, `nodes/`, `packages/`) or pass `repoPath` on individual tool calls. The server does not clone repos or install packages.
383
- - **SQL override is disallowed.** Nodes are built via YAML/config (columns, transforms, join conditions), not raw SQL. Template generation strips `overrideSQLToggle`, and write helpers reject `overrideSQL` fields.
498
+ - **COA CLI versioning:** The bundled COA CLI is pinned to an exact alpha version. It is *not* a floating `@next` tag — every release of this MCP ships with a known-good COA build. Changelog scanning and bump policy live in [docs/RELEASES.md](docs/RELEASES.md).
499
+ - **COA describe cache:** COA describe output is cached under `~/.cache/coalesce-transform-mcp/coa-describe/<coa-version>/` after first access. Cache is version-keyed — upgrading the MCP automatically invalidates stale content.
384
500
 
385
501
  ## Links
386
502
 
387
503
  - [Coalesce Docs](https://docs.coalesce.io/docs)
388
504
  - [Coalesce API Docs](https://docs.coalesce.io/docs/api/authentication)
505
+ - [Coalesce CLI (`coa`)](https://docs.coalesce.io/docs/cli)
389
506
  - [Coalesce Marketplace Docs](https://docs.coalesce.io/docs/marketplace)
507
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
390
508
 
391
509
  ## License
392
510