@lightdash-tools/mcp 0.12.0 → 0.13.1
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 +23 -14
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +31 -57
- package/dist/cli-help.d.ts +5 -0
- package/dist/cli-help.js +23 -0
- package/dist/cli-help.test.js +24 -0
- package/dist/config/env.d.ts +2 -2
- package/dist/config/env.js +3 -3
- package/dist/config/load-mcp-config.js +10 -2
- package/dist/config/load-mcp-config.test.js +34 -6
- package/dist/config/obsolete-env.js +0 -4
- package/dist/config/obsolete-env.test.js +0 -5
- package/dist/config/runtime.js +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +22 -32
- package/dist/notifications/operation-reporter.d.ts +13 -0
- package/dist/notifications/operation-reporter.js +45 -0
- package/dist/notifications/operation-reporter.test.js +79 -0
- package/dist/profiles/ai-agent-ops/v1/index.js +25 -6
- package/dist/profiles/ai-agent-ops/v1/prompts.test.js +2 -5
- package/dist/profiles/content-developer/v1/index.js +36 -6
- package/dist/profiles/content-developer/v1/prompts.test.js +7 -8
- package/dist/profiles/content-governance/v1/index.js +7 -6
- package/dist/profiles/content-governance/v1/prompts.test.js +2 -5
- package/dist/profiles/content-reader/v1/index.js +26 -6
- package/dist/profiles/content-reader/v1/prompts.test.js +2 -5
- package/dist/profiles/data-analyst/v1/index.js +19 -6
- package/dist/profiles/data-analyst/v1/prompts.test.js +2 -4
- package/dist/profiles/index.d.ts +3 -1
- package/dist/profiles/index.js +6 -1
- package/dist/profiles/index.test.js +29 -14
- package/dist/profiles/organization-audit/v1/index.js +27 -6
- package/dist/profiles/organization-audit/v1/prompts.test.js +2 -5
- package/dist/profiles/semantic-layer/v1/index.js +17 -6
- package/dist/profiles/semantic-layer/v1/prompts.js +3 -2
- package/dist/profiles/semantic-layer/v1/prompts.test.js +2 -5
- package/dist/profiles/semantic-layer/v1/resources/playbooks/compose-compile.md +14 -8
- package/dist/profiles/semantic-layer/v1/resources/playbooks/core.md +9 -9
- package/dist/profiles/semantic-layer/v1/resources/playbooks/explore.md +4 -3
- package/dist/profiles/test-support/playbook-invariants.d.ts +5 -0
- package/dist/profiles/test-support/playbook-invariants.js +14 -0
- package/dist/profiles/types.d.ts +6 -1
- package/dist/profiles/types.js +1 -1
- package/dist/protocol-contract.test.js +2 -2
- package/dist/server/capabilities.d.ts +2 -2
- package/dist/server/capabilities.js +3 -4
- package/dist/server/capabilities.test.js +4 -5
- package/dist/stdio.process.test.js +114 -193
- package/dist/tools/ai-agents/agents.d.ts +2 -0
- package/dist/tools/ai-agents/agents.js +5 -0
- package/dist/tools/ai-agents/discovery.d.ts +4 -0
- package/dist/tools/ai-agents/discovery.js +7 -0
- package/dist/tools/ai-agents/evaluations.d.ts +9 -0
- package/dist/tools/ai-agents/evaluations.js +12 -0
- package/dist/tools/ai-agents/threads.d.ts +2 -0
- package/dist/tools/ai-agents/threads.js +5 -0
- package/dist/tools/composition/explain-content.d.ts +1 -0
- package/dist/tools/composition/explain-content.js +4 -0
- package/dist/tools/organization/invariants.test.js +7 -3
- package/dist/tools/organization/inventory.d.ts +5 -0
- package/dist/tools/organization/inventory.js +8 -0
- package/dist/tools/organization/roles.d.ts +5 -0
- package/dist/tools/organization/roles.js +8 -0
- package/dist/tools/project/content.d.ts +4 -0
- package/dist/tools/project/content.js +7 -0
- package/dist/tools/project/delete-chart.d.ts +3 -1
- package/dist/tools/project/delete-chart.js +4 -2
- package/dist/tools/project/delete-dashboard.d.ts +3 -1
- package/dist/tools/project/delete-dashboard.js +4 -2
- package/dist/tools/project/developer-content-preview.d.ts +3 -0
- package/dist/tools/project/developer-content-preview.js +6 -0
- package/dist/tools/project/developer-content.d.ts +16 -1
- package/dist/tools/project/developer-content.js +18 -5
- package/dist/tools/project/developer-get-chart-as-code.d.ts +1 -0
- package/dist/tools/project/developer-get-chart-as-code.js +4 -0
- package/dist/tools/project/get-dashboard-promote-diff.d.ts +1 -0
- package/dist/tools/project/get-dashboard-promote-diff.js +4 -0
- package/dist/tools/project/invariants.test.js +6 -18
- package/dist/tools/project/parameters.d.ts +2 -0
- package/dist/tools/project/parameters.js +5 -0
- package/dist/tools/project/projects.d.ts +8 -2
- package/dist/tools/project/projects.js +34 -38
- package/dist/tools/project/projects.test.js +6 -6
- package/dist/tools/project/promote-dashboard.d.ts +3 -1
- package/dist/tools/project/promote-dashboard.js +4 -2
- package/dist/tools/project/reader-content.d.ts +3 -0
- package/dist/tools/project/reader-content.js +6 -0
- package/dist/tools/project/reader-execution.d.ts +2 -0
- package/dist/tools/project/reader-execution.js +5 -0
- package/dist/tools/project/reader-export-chart-image.d.ts +1 -0
- package/dist/tools/project/reader-export-chart-image.js +4 -0
- package/dist/tools/project/schedulers.d.ts +2 -0
- package/dist/tools/project/schedulers.js +5 -0
- package/dist/tools/project/spaces.d.ts +2 -0
- package/dist/tools/project/spaces.js +5 -0
- package/dist/tools/query/lifecycle.d.ts +2 -0
- package/dist/tools/query/lifecycle.js +5 -0
- package/dist/tools/query/run-metric-query.d.ts +1 -0
- package/dist/tools/query/run-metric-query.js +4 -0
- package/dist/tools/registry.d.ts +5 -284
- package/dist/tools/registry.js +9 -137
- package/dist/tools/registry.test.js +36 -0
- package/dist/tools/semantic/explores.d.ts +5 -1
- package/dist/tools/semantic/explores.js +8 -1
- package/dist/tools/semantic/metrics.d.ts +3 -1
- package/dist/tools/semantic/metrics.js +6 -1
- package/dist/tools/semantic/query.d.ts +2 -1
- package/dist/tools/semantic/query.js +11 -3
- package/dist/tools/semantic/query.test.d.ts +4 -0
- package/dist/tools/semantic/query.test.js +134 -0
- package/dist/tools/shared.d.ts +4 -1
- package/dist/tools/shared.js +6 -3
- package/dist/tools/space/access.d.ts +2 -0
- package/dist/tools/space/access.js +5 -0
- package/dist/tools/types.d.ts +18 -0
- package/dist/tools/types.js +29 -0
- package/dist/tools/types.test.d.ts +1 -0
- package/dist/tools/types.test.js +50 -0
- package/package.json +5 -5
- package/dist/index.test.js +0 -9
- package/dist/profiles/profile.membership.test.js +0 -36
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/index.js +0 -8
- package/dist/tools/index.test.js +0 -78
- /package/dist/{index.test.d.ts → cli-help.test.d.ts} +0 -0
- /package/dist/{profiles/profile.membership.test.d.ts → notifications/operation-reporter.test.d.ts} +0 -0
- /package/dist/tools/{index.test.d.ts → registry.test.d.ts} +0 -0
|
@@ -7,3 +7,7 @@ export declare function registerListContent(server: McpServer, contextProvider:
|
|
|
7
7
|
export declare function registerGetDashboardMeta(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
8
|
export declare function registerListValidationResults(server: McpServer, contextProvider: McpContextProvider): void;
|
|
9
9
|
export declare function registerGetProjectUserActivity(server: McpServer, contextProvider: McpContextProvider): void;
|
|
10
|
+
export declare const listContentTool: import("../types.js").ToolModule;
|
|
11
|
+
export declare const getDashboardMetaTool: import("../types.js").ToolModule;
|
|
12
|
+
export declare const listValidationResultsTool: import("../types.js").ToolModule;
|
|
13
|
+
export declare const getProjectUserActivityTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Content, validation, and user-activity primitive tools.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getProjectUserActivityTool = exports.listValidationResultsTool = exports.getDashboardMetaTool = exports.listContentTool = void 0;
|
|
6
7
|
exports.registerListContent = registerListContent;
|
|
7
8
|
exports.registerGetDashboardMeta = registerGetDashboardMeta;
|
|
8
9
|
exports.registerListValidationResults = registerListValidationResults;
|
|
@@ -17,6 +18,7 @@ const register_org_audit_js_1 = require("../lib/register-org-audit.js");
|
|
|
17
18
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
18
19
|
const binding_js_1 = require("../organization/binding.js");
|
|
19
20
|
const shared_js_1 = require("../shared.js");
|
|
21
|
+
const types_js_1 = require("../types.js");
|
|
20
22
|
/** Allowlist dashboard metadata; omit filters and tile payloads by default. */
|
|
21
23
|
function toDashboardMeta(dashboard, includeTiles) {
|
|
22
24
|
const tiles = Array.isArray(dashboard.tiles) ? dashboard.tiles : undefined;
|
|
@@ -194,3 +196,8 @@ function registerGetProjectUserActivity(server, contextProvider) {
|
|
|
194
196
|
] }));
|
|
195
197
|
}));
|
|
196
198
|
}
|
|
199
|
+
// ToolModule exports (profile mounts)
|
|
200
|
+
exports.listContentTool = (0, types_js_1.defineTool)('list_content', registerListContent);
|
|
201
|
+
exports.getDashboardMetaTool = (0, types_js_1.defineTool)('get_dashboard_meta', registerGetDashboardMeta);
|
|
202
|
+
exports.listValidationResultsTool = (0, types_js_1.defineTool)('list_validation_results', registerListValidationResults);
|
|
203
|
+
exports.getProjectUserActivityTool = (0, types_js_1.defineTool)('get_project_user_activity', registerGetProjectUserActivity);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Soft-delete chart with form elicitation (ADR-0015).
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import { registerDeleteChart } from '../../destructive/content-soft-delete.js';
|
|
5
|
+
export { registerDeleteChart };
|
|
6
|
+
export declare const deleteChartTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Soft-delete chart with form elicitation (ADR-0015).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerDeleteChart = void 0;
|
|
7
|
-
|
|
6
|
+
exports.deleteChartTool = exports.registerDeleteChart = void 0;
|
|
7
|
+
const content_soft_delete_js_1 = require("../../destructive/content-soft-delete.js");
|
|
8
8
|
Object.defineProperty(exports, "registerDeleteChart", { enumerable: true, get: function () { return content_soft_delete_js_1.registerDeleteChart; } });
|
|
9
|
+
const types_js_1 = require("../types.js");
|
|
10
|
+
exports.deleteChartTool = (0, types_js_1.defineTool)('delete_chart', content_soft_delete_js_1.registerDeleteChart);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Soft-delete dashboard with form elicitation (ADR-0015).
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import { registerDeleteDashboard } from '../../destructive/content-soft-delete.js';
|
|
5
|
+
export { registerDeleteDashboard };
|
|
6
|
+
export declare const deleteDashboardTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Soft-delete dashboard with form elicitation (ADR-0015).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerDeleteDashboard = void 0;
|
|
7
|
-
|
|
6
|
+
exports.deleteDashboardTool = exports.registerDeleteDashboard = void 0;
|
|
7
|
+
const content_soft_delete_js_1 = require("../../destructive/content-soft-delete.js");
|
|
8
8
|
Object.defineProperty(exports, "registerDeleteDashboard", { enumerable: true, get: function () { return content_soft_delete_js_1.registerDeleteDashboard; } });
|
|
9
|
+
const types_js_1 = require("../types.js");
|
|
10
|
+
exports.deleteDashboardTool = (0, types_js_1.defineTool)('delete_dashboard', content_soft_delete_js_1.registerDeleteDashboard);
|
|
@@ -11,3 +11,6 @@ import type { McpServer } from '@modelcontextprotocol/server';
|
|
|
11
11
|
export declare function registerPreviewChartChanges(server: McpServer, contextProvider: McpContextProvider): void;
|
|
12
12
|
export declare function registerPreviewDashboardChanges(server: McpServer, contextProvider: McpContextProvider): void;
|
|
13
13
|
export declare function registerPreviewContentMove(server: McpServer, contextProvider: McpContextProvider): void;
|
|
14
|
+
export declare const previewChartChangesTool: import("../types.js").ToolModule;
|
|
15
|
+
export declare const previewDashboardChangesTool: import("../types.js").ToolModule;
|
|
16
|
+
export declare const previewContentMoveTool: import("../types.js").ToolModule;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* required `contentTypes`); space create/update is out of band (not on this profile).
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.previewContentMoveTool = exports.previewDashboardChangesTool = exports.previewChartChangesTool = void 0;
|
|
11
12
|
exports.registerPreviewChartChanges = registerPreviewChartChanges;
|
|
12
13
|
exports.registerPreviewDashboardChanges = registerPreviewDashboardChanges;
|
|
13
14
|
exports.registerPreviewContentMove = registerPreviewContentMove;
|
|
@@ -20,6 +21,7 @@ const api_shape_js_1 = require("../lib/api-shape.js");
|
|
|
20
21
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
21
22
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
22
23
|
const shared_js_1 = require("../shared.js");
|
|
24
|
+
const types_js_1 = require("../types.js");
|
|
23
25
|
const developer_content_shared_js_1 = require("./developer-content-shared.js");
|
|
24
26
|
const developer_helpers_js_1 = require("./developer-helpers.js");
|
|
25
27
|
const index_js_1 = require("./schemas/index.js");
|
|
@@ -289,3 +291,7 @@ function registerPreviewContentMove(server, contextProvider) {
|
|
|
289
291
|
});
|
|
290
292
|
}));
|
|
291
293
|
}
|
|
294
|
+
// ToolModule exports (profile mounts)
|
|
295
|
+
exports.previewChartChangesTool = (0, types_js_1.defineTool)('preview_chart_changes', registerPreviewChartChanges);
|
|
296
|
+
exports.previewDashboardChangesTool = (0, types_js_1.defineTool)('preview_dashboard_changes', registerPreviewDashboardChanges);
|
|
297
|
+
exports.previewContentMoveTool = (0, types_js_1.defineTool)('preview_content_move', registerPreviewContentMove);
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { McpContextProvider } from '../../server/request-context.js';
|
|
21
21
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
22
|
-
export { registerPreviewChartChanges, registerPreviewContentMove, registerPreviewDashboardChanges, } from './developer-content-preview.js';
|
|
23
22
|
export declare function registerValidateChart(server: McpServer, contextProvider: McpContextProvider): void;
|
|
24
23
|
export declare function registerValidateDashboard(server: McpServer, contextProvider: McpContextProvider): void;
|
|
25
24
|
export declare function registerConfirmPreview(server: McpServer, contextProvider: McpContextProvider): void;
|
|
@@ -36,3 +35,19 @@ export declare function registerMoveDashboardTile(server: McpServer, contextProv
|
|
|
36
35
|
export declare function registerRemoveDashboardTile(server: McpServer, contextProvider: McpContextProvider): void;
|
|
37
36
|
export declare function registerResizeDashboardTile(server: McpServer, contextProvider: McpContextProvider): void;
|
|
38
37
|
export declare function registerMoveContent(server: McpServer, contextProvider: McpContextProvider): void;
|
|
38
|
+
export declare const validateChartTool: import("../types.js").ToolModule;
|
|
39
|
+
export declare const validateDashboardTool: import("../types.js").ToolModule;
|
|
40
|
+
export declare const confirmPreviewTool: import("../types.js").ToolModule;
|
|
41
|
+
export declare const compareChartVersionsTool: import("../types.js").ToolModule;
|
|
42
|
+
export declare const compareDashboardVersionsTool: import("../types.js").ToolModule;
|
|
43
|
+
export declare const createChartTool: import("../types.js").ToolModule;
|
|
44
|
+
export declare const updateChartTool: import("../types.js").ToolModule;
|
|
45
|
+
export declare const duplicateChartTool: import("../types.js").ToolModule;
|
|
46
|
+
export declare const createDashboardTool: import("../types.js").ToolModule;
|
|
47
|
+
export declare const updateDashboardTool: import("../types.js").ToolModule;
|
|
48
|
+
export declare const duplicateDashboardTool: import("../types.js").ToolModule;
|
|
49
|
+
export declare const addDashboardTileTool: import("../types.js").ToolModule;
|
|
50
|
+
export declare const moveDashboardTileTool: import("../types.js").ToolModule;
|
|
51
|
+
export declare const removeDashboardTileTool: import("../types.js").ToolModule;
|
|
52
|
+
export declare const resizeDashboardTileTool: import("../types.js").ToolModule;
|
|
53
|
+
export declare const moveContentTool: import("../types.js").ToolModule;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* targetSpaceUuid + required contentTypes).
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.moveContentTool = exports.resizeDashboardTileTool = exports.removeDashboardTileTool = exports.moveDashboardTileTool = exports.addDashboardTileTool = exports.duplicateDashboardTool = exports.updateDashboardTool = exports.createDashboardTool = exports.duplicateChartTool = exports.updateChartTool = exports.createChartTool = exports.compareDashboardVersionsTool = exports.compareChartVersionsTool = exports.confirmPreviewTool = exports.validateDashboardTool = exports.validateChartTool = void 0;
|
|
23
23
|
exports.registerValidateChart = registerValidateChart;
|
|
24
24
|
exports.registerValidateDashboard = registerValidateDashboard;
|
|
25
25
|
exports.registerConfirmPreview = registerConfirmPreview;
|
|
@@ -46,13 +46,10 @@ const api_shape_js_1 = require("../lib/api-shape.js");
|
|
|
46
46
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
47
47
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
48
48
|
const shared_js_1 = require("../shared.js");
|
|
49
|
+
const types_js_1 = require("../types.js");
|
|
49
50
|
const developer_content_shared_js_1 = require("./developer-content-shared.js");
|
|
50
51
|
const developer_helpers_js_1 = require("./developer-helpers.js");
|
|
51
52
|
const index_js_1 = require("./schemas/index.js");
|
|
52
|
-
var developer_content_preview_js_1 = require("./developer-content-preview.js");
|
|
53
|
-
Object.defineProperty(exports, "registerPreviewChartChanges", { enumerable: true, get: function () { return developer_content_preview_js_1.registerPreviewChartChanges; } });
|
|
54
|
-
Object.defineProperty(exports, "registerPreviewContentMove", { enumerable: true, get: function () { return developer_content_preview_js_1.registerPreviewContentMove; } });
|
|
55
|
-
Object.defineProperty(exports, "registerPreviewDashboardChanges", { enumerable: true, get: function () { return developer_content_preview_js_1.registerPreviewDashboardChanges; } });
|
|
56
53
|
const previewTokenField = () => zod_1.z.string().describe('HMAC-signed previewToken from the matching preview_* tool');
|
|
57
54
|
// ── validate_* / confirm_preview ─────────────────────────────────────────────
|
|
58
55
|
function registerValidateChart(server, contextProvider) {
|
|
@@ -587,3 +584,19 @@ function registerMoveContent(server, contextProvider) {
|
|
|
587
584
|
});
|
|
588
585
|
}));
|
|
589
586
|
}
|
|
587
|
+
exports.validateChartTool = (0, types_js_1.defineTool)('validate_chart', registerValidateChart);
|
|
588
|
+
exports.validateDashboardTool = (0, types_js_1.defineTool)('validate_dashboard', registerValidateDashboard);
|
|
589
|
+
exports.confirmPreviewTool = (0, types_js_1.defineTool)('confirm_preview', registerConfirmPreview);
|
|
590
|
+
exports.compareChartVersionsTool = (0, types_js_1.defineTool)('compare_chart_versions', registerCompareChartVersions);
|
|
591
|
+
exports.compareDashboardVersionsTool = (0, types_js_1.defineTool)('compare_dashboard_versions', registerCompareDashboardVersions);
|
|
592
|
+
exports.createChartTool = (0, types_js_1.defineTool)('create_chart', registerCreateChart);
|
|
593
|
+
exports.updateChartTool = (0, types_js_1.defineTool)('update_chart', registerUpdateChart);
|
|
594
|
+
exports.duplicateChartTool = (0, types_js_1.defineTool)('duplicate_chart', registerDuplicateChart);
|
|
595
|
+
exports.createDashboardTool = (0, types_js_1.defineTool)('create_dashboard', registerCreateDashboard);
|
|
596
|
+
exports.updateDashboardTool = (0, types_js_1.defineTool)('update_dashboard', registerUpdateDashboard);
|
|
597
|
+
exports.duplicateDashboardTool = (0, types_js_1.defineTool)('duplicate_dashboard', registerDuplicateDashboard);
|
|
598
|
+
exports.addDashboardTileTool = (0, types_js_1.defineTool)('add_dashboard_tile', registerAddDashboardTile);
|
|
599
|
+
exports.moveDashboardTileTool = (0, types_js_1.defineTool)('move_dashboard_tile', registerMoveDashboardTile);
|
|
600
|
+
exports.removeDashboardTileTool = (0, types_js_1.defineTool)('remove_dashboard_tile', registerRemoveDashboardTile);
|
|
601
|
+
exports.resizeDashboardTileTool = (0, types_js_1.defineTool)('resize_dashboard_tile', registerResizeDashboardTile);
|
|
602
|
+
exports.moveContentTool = (0, types_js_1.defineTool)('move_content', registerMoveContent);
|
|
@@ -7,3 +7,4 @@
|
|
|
7
7
|
import type { McpContextProvider } from '../../server/request-context.js';
|
|
8
8
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
9
9
|
export declare function registerGetChartAsCode(server: McpServer, contextProvider: McpContextProvider): void;
|
|
10
|
+
export declare const getChartAsCodeTool: import("../types.js").ToolModule;
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
* before dashboard-scoped create — distinct from reader-shaped get_chart.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getChartAsCodeTool = void 0;
|
|
9
10
|
exports.registerGetChartAsCode = registerGetChartAsCode;
|
|
10
11
|
const project_scope_js_1 = require("../../governance/project-scope.js");
|
|
11
12
|
const content_developer_js_1 = require("../../policy/content-developer.js");
|
|
12
13
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
13
14
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
14
15
|
const shared_js_1 = require("../shared.js");
|
|
16
|
+
const types_js_1 = require("../types.js");
|
|
15
17
|
const developer_content_shared_js_1 = require("./developer-content-shared.js");
|
|
16
18
|
function registerGetChartAsCode(server, contextProvider) {
|
|
17
19
|
(0, content_developer_js_1.registerContentDeveloperTool)(server, 'get_chart_as_code', {
|
|
@@ -37,3 +39,5 @@ function registerGetChartAsCode(server, contextProvider) {
|
|
|
37
39
|
});
|
|
38
40
|
}));
|
|
39
41
|
}
|
|
42
|
+
// ToolModule exports (profile mounts)
|
|
43
|
+
exports.getChartAsCodeTool = (0, types_js_1.defineTool)('get_chart_as_code', registerGetChartAsCode);
|
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
import type { McpContextProvider } from '../../server/request-context.js';
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerGetDashboardPromoteDiff(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
|
+
export declare const getDashboardPromoteDiffTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Read-only dashboard promoteDiff tool (ADR-0017).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getDashboardPromoteDiffTool = void 0;
|
|
6
7
|
exports.registerGetDashboardPromoteDiff = registerGetDashboardPromoteDiff;
|
|
7
8
|
const common_1 = require("@lightdash-tools/common");
|
|
8
9
|
const content_promote_js_1 = require("../../destructive/content-promote.js");
|
|
@@ -12,6 +13,7 @@ const api_errors_js_1 = require("../lib/api-errors.js");
|
|
|
12
13
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
13
14
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
14
15
|
const shared_js_1 = require("../shared.js");
|
|
16
|
+
const types_js_1 = require("../types.js");
|
|
15
17
|
function registerGetDashboardPromoteDiff(server, contextProvider) {
|
|
16
18
|
(0, shared_js_1.registerToolSafe)(server, 'get_dashboard_promote_diff', {
|
|
17
19
|
title: 'Get dashboard promotion diff',
|
|
@@ -50,3 +52,5 @@ function registerGetDashboardPromoteDiff(server, contextProvider) {
|
|
|
50
52
|
}
|
|
51
53
|
}));
|
|
52
54
|
}
|
|
55
|
+
// ToolModule exports (profile mounts)
|
|
56
|
+
exports.getDashboardPromoteDiffTool = (0, types_js_1.defineTool)('get_dashboard_promote_diff', registerGetDashboardPromoteDiff);
|
|
@@ -6,18 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const common_1 = require("@lightdash-tools/common");
|
|
7
7
|
const vitest_1 = require("vitest");
|
|
8
8
|
const server_profile_js_1 = require("../../audit/server-profile.js");
|
|
9
|
+
const index_js_1 = require("../../profiles/index.js");
|
|
9
10
|
const registry_js_1 = require("../registry.js");
|
|
10
11
|
const shared_js_1 = require("../shared.js");
|
|
11
|
-
/** Tools that are read-only but not idempotent (warehouse / headless work). */
|
|
12
|
-
const NON_IDEMPOTENT_TOOL_IDS = new Set([
|
|
13
|
-
'run_chart',
|
|
14
|
-
'run_dashboard_tile',
|
|
15
|
-
'get_query_result',
|
|
16
|
-
'cancel_query',
|
|
17
|
-
'export_chart_image',
|
|
18
|
-
]);
|
|
19
12
|
(0, vitest_1.describe)('content-reader safety invariants', () => {
|
|
20
|
-
(0, vitest_1.it)('registers only readOnlyHint tools for
|
|
13
|
+
(0, vitest_1.it)('registers only readOnlyHint tools for profile-mounted tools', () => {
|
|
21
14
|
const annotationsByName = new Map();
|
|
22
15
|
const mockServer = {
|
|
23
16
|
registerTool: vitest_1.vi.fn((name, options) => {
|
|
@@ -25,20 +18,15 @@ const NON_IDEMPOTENT_TOOL_IDS = new Set([
|
|
|
25
18
|
}),
|
|
26
19
|
};
|
|
27
20
|
const mockCtx = { getContext: async () => ({ lightdashClient: {} }) };
|
|
28
|
-
const
|
|
21
|
+
const profile = (0, index_js_1.getProfile)('content-reader');
|
|
22
|
+
const toolIds = (0, index_js_1.listToolIds)(profile);
|
|
29
23
|
(0, server_profile_js_1.bindServerProfile)(mockServer, 'content-reader');
|
|
30
|
-
(0, registry_js_1.
|
|
31
|
-
(0, vitest_1.expect)(toolIds).toHaveLength(14);
|
|
24
|
+
(0, registry_js_1.registerTools)(mockServer, mockCtx, profile.tools);
|
|
32
25
|
(0, vitest_1.expect)(annotationsByName.size).toBe(toolIds.length);
|
|
33
26
|
for (const id of toolIds) {
|
|
34
27
|
const annotations = annotationsByName.get(`${shared_js_1.TOOL_PREFIX}${id}`);
|
|
35
28
|
(0, vitest_1.expect)(annotations === null || annotations === void 0 ? void 0 : annotations.readOnlyHint).toBe(true);
|
|
36
|
-
|
|
37
|
-
(0, vitest_1.expect)(annotations === null || annotations === void 0 ? void 0 : annotations.idempotentHint).toBe(false);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
(0, vitest_1.expect)(annotations).toMatchObject(common_1.READ_ONLY_DEFAULT);
|
|
41
|
-
}
|
|
29
|
+
(0, vitest_1.expect)(annotations).toMatchObject((annotations === null || annotations === void 0 ? void 0 : annotations.idempotentHint) === false ? common_1.READ_ONLY_TRANSIENT : common_1.READ_ONLY_DEFAULT);
|
|
42
30
|
}
|
|
43
31
|
});
|
|
44
32
|
});
|
|
@@ -5,3 +5,5 @@ import type { McpContextProvider } from '../../server/request-context.js';
|
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerListProjectParameters(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
7
|
export declare function registerGetProjectParameters(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
|
+
export declare const listProjectParametersTool: import("../types.js").ToolModule;
|
|
9
|
+
export declare const getProjectParametersTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Content-reader project parameter tools.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getProjectParametersTool = exports.listProjectParametersTool = void 0;
|
|
6
7
|
exports.registerListProjectParameters = registerListProjectParameters;
|
|
7
8
|
exports.registerGetProjectParameters = registerGetProjectParameters;
|
|
8
9
|
const zod_1 = require("zod");
|
|
@@ -14,6 +15,7 @@ const contracts_js_1 = require("../lib/contracts.js");
|
|
|
14
15
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
15
16
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
16
17
|
const shared_js_1 = require("../shared.js");
|
|
18
|
+
const types_js_1 = require("../types.js");
|
|
17
19
|
function registerListProjectParameters(server, contextProvider) {
|
|
18
20
|
(0, content_reader_js_1.registerContentReaderTool)(server, 'list_project_parameters', {
|
|
19
21
|
title: 'List project parameters',
|
|
@@ -77,3 +79,6 @@ function registerGetProjectParameters(server, contextProvider) {
|
|
|
77
79
|
}
|
|
78
80
|
}));
|
|
79
81
|
}
|
|
82
|
+
// ToolModule exports (profile mounts)
|
|
83
|
+
exports.listProjectParametersTool = (0, types_js_1.defineTool)('list_project_parameters', registerListProjectParameters);
|
|
84
|
+
exports.getProjectParametersTool = (0, types_js_1.defineTool)('get_project_parameters', registerGetProjectParameters);
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MCP tools: projects (list, get)
|
|
2
|
+
* MCP tools: projects (list, get).
|
|
3
3
|
*/
|
|
4
4
|
import type { McpContextProvider } from '../../server/request-context.js';
|
|
5
|
+
import type { ToolModule } from '../types.js';
|
|
5
6
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
7
|
export declare function registerListProjects(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
|
-
export declare
|
|
8
|
+
export declare const listProjectsTool: ToolModule;
|
|
9
|
+
/** Pin-aware get_project (semantic-layer and other non-scoped mounts). */
|
|
10
|
+
export declare const getProjectTool: ToolModule;
|
|
11
|
+
export declare const getProjectReaderTool: ToolModule;
|
|
12
|
+
export declare const getProjectDeveloperTool: ToolModule;
|
|
13
|
+
export declare const getProjectAnalystTool: ToolModule;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* MCP tools: projects (list, get)
|
|
3
|
+
* MCP tools: projects (list, get).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getProjectAnalystTool = exports.getProjectDeveloperTool = exports.getProjectReaderTool = exports.getProjectTool = exports.listProjectsTool = void 0;
|
|
6
7
|
exports.registerListProjects = registerListProjects;
|
|
7
|
-
exports.registerGetProject = registerGetProject;
|
|
8
|
-
const server_profile_js_1 = require("../../audit/server-profile.js");
|
|
9
8
|
const available_projects_js_1 = require("../../governance/available-projects.js");
|
|
10
9
|
const project_pin_js_1 = require("../../governance/project-pin.js");
|
|
11
10
|
const project_scope_js_1 = require("../../governance/project-scope.js");
|
|
@@ -13,6 +12,7 @@ const redaction_js_1 = require("../lib/redaction.js");
|
|
|
13
12
|
const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
14
13
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
15
14
|
const shared_js_1 = require("../shared.js");
|
|
15
|
+
const types_js_1 = require("../types.js");
|
|
16
16
|
const READER_CAPABILITIES = {
|
|
17
17
|
canDiscoverContent: true,
|
|
18
18
|
canExecuteSavedCharts: true,
|
|
@@ -34,19 +34,11 @@ const ANALYST_CAPABILITIES = {
|
|
|
34
34
|
canExecuteSqlCharts: false,
|
|
35
35
|
canMutateContent: false,
|
|
36
36
|
};
|
|
37
|
-
const
|
|
38
|
-
'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'content-developer': {
|
|
43
|
-
capabilitiesKey: 'developerCapabilities',
|
|
44
|
-
capabilities: DEVELOPER_CAPABILITIES,
|
|
45
|
-
},
|
|
46
|
-
'data-analyst': {
|
|
47
|
-
capabilitiesKey: 'analystCapabilities',
|
|
48
|
-
capabilities: ANALYST_CAPABILITIES,
|
|
49
|
-
},
|
|
37
|
+
const GET_PROJECT_TOOL_OPTIONS = {
|
|
38
|
+
title: 'Get project',
|
|
39
|
+
description: 'Get project metadata by UUID (no warehouse/dbt credentials or contact overrides). projectUuid is optional when X-Lightdash-Project is set.',
|
|
40
|
+
inputSchema: { projectUuid: (0, schema_fields_js_1.projectUuidField)().optional() },
|
|
41
|
+
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
50
42
|
};
|
|
51
43
|
function registerListProjects(server, contextProvider) {
|
|
52
44
|
(0, shared_js_1.registerToolSafe)(server, 'list_projects', {
|
|
@@ -66,25 +58,10 @@ function registerListProjects(server, contextProvider) {
|
|
|
66
58
|
});
|
|
67
59
|
}));
|
|
68
60
|
}
|
|
69
|
-
function registerGetProject(server, contextProvider) {
|
|
70
|
-
const profileId = (0, server_profile_js_1.requireServerProfile)(server, 'get_project');
|
|
71
|
-
// eslint-disable-next-line security/detect-object-injection -- profileId from requireServerProfile
|
|
72
|
-
const scoped = SCOPED_GET_PROJECT_BY_PROFILE[profileId];
|
|
73
|
-
if (scoped) {
|
|
74
|
-
registerScopedGetProject(server, contextProvider, scoped);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
registerPinAwareGetProject(server, contextProvider);
|
|
78
|
-
}
|
|
79
61
|
/** Project-scope-aware get_project (pin → tool arg → PROJECT_SCOPE_REQUIRED). */
|
|
80
62
|
function registerScopedGetProject(server, contextProvider, config) {
|
|
81
63
|
const { capabilitiesKey, capabilities } = config;
|
|
82
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_project', {
|
|
83
|
-
title: 'Get project',
|
|
84
|
-
description: 'Get project metadata by UUID (no warehouse/dbt credentials or contact overrides). projectUuid is optional when X-Lightdash-Project is set.',
|
|
85
|
-
inputSchema: { projectUuid: (0, schema_fields_js_1.projectUuidField)().optional() },
|
|
86
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
87
|
-
}, (0, shared_js_1.wrapTool)(contextProvider, (c) => async ({ projectUuid }) => {
|
|
64
|
+
(0, shared_js_1.registerToolSafe)(server, 'get_project', GET_PROJECT_TOOL_OPTIONS, (0, shared_js_1.wrapTool)(contextProvider, (c) => async ({ projectUuid }) => {
|
|
88
65
|
try {
|
|
89
66
|
const scope = (0, project_scope_js_1.resolveProjectScope)({ projectUuid });
|
|
90
67
|
const project = await c.v1.projects.getProject(scope.projectUuid);
|
|
@@ -104,12 +81,7 @@ function registerScopedGetProject(server, contextProvider, config) {
|
|
|
104
81
|
}));
|
|
105
82
|
}
|
|
106
83
|
function registerPinAwareGetProject(server, contextProvider) {
|
|
107
|
-
(0, shared_js_1.registerToolSafe)(server, 'get_project', {
|
|
108
|
-
title: 'Get project',
|
|
109
|
-
description: 'Get project metadata by UUID (no warehouse/dbt credentials or contact overrides). projectUuid is optional when X-Lightdash-Project is set.',
|
|
110
|
-
inputSchema: { projectUuid: (0, schema_fields_js_1.projectUuidField)().optional() },
|
|
111
|
-
annotations: shared_js_1.READ_ONLY_DEFAULT,
|
|
112
|
-
}, (0, shared_js_1.wrapTool)(contextProvider, (c) => async ({ projectUuid }) => {
|
|
84
|
+
(0, shared_js_1.registerToolSafe)(server, 'get_project', GET_PROJECT_TOOL_OPTIONS, (0, shared_js_1.wrapTool)(contextProvider, (c) => async ({ projectUuid }) => {
|
|
113
85
|
const pinned = (0, project_pin_js_1.getPinnedProjectUuid)();
|
|
114
86
|
const resolved = projectUuid !== null && projectUuid !== void 0 ? projectUuid : pinned;
|
|
115
87
|
if (!resolved) {
|
|
@@ -122,3 +94,27 @@ function registerPinAwareGetProject(server, contextProvider) {
|
|
|
122
94
|
});
|
|
123
95
|
}));
|
|
124
96
|
}
|
|
97
|
+
function getProjectModule(register) {
|
|
98
|
+
return (0, types_js_1.defineToolVariant)('get_project', register);
|
|
99
|
+
}
|
|
100
|
+
function scopedGetProjectVariant(config) {
|
|
101
|
+
return getProjectModule((server, contextProvider) => {
|
|
102
|
+
registerScopedGetProject(server, contextProvider, config);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// ToolModule exports (profile mounts)
|
|
106
|
+
exports.listProjectsTool = (0, types_js_1.defineTool)('list_projects', registerListProjects);
|
|
107
|
+
/** Pin-aware get_project (semantic-layer and other non-scoped mounts). */
|
|
108
|
+
exports.getProjectTool = getProjectModule(registerPinAwareGetProject);
|
|
109
|
+
exports.getProjectReaderTool = scopedGetProjectVariant({
|
|
110
|
+
capabilitiesKey: 'readerCapabilities',
|
|
111
|
+
capabilities: READER_CAPABILITIES,
|
|
112
|
+
});
|
|
113
|
+
exports.getProjectDeveloperTool = scopedGetProjectVariant({
|
|
114
|
+
capabilitiesKey: 'developerCapabilities',
|
|
115
|
+
capabilities: DEVELOPER_CAPABILITIES,
|
|
116
|
+
});
|
|
117
|
+
exports.getProjectAnalystTool = scopedGetProjectVariant({
|
|
118
|
+
capabilitiesKey: 'analystCapabilities',
|
|
119
|
+
capabilities: ANALYST_CAPABILITIES,
|
|
120
|
+
});
|
|
@@ -114,7 +114,7 @@ function mockContext(listProjects, getProject) {
|
|
|
114
114
|
]);
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
|
-
(0, vitest_1.describe)('
|
|
117
|
+
(0, vitest_1.describe)('get_project ToolModules', () => {
|
|
118
118
|
(0, vitest_1.afterEach)(() => {
|
|
119
119
|
vitest_1.vi.restoreAllMocks();
|
|
120
120
|
delete process.env.LIGHTDASH_TOOLS_PROJECT_UUID;
|
|
@@ -132,7 +132,7 @@ function mockContext(listProjects, getProject) {
|
|
|
132
132
|
const listProjects = vitest_1.vi.fn();
|
|
133
133
|
const mockServer = { registerTool: vitest_1.vi.fn() };
|
|
134
134
|
(0, server_profile_js_1.bindServerProfile)(mockServer, 'semantic-layer');
|
|
135
|
-
|
|
135
|
+
projects_js_1.getProjectTool.register(mockServer, mockContext(listProjects, getProject));
|
|
136
136
|
const [, , handler] = mockServer.registerTool.mock.calls[0];
|
|
137
137
|
const result = await handler({ projectUuid: PINNED });
|
|
138
138
|
const body = JSON.parse(result.content[0].text);
|
|
@@ -151,7 +151,7 @@ function mockContext(listProjects, getProject) {
|
|
|
151
151
|
const getProject = vitest_1.vi.fn();
|
|
152
152
|
const mockServer = { registerTool: vitest_1.vi.fn() };
|
|
153
153
|
(0, server_profile_js_1.bindServerProfile)(mockServer, 'semantic-layer');
|
|
154
|
-
|
|
154
|
+
projects_js_1.getProjectTool.register(mockServer, mockContext(vitest_1.vi.fn(), getProject));
|
|
155
155
|
const [, options, handler] = mockServer.registerTool.mock.calls[0];
|
|
156
156
|
(0, vitest_1.expect)(options.description).not.toContain('LIGHTDASH_TOOLS_PROJECT_UUID');
|
|
157
157
|
const result = await handler({});
|
|
@@ -166,7 +166,7 @@ function mockContext(listProjects, getProject) {
|
|
|
166
166
|
});
|
|
167
167
|
const mockServer = { registerTool: vitest_1.vi.fn() };
|
|
168
168
|
(0, server_profile_js_1.bindServerProfile)(mockServer, 'content-reader');
|
|
169
|
-
|
|
169
|
+
projects_js_1.getProjectReaderTool.register(mockServer, mockContext(vitest_1.vi.fn(), getProject));
|
|
170
170
|
const [, options, handler] = mockServer.registerTool.mock.calls[0];
|
|
171
171
|
(0, vitest_1.expect)(options.description).not.toContain('LIGHTDASH_TOOLS_PROJECT_UUID');
|
|
172
172
|
const result = await handler({ projectUuid: PINNED });
|
|
@@ -185,7 +185,7 @@ function mockContext(listProjects, getProject) {
|
|
|
185
185
|
const getProject = vitest_1.vi.fn();
|
|
186
186
|
const mockServer = { registerTool: vitest_1.vi.fn() };
|
|
187
187
|
(0, server_profile_js_1.bindServerProfile)(mockServer, 'content-reader');
|
|
188
|
-
|
|
188
|
+
projects_js_1.getProjectReaderTool.register(mockServer, mockContext(vitest_1.vi.fn(), getProject));
|
|
189
189
|
const [, , handler] = mockServer.registerTool.mock.calls[0];
|
|
190
190
|
const result = await handler({});
|
|
191
191
|
(0, vitest_1.expect)(result.isError).toBe(true);
|
|
@@ -199,7 +199,7 @@ function mockContext(listProjects, getProject) {
|
|
|
199
199
|
});
|
|
200
200
|
const mockServer = { registerTool: vitest_1.vi.fn() };
|
|
201
201
|
(0, server_profile_js_1.bindServerProfile)(mockServer, 'data-analyst');
|
|
202
|
-
|
|
202
|
+
projects_js_1.getProjectAnalystTool.register(mockServer, mockContext(vitest_1.vi.fn(), getProject));
|
|
203
203
|
const [, , handler] = mockServer.registerTool.mock.calls[0];
|
|
204
204
|
const result = await handler({ projectUuid: PINNED });
|
|
205
205
|
const body = JSON.parse(result.content[0].text);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Elicitation-gated dashboard promote (ADR-0017).
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import { registerPromoteDashboard } from '../../destructive/content-promote.js';
|
|
5
|
+
export { registerPromoteDashboard };
|
|
6
|
+
export declare const promoteDashboardTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Elicitation-gated dashboard promote (ADR-0017).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerPromoteDashboard = void 0;
|
|
7
|
-
|
|
6
|
+
exports.promoteDashboardTool = exports.registerPromoteDashboard = void 0;
|
|
7
|
+
const content_promote_js_1 = require("../../destructive/content-promote.js");
|
|
8
8
|
Object.defineProperty(exports, "registerPromoteDashboard", { enumerable: true, get: function () { return content_promote_js_1.registerPromoteDashboard; } });
|
|
9
|
+
const types_js_1 = require("../types.js");
|
|
10
|
+
exports.promoteDashboardTool = (0, types_js_1.defineTool)('promote_dashboard', content_promote_js_1.registerPromoteDashboard);
|
|
@@ -7,3 +7,6 @@ export declare function detectChartType(chart: Record<string, unknown>): 'semant
|
|
|
7
7
|
export declare function registerSearchContent(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
8
|
export declare function registerGetDashboard(server: McpServer, contextProvider: McpContextProvider): void;
|
|
9
9
|
export declare function registerGetChart(server: McpServer, contextProvider: McpContextProvider): void;
|
|
10
|
+
export declare const searchContentTool: import("../types.js").ToolModule;
|
|
11
|
+
export declare const getDashboardTool: import("../types.js").ToolModule;
|
|
12
|
+
export declare const getChartTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Content-reader discovery/metadata tools: search, dashboard, chart.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getChartTool = exports.getDashboardTool = exports.searchContentTool = void 0;
|
|
6
7
|
exports.detectChartType = detectChartType;
|
|
7
8
|
exports.registerSearchContent = registerSearchContent;
|
|
8
9
|
exports.registerGetDashboard = registerGetDashboard;
|
|
@@ -18,6 +19,7 @@ const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
|
18
19
|
const chart_source_js_1 = require("../query/chart-source.js");
|
|
19
20
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
20
21
|
const shared_js_1 = require("../shared.js");
|
|
22
|
+
const types_js_1 = require("../types.js");
|
|
21
23
|
function detectChartType(chart) {
|
|
22
24
|
if (chart.metricQuery && typeof chart.metricQuery === 'object') {
|
|
23
25
|
return 'semantic';
|
|
@@ -209,3 +211,7 @@ function registerGetChart(server, contextProvider) {
|
|
|
209
211
|
}
|
|
210
212
|
}));
|
|
211
213
|
}
|
|
214
|
+
// ToolModule exports (profile mounts)
|
|
215
|
+
exports.searchContentTool = (0, types_js_1.defineTool)('search_content', registerSearchContent);
|
|
216
|
+
exports.getDashboardTool = (0, types_js_1.defineTool)('get_dashboard', registerGetDashboard);
|
|
217
|
+
exports.getChartTool = (0, types_js_1.defineTool)('get_chart', registerGetChart);
|
|
@@ -5,3 +5,5 @@ import type { McpContextProvider } from '../../server/request-context.js';
|
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerRunChart(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
7
|
export declare function registerRunDashboardTile(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
|
+
export declare const runChartTool: import("../types.js").ToolModule;
|
|
9
|
+
export declare const runDashboardTileTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Saved-content execution tools for content-reader (semantic only; SQL disabled).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runDashboardTileTool = exports.runChartTool = void 0;
|
|
6
7
|
exports.registerRunChart = registerRunChart;
|
|
7
8
|
exports.registerRunDashboardTile = registerRunDashboardTile;
|
|
8
9
|
const zod_1 = require("zod");
|
|
@@ -17,6 +18,7 @@ const chart_source_js_1 = require("../query/chart-source.js");
|
|
|
17
18
|
const filter_overrides_js_1 = require("../query/filter-overrides.js");
|
|
18
19
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
19
20
|
const shared_js_1 = require("../shared.js");
|
|
21
|
+
const types_js_1 = require("../types.js");
|
|
20
22
|
const reader_content_js_1 = require("./reader-content.js");
|
|
21
23
|
const dateZoomSchema = zod_1.z
|
|
22
24
|
.object({
|
|
@@ -214,3 +216,6 @@ function registerRunDashboardTile(server, contextProvider) {
|
|
|
214
216
|
}
|
|
215
217
|
}));
|
|
216
218
|
}
|
|
219
|
+
// ToolModule exports (profile mounts)
|
|
220
|
+
exports.runChartTool = (0, types_js_1.defineTool)('run_chart', registerRunChart);
|
|
221
|
+
exports.runDashboardTileTool = (0, types_js_1.defineTool)('run_dashboard_tile', registerRunDashboardTile);
|
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
import type { McpContextProvider } from '../../server/request-context.js';
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerExportChartImage(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
|
+
export declare const exportChartImageTool: import("../types.js").ToolModule;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Export a saved chart as a PNG snapshot for content-reader (ADR-0012).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.exportChartImageTool = void 0;
|
|
6
7
|
exports.registerExportChartImage = registerExportChartImage;
|
|
7
8
|
const client_1 = require("@lightdash-tools/client");
|
|
8
9
|
const tool_audit_context_js_1 = require("../../audit/tool-audit-context.js");
|
|
@@ -15,6 +16,7 @@ const schema_fields_js_1 = require("../lib/schema-fields.js");
|
|
|
15
16
|
const chart_source_js_1 = require("../query/chart-source.js");
|
|
16
17
|
const reader_tool_helpers_js_1 = require("../query/reader-tool-helpers.js");
|
|
17
18
|
const shared_js_1 = require("../shared.js");
|
|
19
|
+
const types_js_1 = require("../types.js");
|
|
18
20
|
const reader_content_js_1 = require("./reader-content.js");
|
|
19
21
|
function registerExportChartImage(server, contextProvider) {
|
|
20
22
|
(0, content_reader_js_1.registerContentReaderTool)(server, 'export_chart_image', {
|
|
@@ -76,3 +78,5 @@ function registerExportChartImage(server, contextProvider) {
|
|
|
76
78
|
}
|
|
77
79
|
}));
|
|
78
80
|
}
|
|
81
|
+
// ToolModule exports (profile mounts)
|
|
82
|
+
exports.exportChartImageTool = (0, types_js_1.defineTool)('export_chart_image', registerExportChartImage);
|
|
@@ -5,3 +5,5 @@ import type { McpContextProvider } from '../../server/request-context.js';
|
|
|
5
5
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
6
6
|
export declare function registerListProjectSchedulers(server: McpServer, contextProvider: McpContextProvider): void;
|
|
7
7
|
export declare function registerGetScheduler(server: McpServer, contextProvider: McpContextProvider): void;
|
|
8
|
+
export declare const listProjectSchedulersTool: import("../types.js").ToolModule;
|
|
9
|
+
export declare const getSchedulerTool: import("../types.js").ToolModule;
|