@thinkingai/ae-cli 1.0.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 +229 -0
- package/bin/ae-cli.js +2 -0
- package/dist/auth-JXELJNDS.js +19 -0
- package/dist/auth-L3G3A74I.js +67 -0
- package/dist/chunk-3GM5LJZR.js +145 -0
- package/dist/chunk-JD5DXMKL.js +172 -0
- package/dist/chunk-KM57HI5B.js +107 -0
- package/dist/chunk-OVQOK35G.js +108 -0
- package/dist/chunk-RJNLN3KQ.js +217 -0
- package/dist/client-5QSQBBDB.js +16 -0
- package/dist/community-GMALVSRF.js +684 -0
- package/dist/config-Q7J3Z7Z2.js +242 -0
- package/dist/index.js +277 -0
- package/dist/raw-ZNVURYMR.js +59 -0
- package/dist/te-analysis-7NN3SY3I.js +871 -0
- package/dist/te-audience-P43BWMHM.js +350 -0
- package/dist/te-common-H3IPTI2I.js +144 -0
- package/dist/te-dataops-WCGDBJLF.js +1853 -0
- package/dist/te-engage-UTRVNTGU.js +1470 -0
- package/dist/te-meta-HGYNXVGF.js +479 -0
- package/package.json +53 -0
- package/skills/te-analysis/SKILL.md +107 -0
- package/skills/te-analysis/references/build-entity-details-sql.md +58 -0
- package/skills/te-analysis/references/build-event-details-sql.md +61 -0
- package/skills/te-analysis/references/create-alert.md +47 -0
- package/skills/te-analysis/references/create-dashboard.md +49 -0
- package/skills/te-analysis/references/create-or-update-dashboard-note.md +39 -0
- package/skills/te-analysis/references/create-public-access-link.md +43 -0
- package/skills/te-analysis/references/create-report.md +60 -0
- package/skills/te-analysis/references/create-result-cluster.md +73 -0
- package/skills/te-analysis/references/drilldown-user-events.md +72 -0
- package/skills/te-analysis/references/drilldown-users.md +75 -0
- package/skills/te-analysis/references/get-alert-definition-schema.md +32 -0
- package/skills/te-analysis/references/get-alert.md +31 -0
- package/skills/te-analysis/references/get-analysis-query-schema.md +36 -0
- package/skills/te-analysis/references/get-filter-schema.md +33 -0
- package/skills/te-analysis/references/get-groupby-schema.md +33 -0
- package/skills/te-analysis/references/get-report-definition.md +33 -0
- package/skills/te-analysis/references/get-table-columns.md +38 -0
- package/skills/te-analysis/references/list-alerts.md +33 -0
- package/skills/te-analysis/references/list-dashboards.md +33 -0
- package/skills/te-analysis/references/list-public-access-links.md +31 -0
- package/skills/te-analysis/references/list-reports.md +33 -0
- package/skills/te-analysis/references/load-filters.md +44 -0
- package/skills/te-analysis/references/query-adhoc.md +71 -0
- package/skills/te-analysis/references/query-dashboard-detail.md +35 -0
- package/skills/te-analysis/references/query-dashboard-report-data.md +60 -0
- package/skills/te-analysis/references/query-entity-details.md +60 -0
- package/skills/te-analysis/references/query-event-details.md +63 -0
- package/skills/te-analysis/references/query-report-data.md +65 -0
- package/skills/te-analysis/references/update-alert.md +49 -0
- package/skills/te-analysis/references/update-dashboard.md +45 -0
- package/skills/te-analysis/references/update-public-access-link.md +41 -0
- package/skills/te-audience/SKILL.md +63 -0
- package/skills/te-audience/references/create-cluster.md +65 -0
- package/skills/te-audience/references/create-tag.md +60 -0
- package/skills/te-audience/references/get-cluster-definition-schema.md +37 -0
- package/skills/te-audience/references/get-clusters-by-name.md +32 -0
- package/skills/te-audience/references/get-tag-definition-schema.md +32 -0
- package/skills/te-audience/references/get-tags-by-name.md +32 -0
- package/skills/te-audience/references/list-cluster-members.md +35 -0
- package/skills/te-audience/references/list-clusters.md +32 -0
- package/skills/te-audience/references/list-tag-members.md +36 -0
- package/skills/te-audience/references/list-tags.md +32 -0
- package/skills/te-audience/references/refresh-cluster.md +31 -0
- package/skills/te-audience/references/refresh-tag.md +31 -0
- package/skills/te-audience/references/update-cluster.md +59 -0
- package/skills/te-audience/references/update-tag.md +60 -0
- package/skills/te-common/SKILL.md +135 -0
- package/skills/te-common/references/get-resource-url.md +32 -0
- package/skills/te-common/references/list-projects.md +37 -0
- package/skills/te-community/SKILL.md +133 -0
- package/skills/te-community/references/community-activity-analysis.md +68 -0
- package/skills/te-community/references/community-analyzing-official-content.md +72 -0
- package/skills/te-community/references/community-analyzing-theme-comment.md +124 -0
- package/skills/te-community/references/community-character-analysis.md +71 -0
- package/skills/te-community/references/community-daily-report.md +82 -0
- package/skills/te-community/references/community-hottopic-insight.md +120 -0
- package/skills/te-community/references/community-release-analysis.md +79 -0
- package/skills/te-community/references/community-weekly-report.md +84 -0
- package/skills/te-community/references/get_channel_info.md +21 -0
- package/skills/te-community/references/get_comment_tag_analysis.md +30 -0
- package/skills/te-community/references/get_comments_summary.md +33 -0
- package/skills/te-community/references/get_corpus_tags.md +21 -0
- package/skills/te-community/references/get_daily_summary.md +23 -0
- package/skills/te-community/references/get_hot_topics.md +26 -0
- package/skills/te-community/references/get_livestream_analysis.md +23 -0
- package/skills/te-community/references/get_livestream_detail.md +34 -0
- package/skills/te-community/references/get_livestream_list.md +26 -0
- package/skills/te-community/references/get_livestream_overview.md +25 -0
- package/skills/te-community/references/get_livestream_room_metrics.md +26 -0
- package/skills/te-community/references/get_livestream_rooms.md +26 -0
- package/skills/te-community/references/get_overview_metrics.md +26 -0
- package/skills/te-community/references/get_post_detail.md +38 -0
- package/skills/te-community/references/get_risk_content.md +43 -0
- package/skills/te-community/references/get_sentiment_overview.md +34 -0
- package/skills/te-community/references/get_tag_trends.md +28 -0
- package/skills/te-community/references/get_topic_detail.md +27 -0
- package/skills/te-community/references/search_posts.md +48 -0
- package/skills/te-dataops/SKILL.md +645 -0
- package/skills/te-dataops/references/dataops-flow-create.md +163 -0
- package/skills/te-dataops/references/dataops-flow-monitor.md +118 -0
- package/skills/te-dataops/references/dataops-integration.md +246 -0
- package/skills/te-dataops/references/dataops-operations.md +107 -0
- package/skills/te-dataops/references/dataops-query.md +111 -0
- package/skills/te-dataops/references/dataops-table.md +122 -0
- package/skills/te-engage/SKILL.md +211 -0
- package/skills/te-engage/references/add-approver.md +24 -0
- package/skills/te-engage/references/add-channel.md +74 -0
- package/skills/te-engage/references/approver-list.md +19 -0
- package/skills/te-engage/references/cancel-query-by-request-id.md +23 -0
- package/skills/te-engage/references/channel-detail.md +52 -0
- package/skills/te-engage/references/channel-list.md +41 -0
- package/skills/te-engage/references/config-channel-detail.md +32 -0
- package/skills/te-engage/references/config-channel-list.md +27 -0
- package/skills/te-engage/references/config-item-analysis-report.md +34 -0
- package/skills/te-engage/references/config-item-detail.md +30 -0
- package/skills/te-engage/references/config-item-list.md +19 -0
- package/skills/te-engage/references/config-item-strategy-comparison.md +25 -0
- package/skills/te-engage/references/config-item-trigger-report.md +42 -0
- package/skills/te-engage/references/copy-config-template.md +29 -0
- package/skills/te-engage/references/delete-channel.md +24 -0
- package/skills/te-engage/references/delete-config-channel.md +24 -0
- package/skills/te-engage/references/delete-config-item.md +25 -0
- package/skills/te-engage/references/delete-flow.md +24 -0
- package/skills/te-engage/references/flow-ab-split-node-report.md +54 -0
- package/skills/te-engage/references/flow-detail.md +79 -0
- package/skills/te-engage/references/flow-list.md +19 -0
- package/skills/te-engage/references/flow-node-config-schema.md +44 -0
- package/skills/te-engage/references/flow-node-detail-report.md +55 -0
- package/skills/te-engage/references/flow-node-overview-report.md +52 -0
- package/skills/te-engage/references/flow-process-report.md +59 -0
- package/skills/te-engage/references/manage-flow.md +94 -0
- package/skills/te-engage/references/manage-strategy.md +74 -0
- package/skills/te-engage/references/manage-task.md +37 -0
- package/skills/te-engage/references/modify-flow-base-info.md +27 -0
- package/skills/te-engage/references/save-flow.md +870 -0
- package/skills/te-engage/references/strategy-detail.md +73 -0
- package/skills/te-engage/references/strategy-list.md +21 -0
- package/skills/te-engage/references/task-data-detail.md +81 -0
- package/skills/te-engage/references/task-data-overview.md +48 -0
- package/skills/te-engage/references/task-detail.md +61 -0
- package/skills/te-engage/references/task-experiment-report.md +51 -0
- package/skills/te-engage/references/task-list.md +91 -0
- package/skills/te-engage/references/task-metric-detail.md +56 -0
- package/skills/te-engage/references/task-stats.md +89 -0
- package/skills/te-engage/references/update-channel-status.md +32 -0
- package/skills/te-engage/references/update-config-channel-status.md +32 -0
- package/skills/te-engage/references/validate-flow-node-config.md +52 -0
- package/skills/te-engage/references/whitelist-list.md +19 -0
- package/skills/te-meta/SKILL.md +71 -0
- package/skills/te-meta/references/batch-create-metadata.md +37 -0
- package/skills/te-meta/references/batch-edit-metadata.md +36 -0
- package/skills/te-meta/references/create-metric.md +62 -0
- package/skills/te-meta/references/create-project-mark-time.md +38 -0
- package/skills/te-meta/references/create-virtual-event.md +64 -0
- package/skills/te-meta/references/create-virtual-property.md +69 -0
- package/skills/te-meta/references/delete-project-mark-times.md +34 -0
- package/skills/te-meta/references/delete-track-items.md +35 -0
- package/skills/te-meta/references/get-metric.md +32 -0
- package/skills/te-meta/references/get-project-config.md +32 -0
- package/skills/te-meta/references/get-track-program.md +31 -0
- package/skills/te-meta/references/list-entities.md +34 -0
- package/skills/te-meta/references/list-events.md +33 -0
- package/skills/te-meta/references/list-metrics.md +33 -0
- package/skills/te-meta/references/list-project-mark-times.md +33 -0
- package/skills/te-meta/references/list-project-users.md +32 -0
- package/skills/te-meta/references/list-properties.md +35 -0
- package/skills/te-meta/references/save-track-items.md +34 -0
- package/skills/te-meta/references/update-metric.md +61 -0
- package/skills/te-meta/references/update-project-mark-time.md +39 -0
- package/skills/te-shared/SKILL.md +115 -0
|
@@ -0,0 +1,871 @@
|
|
|
1
|
+
import {
|
|
2
|
+
callMcpTool,
|
|
3
|
+
parseMcpResult,
|
|
4
|
+
resolveMcpUrl
|
|
5
|
+
} from "./chunk-JD5DXMKL.js";
|
|
6
|
+
import "./chunk-RJNLN3KQ.js";
|
|
7
|
+
import "./chunk-OVQOK35G.js";
|
|
8
|
+
|
|
9
|
+
// src/commands/te-analysis/shared.ts
|
|
10
|
+
function createMcpCommand(config) {
|
|
11
|
+
const toolName = config.command.slice(1);
|
|
12
|
+
const mcpService = config.mcpService || "te_analysis";
|
|
13
|
+
return {
|
|
14
|
+
service: "te_analysis",
|
|
15
|
+
command: config.command,
|
|
16
|
+
description: config.description,
|
|
17
|
+
flags: config.flags,
|
|
18
|
+
risk: config.risk,
|
|
19
|
+
dryRun: (ctx) => ({
|
|
20
|
+
method: "tools/call",
|
|
21
|
+
url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
|
|
22
|
+
body: {
|
|
23
|
+
name: toolName,
|
|
24
|
+
arguments: config.buildArgs(ctx)
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
execute: async (ctx) => {
|
|
28
|
+
const url = resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService);
|
|
29
|
+
const result = await callMcpTool(url, toolName, config.buildArgs(ctx), ctx.host());
|
|
30
|
+
return parseMcpResult(result);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function optionalString(ctx, name) {
|
|
35
|
+
const value = ctx.str(name);
|
|
36
|
+
return value === "" ? void 0 : value;
|
|
37
|
+
}
|
|
38
|
+
function optionalNumber(ctx, name) {
|
|
39
|
+
const value = ctx.str(name);
|
|
40
|
+
return value === "" ? void 0 : Number(value);
|
|
41
|
+
}
|
|
42
|
+
function optionalBoolean(ctx, name) {
|
|
43
|
+
const value = ctx.str(name);
|
|
44
|
+
return value === "" ? void 0 : ctx.bool(name);
|
|
45
|
+
}
|
|
46
|
+
function optionalJson(ctx, name) {
|
|
47
|
+
const value = ctx.str(name);
|
|
48
|
+
return value === "" ? void 0 : ctx.json(name);
|
|
49
|
+
}
|
|
50
|
+
function optionalJsonString(ctx, name) {
|
|
51
|
+
const value = optionalJson(ctx, name);
|
|
52
|
+
return value === void 0 ? void 0 : JSON.stringify(value);
|
|
53
|
+
}
|
|
54
|
+
function requiredJsonString(ctx, name) {
|
|
55
|
+
return JSON.stringify(ctx.json(name));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/commands/te-analysis/meta/get-alert-definition-schema.ts
|
|
59
|
+
var getAlertDefinitionSchema = createMcpCommand({
|
|
60
|
+
command: "+get_alert_definition_schema",
|
|
61
|
+
description: "Get the alert definition schema. Returns field definitions, enum descriptions, and examples for creating or updating alerts.",
|
|
62
|
+
flags: [],
|
|
63
|
+
risk: "read",
|
|
64
|
+
mcpService: "te_analysis_extend",
|
|
65
|
+
buildArgs: () => ({})
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// src/commands/te-analysis/meta/list-alerts.ts
|
|
69
|
+
var listAlerts = createMcpCommand({
|
|
70
|
+
command: "+list_alerts",
|
|
71
|
+
description: "List all alerts in the project. Supports keyword filtering by alert name and returns a paginated alert list with total count.",
|
|
72
|
+
flags: [
|
|
73
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
74
|
+
{ name: "query", type: "string", required: false, alias: "q", desc: "Optional keyword filter. Performs fuzzy matching against alert names; if omitted, all alerts are returned." }
|
|
75
|
+
],
|
|
76
|
+
risk: "read",
|
|
77
|
+
mcpService: "te_analysis_extend",
|
|
78
|
+
buildArgs: (ctx) => ({
|
|
79
|
+
projectId: ctx.num("project_id"),
|
|
80
|
+
query: optionalString(ctx, "query")
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// src/commands/te-analysis/meta/get-alert.ts
|
|
85
|
+
var getAlert = createMcpCommand({
|
|
86
|
+
command: "+get_alert",
|
|
87
|
+
description: "Get detailed information about a specific alert by alertId.",
|
|
88
|
+
flags: [
|
|
89
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
90
|
+
{ name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" }
|
|
91
|
+
],
|
|
92
|
+
risk: "read",
|
|
93
|
+
mcpService: "te_analysis_extend",
|
|
94
|
+
buildArgs: (ctx) => ({
|
|
95
|
+
projectId: ctx.num("project_id"),
|
|
96
|
+
alertId: ctx.num("alert_id")
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// src/commands/te-analysis/meta/create-alert.ts
|
|
101
|
+
var createAlert = createMcpCommand({
|
|
102
|
+
command: "+create_alert",
|
|
103
|
+
description: "Create a new alert. After creation, use list_alerts or get_alert to retrieve the created alert.",
|
|
104
|
+
flags: [
|
|
105
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
106
|
+
{ name: "definition", type: "json", required: true, desc: "Alert definition JSON. See +get_alert_definition_schema for the complete structure." }
|
|
107
|
+
],
|
|
108
|
+
risk: "write",
|
|
109
|
+
mcpService: "te_analysis_extend",
|
|
110
|
+
buildArgs: (ctx) => ({
|
|
111
|
+
projectId: ctx.num("project_id"),
|
|
112
|
+
definition: requiredJsonString(ctx, "definition")
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// src/commands/te-analysis/meta/update-alert.ts
|
|
117
|
+
var updateAlert = createMcpCommand({
|
|
118
|
+
command: "+update_alert",
|
|
119
|
+
description: "Update an existing alert. All fields in the definition will replace existing values.",
|
|
120
|
+
flags: [
|
|
121
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
122
|
+
{ name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" },
|
|
123
|
+
{ name: "definition", type: "json", required: true, desc: "Alert definition JSON with updated fields. See +get_alert_definition_schema for the complete structure." }
|
|
124
|
+
],
|
|
125
|
+
risk: "write",
|
|
126
|
+
mcpService: "te_analysis_extend",
|
|
127
|
+
buildArgs: (ctx) => ({
|
|
128
|
+
projectId: ctx.num("project_id"),
|
|
129
|
+
alertId: ctx.num("alert_id"),
|
|
130
|
+
definition: requiredJsonString(ctx, "definition")
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// src/commands/te-analysis/meta/index.ts
|
|
135
|
+
var commands = [
|
|
136
|
+
getAlertDefinitionSchema,
|
|
137
|
+
listAlerts,
|
|
138
|
+
getAlert,
|
|
139
|
+
createAlert,
|
|
140
|
+
updateAlert
|
|
141
|
+
];
|
|
142
|
+
var meta_default = commands;
|
|
143
|
+
|
|
144
|
+
// src/commands/te-analysis/report/list-reports.ts
|
|
145
|
+
var listReports = createMcpCommand({
|
|
146
|
+
command: "+list_reports",
|
|
147
|
+
description: "List report metadata accessible to the current user in the project. Supports keyword filtering and returns report IDs, names, model types, update times, and related metadata, but not report definitions or analysis data.",
|
|
148
|
+
flags: [
|
|
149
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
150
|
+
{ name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against report names and descriptions; if omitted, all accessible reports are returned.", alias: "q" }
|
|
151
|
+
],
|
|
152
|
+
risk: "read",
|
|
153
|
+
buildArgs: (ctx) => ({
|
|
154
|
+
projectId: ctx.num("project_id"),
|
|
155
|
+
query: optionalString(ctx, "query")
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// src/commands/te-analysis/report/get-report-definition.ts
|
|
160
|
+
var getReportDefinition = createMcpCommand({
|
|
161
|
+
command: "+get_report_definition",
|
|
162
|
+
description: "Get the definition details of a single report. Returns model type, event configuration, display configuration, and other definition data without executing a data query.",
|
|
163
|
+
flags: [
|
|
164
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
165
|
+
{ name: "report_id", type: "number", required: true, desc: "Report ID", alias: "r" }
|
|
166
|
+
],
|
|
167
|
+
risk: "read",
|
|
168
|
+
buildArgs: (ctx) => ({
|
|
169
|
+
projectId: ctx.num("project_id"),
|
|
170
|
+
reportId: ctx.num("report_id")
|
|
171
|
+
})
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// src/commands/te-analysis/report/query-report-data.ts
|
|
175
|
+
var queryReportData = createMcpCommand({
|
|
176
|
+
command: "+query_report_data",
|
|
177
|
+
description: "Query analysis data for one or more reports. Supports extra filters, group-by settings, and time range overrides.",
|
|
178
|
+
flags: [
|
|
179
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
180
|
+
{ name: "report_ids", type: "json", required: true, desc: "List of report IDs" },
|
|
181
|
+
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
182
|
+
{ name: "group_by", type: "json", required: false, desc: "Optional group-by JSON array. See +get_groupby_schema for the structure." },
|
|
183
|
+
{ name: "request_id", type: "string", required: false, desc: "Optional unique request ID. Generated automatically if omitted." },
|
|
184
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
185
|
+
{ name: "start_date", type: "string", required: false, desc: "Optional start date in yyyy-MM-dd format" },
|
|
186
|
+
{ name: "end_date", type: "string", required: false, desc: "Optional end date in yyyy-MM-dd format" },
|
|
187
|
+
{ name: "time_granularity", type: "string", required: false, desc: "Optional time granularity used to override the report default. Supported values: minute, minute5, minute10, hour, day, week, month, quarter, year, total." },
|
|
188
|
+
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
189
|
+
],
|
|
190
|
+
risk: "read",
|
|
191
|
+
buildArgs: (ctx) => ({
|
|
192
|
+
projectId: ctx.num("project_id"),
|
|
193
|
+
reportIds: ctx.json("report_ids"),
|
|
194
|
+
filters: optionalJsonString(ctx, "filters"),
|
|
195
|
+
groupBy: optionalJsonString(ctx, "group_by"),
|
|
196
|
+
requestId: optionalString(ctx, "request_id"),
|
|
197
|
+
useCache: optionalBoolean(ctx, "use_cache"),
|
|
198
|
+
startDate: optionalString(ctx, "start_date"),
|
|
199
|
+
endDate: optionalString(ctx, "end_date"),
|
|
200
|
+
timeGranularity: optionalString(ctx, "time_granularity"),
|
|
201
|
+
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
202
|
+
})
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// src/commands/te-analysis/report/create-report.ts
|
|
206
|
+
var createReport = createMcpCommand({
|
|
207
|
+
command: "+create_report",
|
|
208
|
+
description: "Create and persist a new report definition. Supports event, retention, funnel, prop_analysis, path, distribution, sql, interval, and attribution models.",
|
|
209
|
+
flags: [
|
|
210
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
211
|
+
{ name: "report_name", type: "string", required: true, desc: "Report name. Length: 1-80 characters" },
|
|
212
|
+
{ name: "model_type", type: "string", required: true, desc: "Report model type. Supported values: event, retention, funnel, prop_analysis, path, distribution, sql, interval, attribution" },
|
|
213
|
+
{ name: "analysis_query", type: "json", required: true, desc: "Report analysis query JSON. Usually includes fields such as events and eventView. See +get_analysis_query_schema for the structure." },
|
|
214
|
+
{ name: "description", type: "string", required: false, desc: "Optional report description" },
|
|
215
|
+
{ name: "cache_seconds", type: "number", required: false, desc: "Optional cache duration in seconds" },
|
|
216
|
+
{ name: "query_duration_ms", type: "number", required: false, desc: "Optional query duration in milliseconds" },
|
|
217
|
+
{ name: "dashboard_ids", type: "json", required: false, desc: "Optional list of dashboard IDs to associate" }
|
|
218
|
+
],
|
|
219
|
+
risk: "write",
|
|
220
|
+
buildArgs: (ctx) => ({
|
|
221
|
+
projectId: ctx.num("project_id"),
|
|
222
|
+
reportName: ctx.str("report_name"),
|
|
223
|
+
modelType: ctx.str("model_type"),
|
|
224
|
+
analysisQuery: requiredJsonString(ctx, "analysis_query"),
|
|
225
|
+
description: optionalString(ctx, "description"),
|
|
226
|
+
cacheSeconds: optionalNumber(ctx, "cache_seconds"),
|
|
227
|
+
queryDurationMs: optionalNumber(ctx, "query_duration_ms"),
|
|
228
|
+
dashboardIds: optionalJson(ctx, "dashboard_ids")
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// src/commands/te-analysis/report/index.ts
|
|
233
|
+
var commands2 = [
|
|
234
|
+
listReports,
|
|
235
|
+
getReportDefinition,
|
|
236
|
+
queryReportData,
|
|
237
|
+
createReport
|
|
238
|
+
];
|
|
239
|
+
var report_default = commands2;
|
|
240
|
+
|
|
241
|
+
// src/commands/te-analysis/dashboard/list-dashboards.ts
|
|
242
|
+
var listDashboards = createMcpCommand({
|
|
243
|
+
command: "+list_dashboards",
|
|
244
|
+
description: "List dashboard metadata accessible to the current user in the project. Supports keyword filtering and returns dashboard IDs, names, descriptions, and related metadata, but not dashboard configuration or report data.",
|
|
245
|
+
flags: [
|
|
246
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
247
|
+
{ name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against dashboard names; if omitted, all accessible dashboards are returned.", alias: "q" }
|
|
248
|
+
],
|
|
249
|
+
risk: "read",
|
|
250
|
+
buildArgs: (ctx) => ({
|
|
251
|
+
projectId: ctx.num("project_id"),
|
|
252
|
+
query: optionalString(ctx, "query")
|
|
253
|
+
})
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
// src/commands/te-analysis/dashboard/query-dashboard-detail.ts
|
|
257
|
+
var queryDashboardDetail = createMcpCommand({
|
|
258
|
+
command: "+query_dashboard_detail",
|
|
259
|
+
description: "Get detailed information about a specific dashboard including associated reports, dashboard notes, and share members.",
|
|
260
|
+
flags: [
|
|
261
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
262
|
+
{ name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" }
|
|
263
|
+
],
|
|
264
|
+
risk: "read",
|
|
265
|
+
buildArgs: (ctx) => ({
|
|
266
|
+
projectId: ctx.num("project_id"),
|
|
267
|
+
dashboardId: ctx.num("dashboard_id")
|
|
268
|
+
})
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// src/commands/te-analysis/dashboard/query-dashboard-report-data.ts
|
|
272
|
+
var queryDashboardReportData = createMcpCommand({
|
|
273
|
+
command: "+query_dashboard_report_data",
|
|
274
|
+
description: "Query analysis data for one or more reports in a dashboard. Supports additional filters and time range overrides.",
|
|
275
|
+
flags: [
|
|
276
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
277
|
+
{ name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" },
|
|
278
|
+
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
279
|
+
{ name: "start_date", type: "string", required: false, desc: "Optional start date in yyyy-MM-dd format" },
|
|
280
|
+
{ name: "end_date", type: "string", required: false, desc: "Optional end date in yyyy-MM-dd format" },
|
|
281
|
+
{ name: "time_granularity", type: "string", required: false, desc: "Optional time granularity used to override the report default. Supported values: minute, minute5, minute10, hour, day, week, month, quarter, year, total." },
|
|
282
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
283
|
+
{ name: "report_ids", type: "json", required: false, desc: "Optional report IDs JSON array" }
|
|
284
|
+
],
|
|
285
|
+
risk: "read",
|
|
286
|
+
buildArgs: (ctx) => ({
|
|
287
|
+
projectId: ctx.num("project_id"),
|
|
288
|
+
dashboardId: ctx.num("dashboard_id"),
|
|
289
|
+
filters: optionalJsonString(ctx, "filters"),
|
|
290
|
+
startDate: optionalString(ctx, "start_date"),
|
|
291
|
+
endDate: optionalString(ctx, "end_date"),
|
|
292
|
+
timeGranularity: optionalString(ctx, "time_granularity"),
|
|
293
|
+
useCache: optionalBoolean(ctx, "use_cache"),
|
|
294
|
+
reportIds: optionalJson(ctx, "report_ids")
|
|
295
|
+
})
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// src/commands/te-analysis/dashboard/create-dashboard.ts
|
|
299
|
+
var createDashboard = createMcpCommand({
|
|
300
|
+
command: "+create_dashboard",
|
|
301
|
+
description: "Create a new dashboard. Optionally associates an initial report after creation and/or creates an initial dashboard note.",
|
|
302
|
+
flags: [
|
|
303
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
304
|
+
{ name: "dashboard_name", type: "string", required: true, desc: "Dashboard name" },
|
|
305
|
+
{ name: "space_id", type: "number", required: false, desc: "Optional space ID. If provided, the dashboard is created in that space." },
|
|
306
|
+
{ name: "folder_id", type: "number", required: false, desc: "Optional folder ID. If provided, the dashboard is created in that folder." },
|
|
307
|
+
{ name: "initial_report_id", type: "number", required: false, desc: "Optional initial report ID. If provided, the report is automatically associated with the new dashboard after creation." },
|
|
308
|
+
{ name: "note_title", type: "string", required: false, desc: "Optional note title for an initial dashboard note." },
|
|
309
|
+
{ name: "note_content", type: "string", required: false, desc: "Optional note content for an initial dashboard note." },
|
|
310
|
+
{ name: "note_style", type: "json", required: false, desc: "Optional note style configuration JSON for an initial dashboard note." }
|
|
311
|
+
],
|
|
312
|
+
risk: "write",
|
|
313
|
+
buildArgs: (ctx) => ({
|
|
314
|
+
projectId: ctx.num("project_id"),
|
|
315
|
+
dashboardName: ctx.str("dashboard_name"),
|
|
316
|
+
spaceId: optionalNumber(ctx, "space_id"),
|
|
317
|
+
folderId: optionalNumber(ctx, "folder_id"),
|
|
318
|
+
initialReportId: optionalNumber(ctx, "initial_report_id"),
|
|
319
|
+
noteTitle: optionalString(ctx, "note_title"),
|
|
320
|
+
noteContent: optionalString(ctx, "note_content"),
|
|
321
|
+
noteStyle: optionalJsonString(ctx, "note_style")
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// src/commands/te-analysis/dashboard/update-dashboard.ts
|
|
326
|
+
var updateDashboard = createMcpCommand({
|
|
327
|
+
command: "+update_dashboard",
|
|
328
|
+
description: "Update dashboard metadata. Supports renaming the dashboard, appending reports, or replacing share members.",
|
|
329
|
+
flags: [
|
|
330
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
331
|
+
{ name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" },
|
|
332
|
+
{ name: "dashboard_name", type: "string", required: false, desc: "New dashboard name. If provided, updates the dashboard name." },
|
|
333
|
+
{ name: "member_authorities", type: "json", required: false, desc: "Map of member userId to permissions (READ, EDIT, MAINTAIN). Full replacement mode." },
|
|
334
|
+
{ name: "report_ids", type: "json", required: false, desc: "List of report IDs to associate with the dashboard. Reports not already associated will be added." }
|
|
335
|
+
],
|
|
336
|
+
risk: "write",
|
|
337
|
+
buildArgs: (ctx) => ({
|
|
338
|
+
projectId: ctx.num("project_id"),
|
|
339
|
+
dashboardId: ctx.num("dashboard_id"),
|
|
340
|
+
dashboardName: optionalString(ctx, "dashboard_name"),
|
|
341
|
+
memberAuthorities: optionalJson(ctx, "member_authorities"),
|
|
342
|
+
reportIds: optionalJson(ctx, "report_ids")
|
|
343
|
+
})
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
// src/commands/te-analysis/dashboard/create-or-update-dashboard-note.ts
|
|
347
|
+
var createOrUpdateDashboardNote = createMcpCommand({
|
|
348
|
+
command: "+create_or_update_dashboard_note",
|
|
349
|
+
description: "Create a new dashboard note or update an existing one. If noteId is provided, updates the existing note; otherwise creates a new note.",
|
|
350
|
+
flags: [
|
|
351
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
352
|
+
{ name: "dashboard_id", type: "number", required: true, alias: "d", desc: "Dashboard ID" },
|
|
353
|
+
{ name: "note_id", type: "number", required: false, desc: "Optional note ID. If provided, updates the existing note; otherwise creates a new note." },
|
|
354
|
+
{ name: "note_title", type: "string", required: true, desc: "Note title" },
|
|
355
|
+
{ name: "description", type: "string", required: false, desc: "Optional note description content." },
|
|
356
|
+
{ name: "ui_config", type: "json", required: false, desc: "Optional UI configuration JSON string for the note style." }
|
|
357
|
+
],
|
|
358
|
+
risk: "write",
|
|
359
|
+
mcpService: "te_analysis_extend",
|
|
360
|
+
buildArgs: (ctx) => ({
|
|
361
|
+
projectId: ctx.num("project_id"),
|
|
362
|
+
dashboardId: ctx.num("dashboard_id"),
|
|
363
|
+
noteId: optionalNumber(ctx, "note_id"),
|
|
364
|
+
noteTitle: ctx.str("note_title"),
|
|
365
|
+
description: optionalString(ctx, "description"),
|
|
366
|
+
uiConfig: optionalJsonString(ctx, "ui_config")
|
|
367
|
+
})
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// src/commands/te-analysis/dashboard/list-public-access-links.ts
|
|
371
|
+
var listPublicAccessLinks = createMcpCommand({
|
|
372
|
+
command: "+list_public_access_links",
|
|
373
|
+
description: "List public access links in the project. Returns link IDs, short codes, access targets, status, effective time, expiration time, and related metadata.",
|
|
374
|
+
flags: [
|
|
375
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" }
|
|
376
|
+
],
|
|
377
|
+
risk: "read",
|
|
378
|
+
mcpService: "te_analysis_extend",
|
|
379
|
+
buildArgs: (ctx) => ({
|
|
380
|
+
projectId: ctx.num("project_id")
|
|
381
|
+
})
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
// src/commands/te-analysis/dashboard/create-public-access-link.ts
|
|
385
|
+
var createPublicAccessLink = createMcpCommand({
|
|
386
|
+
command: "+create_public_access_link",
|
|
387
|
+
description: "Create a public access link for the project. Supports dashboard and bi_panel targets and validates the access-control time range.",
|
|
388
|
+
flags: [
|
|
389
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
390
|
+
{ name: "company_id", type: "number", required: false, desc: "Optional company ID. If omitted, the company ID of the project is used." },
|
|
391
|
+
{ name: "resource_type", type: "string", required: true, desc: "Access target type. Supported values: dashboard and bi_panel." },
|
|
392
|
+
{ name: "resource_id", type: "number", required: true, desc: "Access target ID. Use a dashboard ID when resource_type is dashboard, and a BI panel ID when resource_type is bi_panel." },
|
|
393
|
+
{ name: "access_controls", type: "json", required: true, desc: "Public access control JSON. For dashboard, DN/GF/UA control title, filters, and refresh behavior. For bi_panel, the default is an empty object." },
|
|
394
|
+
{ name: "remark", type: "string", required: false, desc: "Optional remark. Maximum length: 200 characters." },
|
|
395
|
+
{ name: "effective_at", type: "string", required: true, desc: "Effective time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
396
|
+
{ name: "expires_at", type: "string", required: true, desc: "Expiration time. Format: yyyy-MM-dd HH:mm:ss" }
|
|
397
|
+
],
|
|
398
|
+
risk: "write",
|
|
399
|
+
mcpService: "te_analysis_extend",
|
|
400
|
+
buildArgs: (ctx) => ({
|
|
401
|
+
projectId: ctx.num("project_id"),
|
|
402
|
+
companyId: optionalNumber(ctx, "company_id"),
|
|
403
|
+
resourceType: ctx.str("resource_type"),
|
|
404
|
+
resourceId: ctx.num("resource_id"),
|
|
405
|
+
accessControls: requiredJsonString(ctx, "access_controls"),
|
|
406
|
+
remark: optionalString(ctx, "remark"),
|
|
407
|
+
effectiveAt: ctx.str("effective_at"),
|
|
408
|
+
expiresAt: ctx.str("expires_at")
|
|
409
|
+
})
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
// src/commands/te-analysis/dashboard/update-public-access-link.ts
|
|
413
|
+
var updatePublicAccessLink = createMcpCommand({
|
|
414
|
+
command: "+update_public_access_link",
|
|
415
|
+
description: "Update the access controls, remark, and effective time range of a public access link.",
|
|
416
|
+
flags: [
|
|
417
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
418
|
+
{ name: "company_id", type: "number", required: false, desc: "Optional company ID. If omitted, the company ID of the project is used." },
|
|
419
|
+
{ name: "link_id", type: "number", required: true, desc: "Link ID" },
|
|
420
|
+
{ name: "access_controls", type: "json", required: true, desc: "Public access control JSON" },
|
|
421
|
+
{ name: "remark", type: "string", required: false, desc: "Optional remark. Maximum length: 200 characters." },
|
|
422
|
+
{ name: "effective_at", type: "string", required: true, desc: "Effective time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
423
|
+
{ name: "expires_at", type: "string", required: true, desc: "Expiration time. Format: yyyy-MM-dd HH:mm:ss" }
|
|
424
|
+
],
|
|
425
|
+
risk: "write",
|
|
426
|
+
mcpService: "te_analysis_extend",
|
|
427
|
+
buildArgs: (ctx) => ({
|
|
428
|
+
projectId: ctx.num("project_id"),
|
|
429
|
+
companyId: optionalNumber(ctx, "company_id"),
|
|
430
|
+
linkId: ctx.num("link_id"),
|
|
431
|
+
accessControls: requiredJsonString(ctx, "access_controls"),
|
|
432
|
+
remark: optionalString(ctx, "remark"),
|
|
433
|
+
effectiveAt: ctx.str("effective_at"),
|
|
434
|
+
expiresAt: ctx.str("expires_at")
|
|
435
|
+
})
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
// src/commands/te-analysis/dashboard/index.ts
|
|
439
|
+
var commands3 = [
|
|
440
|
+
listDashboards,
|
|
441
|
+
queryDashboardDetail,
|
|
442
|
+
queryDashboardReportData,
|
|
443
|
+
createDashboard,
|
|
444
|
+
updateDashboard,
|
|
445
|
+
createOrUpdateDashboardNote,
|
|
446
|
+
listPublicAccessLinks,
|
|
447
|
+
createPublicAccessLink,
|
|
448
|
+
updatePublicAccessLink
|
|
449
|
+
];
|
|
450
|
+
var dashboard_default = commands3;
|
|
451
|
+
|
|
452
|
+
// src/commands/te-analysis/model/query-adhoc.ts
|
|
453
|
+
var queryAdhoc = createMcpCommand({
|
|
454
|
+
command: "+query_adhoc",
|
|
455
|
+
description: "Run ad hoc analysis for event, retention, funnel, distribution, attribution, heat map, interval, path, rank list, property analysis, or SQL models",
|
|
456
|
+
flags: [
|
|
457
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
458
|
+
{ name: "model_type", type: "string", required: true, desc: "Model type. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql." },
|
|
459
|
+
{ name: "qp", type: "json", required: true, desc: "Query parameter JSON. Call +get_analysis_query_schema first and keep the time calculation logic consistent with the schema." },
|
|
460
|
+
{ name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and deduplication. Generated automatically if omitted." },
|
|
461
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use result cache. Default: true" },
|
|
462
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5" },
|
|
463
|
+
{ name: "is_sort_by_columns", type: "boolean", required: false, desc: "Whether to sort query results by columns. Default: false" },
|
|
464
|
+
{ name: "resolve_recent_day", type: "boolean", required: false, desc: "Whether to resolve relative time expressions such as last 7 days. Default: false" },
|
|
465
|
+
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
466
|
+
],
|
|
467
|
+
risk: "read",
|
|
468
|
+
buildArgs: (ctx) => ({
|
|
469
|
+
projectId: ctx.num("project_id"),
|
|
470
|
+
modelType: ctx.str("model_type"),
|
|
471
|
+
qp: requiredJsonString(ctx, "qp"),
|
|
472
|
+
requestId: optionalString(ctx, "request_id"),
|
|
473
|
+
useCache: optionalBoolean(ctx, "use_cache"),
|
|
474
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
475
|
+
isSortByColumns: optionalBoolean(ctx, "is_sort_by_columns"),
|
|
476
|
+
resolveRecentDay: optionalBoolean(ctx, "resolve_recent_day"),
|
|
477
|
+
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
478
|
+
})
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
// src/commands/te-analysis/model/drilldown-users.ts
|
|
482
|
+
var drilldownUsers = createMcpCommand({
|
|
483
|
+
command: "+drilldown_users",
|
|
484
|
+
description: "Drill down to the user list for a specific data point in an existing analysis result. Use only after query_adhoc, query_report_data, or query_dashboard_report_data, and keep qp consistent with the source analysis.",
|
|
485
|
+
flags: [
|
|
486
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
487
|
+
{ name: "model_type", type: "string", required: true, desc: "Model type used in the source analysis. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql." },
|
|
488
|
+
{ name: "qp", type: "json", required: true, desc: "Query parameter JSON from the source analysis. Keep it consistent with the original analysis." },
|
|
489
|
+
{ name: "properties", type: "json", required: false, desc: "Optional user properties JSON array. If omitted, default properties are returned." },
|
|
490
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
491
|
+
{ name: "drilldown_date", type: "string", required: false, desc: "Target drilldown date from the analysis result. Format: yyyy-MM-dd" },
|
|
492
|
+
{ name: "drilldown_groups", type: "json", required: false, desc: 'Drilldown group values from the analysis result as a JSON array, for example ["ios"]' },
|
|
493
|
+
{ name: "event_index", type: "number", required: false, desc: "Event index for event-model drilldown. Use the event position from the analysis result starting from 0." },
|
|
494
|
+
{ name: "is_lost", type: "boolean", required: false, desc: "For retention analysis, true queries lost users and false queries retained users. Default: false" },
|
|
495
|
+
{ name: "retention_days", type: "number", required: false, desc: "Retention interval in days from the analysis result, for example 7 for day-7 retention" },
|
|
496
|
+
{ name: "is_churned_user", type: "boolean", required: false, desc: "For funnel analysis, true queries churned users and false queries converted users. Default: false" },
|
|
497
|
+
{ name: "funnel_step", type: "number", required: false, desc: "Funnel step number from the analysis result starting from 1" },
|
|
498
|
+
{ name: "interval", type: "string", required: false, desc: "Interval used for interval analysis" },
|
|
499
|
+
{ name: "distribution_bucket", type: "number", required: false, desc: "Distribution bucket index from the analysis result" },
|
|
500
|
+
{ name: "compare_index", type: "number", required: false, desc: "Comparison index used in comparison analysis scenarios" },
|
|
501
|
+
{ name: "include_total", type: "boolean", required: false, desc: "Whether to query users from the total row. Default: false" },
|
|
502
|
+
{ name: "relation_val", type: "string", required: false, desc: "Relation value used in relation analysis scenarios" },
|
|
503
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
504
|
+
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
505
|
+
],
|
|
506
|
+
risk: "read",
|
|
507
|
+
buildArgs: (ctx) => ({
|
|
508
|
+
projectId: ctx.num("project_id"),
|
|
509
|
+
modelType: ctx.str("model_type"),
|
|
510
|
+
qp: requiredJsonString(ctx, "qp"),
|
|
511
|
+
properties: optionalJsonString(ctx, "properties"),
|
|
512
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
513
|
+
drilldownDate: optionalString(ctx, "drilldown_date"),
|
|
514
|
+
drilldownGroups: optionalJsonString(ctx, "drilldown_groups"),
|
|
515
|
+
eventIndex: optionalNumber(ctx, "event_index"),
|
|
516
|
+
isLost: optionalBoolean(ctx, "is_lost"),
|
|
517
|
+
retentionDays: optionalNumber(ctx, "retention_days"),
|
|
518
|
+
isChurnedUser: optionalBoolean(ctx, "is_churned_user"),
|
|
519
|
+
funnelStep: optionalNumber(ctx, "funnel_step"),
|
|
520
|
+
interval: optionalString(ctx, "interval"),
|
|
521
|
+
distributionBucket: optionalNumber(ctx, "distribution_bucket"),
|
|
522
|
+
compareIndex: optionalNumber(ctx, "compare_index"),
|
|
523
|
+
includeTotal: optionalBoolean(ctx, "include_total"),
|
|
524
|
+
relationVal: optionalString(ctx, "relation_val"),
|
|
525
|
+
useCache: optionalBoolean(ctx, "use_cache"),
|
|
526
|
+
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
527
|
+
})
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
// src/commands/te-analysis/model/drilldown-user-events.ts
|
|
531
|
+
var drilldownUserEvents = createMcpCommand({
|
|
532
|
+
command: "+drilldown_user_events",
|
|
533
|
+
description: "Drill down to detailed event sequences for a specific user on specific dates. Use the result of drilldown_users and keep event names and dates consistent with the source analysis.",
|
|
534
|
+
flags: [
|
|
535
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
536
|
+
{ name: "user_id", type: "string", required: true, desc: "User ID from drilldown_users" },
|
|
537
|
+
{ name: "event_names", type: "json", required: true, desc: "JSON array of event names" },
|
|
538
|
+
{ name: "target_dates", type: "json", required: true, desc: "JSON array of discrete target dates" },
|
|
539
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
540
|
+
{ name: "properties", type: "json", required: false, desc: "Optional event properties JSON array" },
|
|
541
|
+
{ name: "time_granularity", type: "string", required: false, desc: "Time granularity. Supported values: T0, T1, T2, T3, T4, T5, T6, T7" },
|
|
542
|
+
{ name: "first_day_of_week", type: "number", required: false, desc: "First day of week. Supported values: 1-7" },
|
|
543
|
+
{ name: "sort_order", type: "string", required: false, desc: "Sort order. Supported values: asc and desc" },
|
|
544
|
+
{ name: "event_name_filter", type: "string", required: false, desc: "Optional event name filter" },
|
|
545
|
+
{ name: "time_filter", type: "string", required: false, desc: "Optional time filter condition" },
|
|
546
|
+
{ name: "time_filter_before_nums", type: "number", required: false, desc: "Number of records before the time filter point" },
|
|
547
|
+
{ name: "time_filter_after_nums", type: "number", required: false, desc: "Number of records after the time filter point" },
|
|
548
|
+
{ name: "entity_id", type: "number", required: false, desc: "Optional entity ID for multi-entity scenarios" },
|
|
549
|
+
{ name: "entity_value", type: "string", required: false, desc: "Optional entity value for multi-entity scenarios" },
|
|
550
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
551
|
+
{ name: "page_num", type: "number", required: false, desc: "Start page number. Default: 1" },
|
|
552
|
+
{ name: "page_size", type: "number", required: false, desc: "Page size. Default: 100" },
|
|
553
|
+
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
554
|
+
],
|
|
555
|
+
risk: "read",
|
|
556
|
+
buildArgs: (ctx) => ({
|
|
557
|
+
projectId: ctx.num("project_id"),
|
|
558
|
+
userId: ctx.str("user_id"),
|
|
559
|
+
eventNames: requiredJsonString(ctx, "event_names"),
|
|
560
|
+
targetDates: requiredJsonString(ctx, "target_dates"),
|
|
561
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
562
|
+
properties: optionalJsonString(ctx, "properties"),
|
|
563
|
+
timeGranularity: optionalString(ctx, "time_granularity"),
|
|
564
|
+
firstDayOfWeek: optionalNumber(ctx, "first_day_of_week"),
|
|
565
|
+
sortOrder: optionalString(ctx, "sort_order"),
|
|
566
|
+
eventNameFilter: optionalString(ctx, "event_name_filter"),
|
|
567
|
+
timeFilter: optionalString(ctx, "time_filter"),
|
|
568
|
+
timeFilterBeforeNums: optionalNumber(ctx, "time_filter_before_nums"),
|
|
569
|
+
timeFilterAfterNums: optionalNumber(ctx, "time_filter_after_nums"),
|
|
570
|
+
entityId: optionalNumber(ctx, "entity_id"),
|
|
571
|
+
entityValue: optionalString(ctx, "entity_value"),
|
|
572
|
+
useCache: optionalBoolean(ctx, "use_cache"),
|
|
573
|
+
pageNum: optionalNumber(ctx, "page_num"),
|
|
574
|
+
pageSize: optionalNumber(ctx, "page_size"),
|
|
575
|
+
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
576
|
+
})
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
// src/commands/te-analysis/model/create-result-cluster.ts
|
|
580
|
+
var createResultCluster = createMcpCommand({
|
|
581
|
+
command: "+create_result_cluster",
|
|
582
|
+
description: "Create a reusable result cluster from users matched by a drilldown condition in an existing analysis result. Use only after query_adhoc, query_report_data, or query_dashboard_report_data.",
|
|
583
|
+
flags: [
|
|
584
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
585
|
+
{ name: "cluster_name", type: "string", required: true, desc: "Cluster name. Must start with a letter and contain only letters, digits, and underscores. It must be unique within the project." },
|
|
586
|
+
{ name: "model_type", type: "string", required: true, desc: "Model type used in the source analysis. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql." },
|
|
587
|
+
{ name: "qp", type: "json", required: true, desc: "Query parameter JSON from the source analysis. Keep it consistent with the source analysis." },
|
|
588
|
+
{ name: "display_name", type: "string", required: false, desc: "Optional cluster display name. If omitted, cluster_name is used." },
|
|
589
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Optional time zone offset. If omitted, the project default time zone is used." },
|
|
590
|
+
{ name: "drilldown_date", type: "string", required: false, desc: "Target drilldown date from the analysis result. Format: yyyy-MM-dd" },
|
|
591
|
+
{ name: "drilldown_groups", type: "json", required: false, desc: 'Drilldown group values from the analysis result as a JSON array, for example ["ios"]. Defaults to the overall group when omitted.' },
|
|
592
|
+
{ name: "event_index", type: "number", required: false, desc: "Event index for event-model drilldown. Use the event position from the analysis result starting from 0." },
|
|
593
|
+
{ name: "is_lost", type: "boolean", required: false, desc: "For retention analysis, true saves lost users and false saves retained users. Default: false" },
|
|
594
|
+
{ name: "retention_days", type: "number", required: false, desc: "Retention interval in days from the analysis result, for example 7 for day-7 retention" },
|
|
595
|
+
{ name: "is_churned_user", type: "boolean", required: false, desc: "For funnel analysis, true saves churned users and false saves converted users. Default: false" },
|
|
596
|
+
{ name: "funnel_step", type: "number", required: false, desc: "Funnel step number from the analysis result starting from 1" },
|
|
597
|
+
{ name: "interval", type: "string", required: false, desc: "Interval used for interval analysis" },
|
|
598
|
+
{ name: "distribution_bucket", type: "number", required: false, desc: "Distribution bucket index from the analysis result" },
|
|
599
|
+
{ name: "compare_index", type: "number", required: false, desc: "Comparison index used in comparison analysis scenarios" },
|
|
600
|
+
{ name: "include_total", type: "boolean", required: false, desc: "Whether to save users from the total row. Default: false" },
|
|
601
|
+
{ name: "relation_val", type: "string", required: false, desc: "Relation value used in relation analysis scenarios" }
|
|
602
|
+
],
|
|
603
|
+
risk: "write",
|
|
604
|
+
buildArgs: (ctx) => ({
|
|
605
|
+
projectId: ctx.num("project_id"),
|
|
606
|
+
clusterName: ctx.str("cluster_name"),
|
|
607
|
+
modelType: ctx.str("model_type"),
|
|
608
|
+
qp: requiredJsonString(ctx, "qp"),
|
|
609
|
+
displayName: optionalString(ctx, "display_name"),
|
|
610
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
611
|
+
drilldownDate: optionalString(ctx, "drilldown_date"),
|
|
612
|
+
drilldownGroups: optionalJsonString(ctx, "drilldown_groups"),
|
|
613
|
+
eventIndex: optionalNumber(ctx, "event_index"),
|
|
614
|
+
isLost: optionalBoolean(ctx, "is_lost"),
|
|
615
|
+
retentionDays: optionalNumber(ctx, "retention_days"),
|
|
616
|
+
isChurnedUser: optionalBoolean(ctx, "is_churned_user"),
|
|
617
|
+
funnelStep: optionalNumber(ctx, "funnel_step"),
|
|
618
|
+
interval: optionalString(ctx, "interval"),
|
|
619
|
+
distributionBucket: optionalNumber(ctx, "distribution_bucket"),
|
|
620
|
+
compareIndex: optionalNumber(ctx, "compare_index"),
|
|
621
|
+
includeTotal: optionalBoolean(ctx, "include_total"),
|
|
622
|
+
relationVal: optionalString(ctx, "relation_val")
|
|
623
|
+
})
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
// src/commands/te-analysis/model/load-filters.ts
|
|
627
|
+
var loadFilters = createMcpCommand({
|
|
628
|
+
command: "+load_filters",
|
|
629
|
+
description: "Load candidate values for a property from event or user tables. Use quot to specify the property field whose enum values should be loaded.",
|
|
630
|
+
flags: [
|
|
631
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
632
|
+
{ name: "quot", type: "string", required: true, desc: "Property identifier (field name). This is the property whose candidate values will be loaded." },
|
|
633
|
+
{ name: "table_type", type: "string", required: true, desc: "Table type. Supported values: event and user." },
|
|
634
|
+
{ name: "event_name", type: "string", required: false, desc: "Optional event name. Effective when table_type=event." },
|
|
635
|
+
{ name: "inputdata", type: "string", required: false, desc: "Optional input prefix used for fuzzy filtering of candidate values." },
|
|
636
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
637
|
+
{ name: "cluster_date_policy", type: "string", required: false, desc: "Cluster date policy. Supported values: LATEST, AUTO, SPECIFIED." },
|
|
638
|
+
{ name: "specified_cluster_date", type: "string", required: false, desc: "Specified cluster date in yyyy-MM-dd format. Effective only when cluster_date_policy=SPECIFIED." },
|
|
639
|
+
{ name: "is_report", type: "boolean", required: false, desc: "Whether this is report mode. Default: false" }
|
|
640
|
+
],
|
|
641
|
+
risk: "read",
|
|
642
|
+
mcpService: "te_analysis_extend",
|
|
643
|
+
buildArgs: (ctx) => ({
|
|
644
|
+
projectId: ctx.num("project_id"),
|
|
645
|
+
quot: ctx.str("quot"),
|
|
646
|
+
tableType: ctx.str("table_type"),
|
|
647
|
+
eventName: optionalString(ctx, "event_name"),
|
|
648
|
+
inputdata: optionalString(ctx, "inputdata"),
|
|
649
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
650
|
+
clusterDatePolicy: optionalString(ctx, "cluster_date_policy"),
|
|
651
|
+
specifiedClusterDate: optionalString(ctx, "specified_cluster_date"),
|
|
652
|
+
isReport: optionalBoolean(ctx, "is_report")
|
|
653
|
+
})
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
// src/commands/te-analysis/model/get-table-columns.ts
|
|
657
|
+
var getTableColumns = createMcpCommand({
|
|
658
|
+
command: "+get_table_columns",
|
|
659
|
+
description: "Query the field list of a project table. Returns column names and types for the specified catalog, schema, and table so the table structure can be understood before SQL analysis.",
|
|
660
|
+
flags: [
|
|
661
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
662
|
+
{ name: "catalog", type: "string", required: true, desc: "Catalog name. Default: hive" },
|
|
663
|
+
{ name: "schema", type: "string", required: true, desc: "Schema name. Default: ta" },
|
|
664
|
+
{ name: "table", type: "string", required: true, desc: "Table name" }
|
|
665
|
+
],
|
|
666
|
+
risk: "read",
|
|
667
|
+
mcpService: "te_analysis_extend",
|
|
668
|
+
buildArgs: (ctx) => ({
|
|
669
|
+
projectId: ctx.num("project_id"),
|
|
670
|
+
catalog: ctx.str("catalog"),
|
|
671
|
+
schema: ctx.str("schema"),
|
|
672
|
+
table: ctx.str("table")
|
|
673
|
+
})
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
// src/commands/te-analysis/model/index.ts
|
|
677
|
+
var commands4 = [
|
|
678
|
+
queryAdhoc,
|
|
679
|
+
drilldownUsers,
|
|
680
|
+
drilldownUserEvents,
|
|
681
|
+
createResultCluster,
|
|
682
|
+
loadFilters,
|
|
683
|
+
getTableColumns
|
|
684
|
+
];
|
|
685
|
+
var model_default = commands4;
|
|
686
|
+
|
|
687
|
+
// src/commands/te-analysis/entity/query-entity-details.ts
|
|
688
|
+
var queryEntityDetails = createMcpCommand({
|
|
689
|
+
command: "+query_entity_details",
|
|
690
|
+
description: "Query entity detail data based on an entity ID and cluster definition. Supports display properties, sorting, and result limits.",
|
|
691
|
+
flags: [
|
|
692
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
693
|
+
{ name: "entity_id", type: "number", required: false, desc: "Optional entity ID used in multi-entity scenarios. If omitted, the default user entity is used." },
|
|
694
|
+
{ name: "definition", type: "json", required: true, desc: "Cluster definition JSON. See +get_cluster_definition_schema for the structure." },
|
|
695
|
+
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
696
|
+
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
697
|
+
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
698
|
+
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
|
|
699
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
|
|
700
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" }
|
|
701
|
+
],
|
|
702
|
+
risk: "read",
|
|
703
|
+
buildArgs: (ctx) => ({
|
|
704
|
+
projectId: ctx.num("project_id"),
|
|
705
|
+
entityId: optionalNumber(ctx, "entity_id"),
|
|
706
|
+
definition: requiredJsonString(ctx, "definition"),
|
|
707
|
+
properties: optionalJsonString(ctx, "properties"),
|
|
708
|
+
sortBy: optionalString(ctx, "sort_by"),
|
|
709
|
+
sortOrder: optionalString(ctx, "sort_order"),
|
|
710
|
+
limit: optionalNumber(ctx, "limit"),
|
|
711
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
712
|
+
useCache: optionalBoolean(ctx, "use_cache")
|
|
713
|
+
})
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
// src/commands/te-analysis/entity/query-event-details.ts
|
|
717
|
+
var queryEventDetails = createMcpCommand({
|
|
718
|
+
command: "+query_event_details",
|
|
719
|
+
description: "Query event detail data. Supports time range, filters, display properties, sorting, and result limits.",
|
|
720
|
+
flags: [
|
|
721
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
722
|
+
{ name: "event_name", type: "string", required: true, desc: "Event name" },
|
|
723
|
+
{ name: "start_time", type: "string", required: false, desc: "Start time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
724
|
+
{ name: "end_time", type: "string", required: false, desc: "End time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
725
|
+
{ name: "relative_date_range", type: "string", required: false, desc: "Optional relative date range in m-n format. For example, 0-7 means the most recent 7 days including today. Use either this field or start_time/end_time." },
|
|
726
|
+
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
727
|
+
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
728
|
+
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
729
|
+
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
730
|
+
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000" },
|
|
731
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
|
|
732
|
+
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" }
|
|
733
|
+
],
|
|
734
|
+
risk: "read",
|
|
735
|
+
buildArgs: (ctx) => ({
|
|
736
|
+
projectId: ctx.num("project_id"),
|
|
737
|
+
eventName: ctx.str("event_name"),
|
|
738
|
+
startTime: optionalString(ctx, "start_time"),
|
|
739
|
+
endTime: optionalString(ctx, "end_time"),
|
|
740
|
+
relativeDateRange: optionalString(ctx, "relative_date_range"),
|
|
741
|
+
filters: optionalJsonString(ctx, "filters"),
|
|
742
|
+
properties: optionalJsonString(ctx, "properties"),
|
|
743
|
+
sortBy: optionalString(ctx, "sort_by"),
|
|
744
|
+
sortOrder: optionalString(ctx, "sort_order"),
|
|
745
|
+
limit: optionalNumber(ctx, "limit"),
|
|
746
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
747
|
+
useCache: optionalBoolean(ctx, "use_cache")
|
|
748
|
+
})
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
// src/commands/te-analysis/entity/build-entity-details-sql.ts
|
|
752
|
+
var buildEntityDetailsSql = createMcpCommand({
|
|
753
|
+
command: "+build_entity_details_sql",
|
|
754
|
+
description: "Build the SQL for an entity details query. The parameters are the same as query_entity_details, but this tool returns SQL instead of query results.",
|
|
755
|
+
flags: [
|
|
756
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
757
|
+
{ name: "entity_id", type: "number", required: false, desc: "Optional entity ID used in multi-entity scenarios. If omitted, the default user entity is used." },
|
|
758
|
+
{ name: "definition", type: "json", required: true, desc: "Cluster definition JSON. See +get_cluster_definition_schema for the structure." },
|
|
759
|
+
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
760
|
+
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
761
|
+
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
762
|
+
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
|
|
763
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" }
|
|
764
|
+
],
|
|
765
|
+
risk: "read",
|
|
766
|
+
buildArgs: (ctx) => ({
|
|
767
|
+
projectId: ctx.num("project_id"),
|
|
768
|
+
entityId: optionalNumber(ctx, "entity_id"),
|
|
769
|
+
definition: requiredJsonString(ctx, "definition"),
|
|
770
|
+
properties: optionalJsonString(ctx, "properties"),
|
|
771
|
+
sortBy: optionalString(ctx, "sort_by"),
|
|
772
|
+
sortOrder: optionalString(ctx, "sort_order"),
|
|
773
|
+
limit: optionalNumber(ctx, "limit"),
|
|
774
|
+
zoneOffset: optionalNumber(ctx, "zone_offset")
|
|
775
|
+
})
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
// src/commands/te-analysis/entity/build-event-details-sql.ts
|
|
779
|
+
var buildEventDetailsSql = createMcpCommand({
|
|
780
|
+
command: "+build_event_details_sql",
|
|
781
|
+
description: "Build the SQL for an event details query. The parameters are the same as query_event_details, but this tool returns SQL instead of query results.",
|
|
782
|
+
flags: [
|
|
783
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
784
|
+
{ name: "event_name", type: "string", required: true, desc: "Event name" },
|
|
785
|
+
{ name: "start_time", type: "string", required: false, desc: "Start time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
786
|
+
{ name: "end_time", type: "string", required: false, desc: "End time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
787
|
+
{ name: "relative_date_range", type: "string", required: false, desc: "Optional relative date range in m-n format. For example, 0-7 means the most recent 7 days including today. Use either this field or start_time/end_time." },
|
|
788
|
+
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
789
|
+
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
790
|
+
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
791
|
+
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
792
|
+
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 100" },
|
|
793
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" }
|
|
794
|
+
],
|
|
795
|
+
risk: "read",
|
|
796
|
+
buildArgs: (ctx) => ({
|
|
797
|
+
projectId: ctx.num("project_id"),
|
|
798
|
+
eventName: ctx.str("event_name"),
|
|
799
|
+
startTime: optionalString(ctx, "start_time"),
|
|
800
|
+
endTime: optionalString(ctx, "end_time"),
|
|
801
|
+
relativeDateRange: optionalString(ctx, "relative_date_range"),
|
|
802
|
+
filters: optionalJsonString(ctx, "filters"),
|
|
803
|
+
properties: optionalJsonString(ctx, "properties"),
|
|
804
|
+
sortBy: optionalString(ctx, "sort_by"),
|
|
805
|
+
sortOrder: optionalString(ctx, "sort_order"),
|
|
806
|
+
limit: optionalNumber(ctx, "limit"),
|
|
807
|
+
zoneOffset: optionalNumber(ctx, "zone_offset")
|
|
808
|
+
})
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
// src/commands/te-analysis/entity/index.ts
|
|
812
|
+
var commands5 = [
|
|
813
|
+
queryEntityDetails,
|
|
814
|
+
queryEventDetails,
|
|
815
|
+
buildEntityDetailsSql,
|
|
816
|
+
buildEventDetailsSql
|
|
817
|
+
];
|
|
818
|
+
var entity_default = commands5;
|
|
819
|
+
|
|
820
|
+
// src/commands/te-analysis/schema/get-analysis-query-schema.ts
|
|
821
|
+
var getAnalysisQuerySchema = createMcpCommand({
|
|
822
|
+
command: "+get_analysis_query_schema",
|
|
823
|
+
description: "Get the analysis query schema for the specified model type. Different model types use different query structures and this tool returns field definitions and examples.",
|
|
824
|
+
flags: [
|
|
825
|
+
{ name: "model_type", type: "string", required: true, desc: "Model type. Supported values: event, retention, funnel, distribution, sql, interval, path, attribution, prop_analysis, rank_list, heat_map" }
|
|
826
|
+
],
|
|
827
|
+
risk: "read",
|
|
828
|
+
buildArgs: (ctx) => ({
|
|
829
|
+
modelType: ctx.str("model_type")
|
|
830
|
+
})
|
|
831
|
+
});
|
|
832
|
+
|
|
833
|
+
// src/commands/te-analysis/schema/get-filter-schema.ts
|
|
834
|
+
var getFilterSchema = createMcpCommand({
|
|
835
|
+
command: "+get_filter_schema",
|
|
836
|
+
description: "Get the filter schema. Returns field definitions, operator enums, data type descriptions, and examples.",
|
|
837
|
+
flags: [],
|
|
838
|
+
risk: "read",
|
|
839
|
+
buildArgs: (ctx) => ({})
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
// src/commands/te-analysis/schema/get-groupby-schema.ts
|
|
843
|
+
var getGroupbySchema = createMcpCommand({
|
|
844
|
+
command: "+get_groupby_schema",
|
|
845
|
+
description: "Get the group-by schema. Returns field definitions and examples for group-by configuration.",
|
|
846
|
+
flags: [],
|
|
847
|
+
risk: "read",
|
|
848
|
+
buildArgs: (ctx) => ({})
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
// src/commands/te-analysis/schema/index.ts
|
|
852
|
+
var commands6 = [
|
|
853
|
+
getAnalysisQuerySchema,
|
|
854
|
+
getFilterSchema,
|
|
855
|
+
getGroupbySchema
|
|
856
|
+
];
|
|
857
|
+
var schema_default = commands6;
|
|
858
|
+
|
|
859
|
+
// src/commands/te-analysis/index.ts
|
|
860
|
+
var commands7 = [
|
|
861
|
+
...meta_default,
|
|
862
|
+
...report_default,
|
|
863
|
+
...dashboard_default,
|
|
864
|
+
...model_default,
|
|
865
|
+
...entity_default,
|
|
866
|
+
...schema_default
|
|
867
|
+
];
|
|
868
|
+
var te_analysis_default = commands7;
|
|
869
|
+
export {
|
|
870
|
+
te_analysis_default as default
|
|
871
|
+
};
|