@databrainhq/mcp-server 0.3.0-rc.6 → 0.3.0-rc.8

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.
package/README.md CHANGED
@@ -319,7 +319,7 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
319
319
 
320
320
  ## Tools Reference
321
321
 
322
- 44 tools organized by category (plus 6 chart App tools on the opt-in `databrain-mcp-chart-apps` entry). Your AI assistant picks the right tools automatically. You do not need to call them directly.
322
+ 50 tools organized by category (plus 6 chart App tools on the opt-in `databrain-mcp-chart-apps` entry). Your AI assistant picks the right tools automatically. You do not need to call them directly.
323
323
 
324
324
  > **Note:** Datasource and workspace creation happen outside MCP. Datamarts can be planned with `create_datamart` in `dry_run` mode and created only with `confirm: "APPLY_TO_PRODUCTION"`. The semantic layer is managed via MCP tools (`get_semantic_layer`, `update_semantic_layer`, `start_semantic_layer_generation`, `get_semantic_layer_generation_status`).
325
325
 
@@ -372,7 +372,7 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
372
372
  </details>
373
373
 
374
374
  <details>
375
- <summary><b>Query & Semantic Layer</b> (5) — Ask questions and manage data documentation</summary>
375
+ <summary><b>Query & Semantic Layer</b> (11): Ask questions and manage data documentation</summary>
376
376
 
377
377
  | Tool | Description |
378
378
  |------|-------------|
@@ -381,8 +381,29 @@ Prompts are guided workflows your AI assistant can follow. Ask for them by name
381
381
  | `update_semantic_layer` | Improve semantic layer quality (add descriptions, synonyms, example questions) |
382
382
  | `start_semantic_layer_generation` | Start semantic-layer generation for a datamart |
383
383
  | `get_semantic_layer_generation_status` | Check semantic-layer generation progress |
384
+ | `search_semantic_model` | Find relevant v2 entities and their related entities |
385
+ | `get_semantic_entity` | Read one v2 entity by kind and name with the current content hash |
386
+ | `propose_semantic_change` | Validate candidate YAML or a patch and return its plan without writing |
387
+ | `apply_semantic_change` | Preview by default, or apply live with a reviewed hash and production confirmation |
388
+ | `eval_semantic_model` | Run saved queries and optional questions and return pass rate and verdicts |
389
+ | `semantic_readiness` | Read the server readiness number, verdict and open checks |
384
390
 
385
391
  Semantic-layer generation uses the datamart ID returned by `list_datamarts` and calls the service-token API. Pass `datamartId` directly when the ID is already known.
392
+
393
+ For a v2 model, the six model tools use `datamartId` and the configured service credential. They never request a token from the user or mint a guest token. Hosted eval also requires `mcp:query`; hosted apply requires `mcp:datamarts:write` even for its dry run.
394
+
395
+ 1. Use `search_semantic_model` with `question` and optional `k` (default 10, maximum 100). If the server has no retrieval route, the tool pulls the model and ranks name, alias, synonyms and description, then includes adjacent entities. Hidden tables and columns are excluded from local search.
396
+ 2. Use `get_semantic_entity` with `kind` and an exact `name`. Column names use `table.column`. Kinds are `table`, `column`, `measure`, `metric`, `join`, `entity`, `glossary`, `saved_query`, `instruction` and `access_rule`.
397
+ 3. Use `propose_semantic_change` with exactly one of `source` (complete YAML), `yaml_patch`, or `change`. It returns the candidate source, validation errors, the server plan and `expected_content_hash`. Invalid source returns errors and no plan.
398
+ 4. Use `eval_semantic_model` with the proposed `source` and optional `questions`. Omitting source evaluates the stored model. The server returns pass rate and individual verdicts. Use `semantic_readiness` to read the server score and open checks.
399
+ 5. Review the plan. Call `apply_semantic_change` with the exact returned `source` and `expected_content_hash`. Its `dry_run` defaults to true. A live apply requires `dry_run: false` and user supplied `confirm: "APPLY_TO_PRODUCTION"`. The assistant must never supply confirmation on its own. Explicit `expected_content_hash: null` selects the first apply only when no layer is stored. Apply changes the live model for all consumers.
400
+
401
+ A YAML patch merges mappings and named lists by name, including tables and columns. Other lists replace the original list. An empty list clears a list. Null removes a field. For example, `yaml_patch: "tables:\n - name: orders\n description: Customer purchases\n"` changes that description and preserves other tables and fields. Patch output normalizes YAML formatting and does not preserve comments. Review the returned source.
402
+
403
+ A structured change uses `{ "operation": "upsert", "kind": "column", "table": "orders", "name": "amount", "value": { "description": "Order total" } }`. Upsert merges fields. Use `operation: "remove"` without `value` to remove one named entity. The backend validates all resulting references.
404
+
405
+ HTTP 409 conflicts and 422 validation or projection refusals return tool errors with the backend reason and details. A conflict requires a fresh proposal and review. Plan, eval and readiness need the corresponding backend routes; these tools return backend errors if those routes are absent.
406
+
386
407
  </details>
387
408
 
388
409
  <details>
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createChartAppServer
4
- } from "../chunk-7G5QBEPC.js";
5
- import "../chunk-Z2SF3K6P.js";
6
- import "../chunk-SKU37UVJ.js";
4
+ } from "../chunk-XFT7JMYY.js";
5
+ import "../chunk-B7HJRMR2.js";
6
+ import "../chunk-RDMVO56D.js";
7
7
  export {
8
8
  createChartAppServer
9
9
  };
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadConfig
4
- } from "../chunk-SDFC7PKT.js";
4
+ } from "../chunk-3APZIQME.js";
5
5
  import {
6
6
  createChartAppServer
7
- } from "../chunk-7G5QBEPC.js";
8
- import "../chunk-Z2SF3K6P.js";
9
- import "../chunk-SKU37UVJ.js";
7
+ } from "../chunk-XFT7JMYY.js";
8
+ import "../chunk-B7HJRMR2.js";
9
+ import "../chunk-RDMVO56D.js";
10
10
 
11
11
  // src/apps/stdio.ts
12
12
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  oauthConfigSchema,
4
4
  oauthHttpsUrl
5
- } from "./chunk-SKU37UVJ.js";
5
+ } from "./chunk-RDMVO56D.js";
6
6
 
7
7
  // src/utils/config.ts
8
8
  import { z, ZodError } from "zod";
@@ -72,4 +72,4 @@ export {
72
72
  DEFAULT_POSTHOG_HOST,
73
73
  loadConfig
74
74
  };
75
- //# sourceMappingURL=chunk-SDFC7PKT.js.map
75
+ //# sourceMappingURL=chunk-3APZIQME.js.map