@thinkingai/ae-cli 6.0.18 → 6.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +8 -10
  2. package/README.zh.md +9 -11
  3. package/dist/{auth-DYC2BGLM.js → auth-I2G7OAU2.js} +2 -4
  4. package/dist/{auth-GHBMJ5ZR.js → auth-RDN6D5HU.js} +32 -104
  5. package/dist/{chunk-5OC7CYCG.js → chunk-2W7HULUD.js} +14 -14
  6. package/dist/chunk-4EUZRJPO.js +163 -0
  7. package/dist/{chunk-DMMEPCST.js → chunk-5FBLRSMU.js} +25 -115
  8. package/dist/{chunk-BJX3GXWC.js → chunk-E34XH4GW.js} +2 -2
  9. package/dist/chunk-FPE5LGVU.js +105 -0
  10. package/dist/{chunk-I5CRVM2S.js → chunk-H52CSLJW.js} +44 -17
  11. package/dist/{chunk-RSHMZ3LG.js → chunk-U6QPKCN3.js} +6 -20
  12. package/dist/{chunk-6W4QOZAL.js → chunk-WPXHCP4A.js} +23 -13
  13. package/dist/{chunk-PN3OS34E.js → chunk-XE2PI5DS.js} +1 -1
  14. package/dist/{chunk-2DUEAXV3.js → chunk-YACCPUNQ.js} +1 -1
  15. package/dist/cli-token-6AGEDJF4.js +14 -0
  16. package/dist/{client-2UJ63MVQ.js → client-VTJMUZ4O.js} +3 -3
  17. package/dist/{config-NCUGK6NS.js → config-2SDTLGOC.js} +3 -3
  18. package/dist/index.js +314 -197
  19. package/dist/metadata-JZ2OTWBK.js +420 -0
  20. package/dist/{model-SJSOZTRS.js → model-ZYMRN4VS.js} +2 -2
  21. package/dist/{raw-7NVWSVJP.js → raw-NGYHAL3F.js} +4 -4
  22. package/dist/{sync-GRVO4K3U.js → sync-JVLX6TGW.js} +3 -3
  23. package/dist/{te-agent-KZRIEN4N.js → te-agent-QPZTLHPH.js} +545 -21
  24. package/dist/{te-analysis-VAR4KUOK.js → te-analysis-WWX3Z6RP.js} +352 -52
  25. package/dist/te-audience-UXGHUVBB.js +599 -0
  26. package/dist/{te-common-WNCZB7R7.js → te-common-7XXH73MF.js} +5 -4
  27. package/dist/{te-community-JEEFXPB3.js → te-community-QKE67HR2.js} +5 -4
  28. package/dist/te-dataops-6W7NNYST.js +1841 -0
  29. package/dist/{te-engage-4XHCTS6I.js → te-engage-NCFAQFX3.js} +5 -4
  30. package/dist/{te-kb-B62KFP2A.js → te-kb-K5BQYUCM.js} +50 -26
  31. package/dist/{te-meta-EPZGQN56.js → te-meta-LJZBOSMO.js} +48 -24
  32. package/dist/{te-team-YY24VORI.js → te-team-DHK5R7MV.js} +5 -6
  33. package/package.json +3 -2
  34. package/skills/ae-agent/SKILL.md +103 -4
  35. package/skills/ae-analysis/SKILL.md +75 -21
  36. package/skills/ae-analysis/references/build_attribution_analysis_qp.md +62 -0
  37. package/skills/ae-analysis/references/build_cluster_definition.md +62 -0
  38. package/skills/ae-analysis/references/build_distribution_analysis_qp.md +67 -0
  39. package/skills/ae-analysis/references/build_event_analysis_qp.md +2 -0
  40. package/skills/ae-analysis/references/build_funnel_analysis_qp.md +2 -0
  41. package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +54 -0
  42. package/skills/ae-analysis/references/build_interval_analysis_qp.md +60 -0
  43. package/skills/ae-analysis/references/build_path_analysis_qp.md +53 -0
  44. package/skills/ae-analysis/references/build_prop_analysis_qp.md +2 -0
  45. package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +63 -0
  46. package/skills/ae-analysis/references/build_retention_analysis_qp.md +2 -0
  47. package/skills/ae-analysis/references/build_tag_definition.md +65 -0
  48. package/skills/ae-analysis/references/cancel_query.md +2 -3
  49. package/skills/ae-analysis/references/copy_dashboard.md +33 -0
  50. package/skills/ae-analysis/references/create_id_cluster.md +40 -0
  51. package/skills/ae-analysis/references/create_id_tag.md +39 -0
  52. package/skills/ae-analysis/references/delete_alert.md +27 -0
  53. package/skills/ae-analysis/references/delete_cluster.md +27 -0
  54. package/skills/ae-analysis/references/delete_dashboard.md +30 -0
  55. package/skills/ae-analysis/references/delete_metric.md +27 -0
  56. package/skills/ae-analysis/references/delete_report.md +27 -0
  57. package/skills/ae-analysis/references/delete_tag.md +27 -0
  58. package/skills/ae-analysis/references/drilldown_user_events.md +4 -4
  59. package/skills/ae-analysis/references/drilldown_users.md +3 -3
  60. package/skills/ae-analysis/references/freeze_dashboards.md +29 -0
  61. package/skills/ae-analysis/references/get_table_columns.md +11 -12
  62. package/skills/ae-analysis/references/list_cluster_members.md +4 -4
  63. package/skills/ae-analysis/references/list_clusters.md +5 -3
  64. package/skills/ae-analysis/references/list_dashboards.md +3 -3
  65. package/skills/ae-analysis/references/list_entities.md +1 -1
  66. package/skills/ae-analysis/references/list_events.md +7 -4
  67. package/skills/ae-analysis/references/list_metrics.md +5 -3
  68. package/skills/ae-analysis/references/list_properties.md +6 -4
  69. package/skills/ae-analysis/references/list_reports.md +3 -3
  70. package/skills/ae-analysis/references/list_spaces.md +27 -0
  71. package/skills/ae-analysis/references/list_tag_members.md +4 -4
  72. package/skills/ae-analysis/references/list_tags.md +4 -2
  73. package/skills/ae-analysis/references/move_dashboard.md +33 -0
  74. package/skills/ae-analysis/references/query_adhoc.md +2 -2
  75. package/skills/ae-analysis/references/query_bi_panel_data.md +2 -2
  76. package/skills/ae-analysis/references/query_dashboard_report_data.md +4 -4
  77. package/skills/ae-analysis/references/query_entity_details.md +4 -4
  78. package/skills/ae-analysis/references/query_event_details.md +3 -3
  79. package/skills/ae-analysis/references/query_report_data.md +37 -3
  80. package/skills/ae-analysis/references/update_id_cluster.md +36 -0
  81. package/skills/ae-analysis/references/update_id_tag.md +37 -0
  82. package/skills/ae-analysis/references/update_report.md +35 -0
  83. package/skills/ae-analysis-intent/SKILL.md +1 -1
  84. package/skills/ae-dataops/SKILL.md +54 -522
  85. package/skills/ae-dataops/references/dataops-flow-create.md +78 -75
  86. package/skills/ae-dataops/references/dataops-flow-monitor.md +58 -51
  87. package/skills/ae-dataops/references/dataops-integration.md +80 -41
  88. package/skills/ae-dataops/references/dataops-query.md +54 -53
  89. package/skills/ae-dataops/references/dataops-table.md +28 -59
  90. package/skills/ae-generate-tracking-code/SKILL.md +68 -31
  91. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +26 -1
  92. package/skills/ae-generate-tracking-code/references/te-api.md +47 -164
  93. package/skills/ae-generate-tracking-plan/SKILL.md +109 -32
  94. package/skills/ae-generate-tracking-plan/references/te-api.md +57 -27
  95. package/skills/ae-metadata/SKILL.md +90 -0
  96. package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +15 -0
  97. package/skills/ae-metadata/references/metadata_data_table_csv_write.md +29 -0
  98. package/skills/ae-metadata/references/metadata_data_table_download.md +17 -0
  99. package/skills/ae-metadata/references/metadata_data_table_get.md +24 -0
  100. package/skills/ae-metadata/references/metadata_data_table_list.md +27 -0
  101. package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +17 -0
  102. package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +15 -0
  103. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +31 -0
  104. package/skills/ae-metadata/references/metadata_event_get.md +52 -0
  105. package/skills/ae-metadata/references/metadata_input_file_upload.md +29 -0
  106. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +27 -0
  107. package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +30 -0
  108. package/skills/ae-metadata/references/metadata_property_get.md +54 -0
  109. package/dist/te-audience-KMKYI2YJ.js +0 -400
  110. package/dist/te-dataops-GD3XBYCS.js +0 -1830
@@ -1,14 +1,16 @@
1
+ import "./chunk-4EUZRJPO.js";
1
2
  import {
2
3
  callMcpTool,
3
4
  parseMcpResult,
4
5
  resolveMcpUrl
5
- } from "./chunk-DMMEPCST.js";
6
+ } from "./chunk-5FBLRSMU.js";
6
7
  import {
7
8
  isGlobalQueryModeEnabled
8
- } from "./chunk-PN3OS34E.js";
9
+ } from "./chunk-XE2PI5DS.js";
9
10
  import "./chunk-NOO24N7W.js";
10
- import "./chunk-RSHMZ3LG.js";
11
- import "./chunk-6W4QOZAL.js";
11
+ import "./chunk-FPE5LGVU.js";
12
+ import "./chunk-U6QPKCN3.js";
13
+ import "./chunk-WPXHCP4A.js";
12
14
 
13
15
  // src/commands/te-analysis/shared.ts
14
16
  function createMcpCommand(config) {
@@ -210,13 +212,30 @@ var updateAlert = createMcpCommand({
210
212
  })
211
213
  });
212
214
 
215
+ // src/commands/te-analysis/meta/delete-alert.ts
216
+ var deleteAlert = createMcpCommand({
217
+ command: "+delete_alert",
218
+ description: "Delete an alert by alertId",
219
+ flags: [
220
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
221
+ { name: "alert_id", type: "number", required: true, desc: "Alert ID to delete" }
222
+ ],
223
+ risk: "write",
224
+ mcpService: "te_analysis_extend",
225
+ buildArgs: (ctx) => ({
226
+ projectId: ctx.num("project_id"),
227
+ alertId: ctx.num("alert_id")
228
+ })
229
+ });
230
+
213
231
  // src/commands/te-analysis/meta/index.ts
214
232
  var commands = [
215
233
  getAlertDefinitionSchema,
216
234
  listAlerts,
217
235
  getAlert,
218
236
  createAlert,
219
- updateAlert
237
+ updateAlert,
238
+ deleteAlert
220
239
  ];
221
240
  var meta_default = commands;
222
241
 
@@ -226,8 +245,8 @@ var listReports = createMcpCommand({
226
245
  description: "List report metadata accessible to the current user in the project. Supports keyword filtering and returns paginated report summaries with selectable fields.",
227
246
  flags: [
228
247
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
229
- { name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against report names, descriptions, and AI remarks; if omitted, all accessible reports are returned.", alias: "q" },
230
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: reportId, reportName, reportDesc, reportModel, aiRemark.", alias: "f" },
248
+ { name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against reportName, reportDesc, and remark; if omitted, all accessible reports are returned.", alias: "q" },
249
+ { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: reportId, reportName, reportDesc, remark, reportModel. Default fields when omitted: reportId, reportName, reportDesc, remark, reportModel.", alias: "f" },
231
250
  { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
232
251
  { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
233
252
  ],
@@ -259,18 +278,19 @@ var getReportDefinition = createMcpCommand({
259
278
  // src/commands/te-analysis/report/query-report-data.ts
260
279
  var queryReportData = createMcpCommand({
261
280
  command: "+query_report_data",
262
- description: "Query analysis data for one or more reports. Supports extra filters, group-by settings, and time range overrides. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
281
+ description: "Query analysis data for one or more reports. Supports extra filters, group-by settings, and time range overrides. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
263
282
  flags: [
264
283
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
265
284
  { name: "report_ids", type: "json", required: true, desc: "List of report IDs" },
266
285
  { name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
267
286
  { name: "group_by", type: "json", required: false, desc: "Optional group-by JSON array. See +get_groupby_schema for the structure." },
268
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
287
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
269
288
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
270
289
  { name: "start_date", type: "string", required: false, desc: "Optional start date in yyyy-MM-dd format" },
271
290
  { name: "end_date", type: "string", required: false, desc: "Optional end date in yyyy-MM-dd format" },
272
291
  { 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." },
273
292
  { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." },
293
+ { name: "sql_params", type: "json", required: false, desc: `Optional override for a SQL-model report's dynamic parameters (the \${...} placeholders; get each param's paramName/paramType/current shape via +get_report_definition). JSON array matched by paramName. Value fields by paramType: Selector/Variable use paramExpress, e.g. [{"paramName":"selector1","paramExpress":"<value>"}]; Text needs a quota operator + paramExpress (all 13 quota codes, e.g. [{"paramName":"text1","quota":"C00","paramExpress":["<value>"]}]); Number needs quota + paramExpress (numeric ops only); 13 codes incl. C00=IN, C06=BETWEEN/range, C060=BETWEEN by date, C300=CONTAIN, C04=no filter, C05=IS NULL (see the ae-analysis query_report_data reference for the full table); Time needs a quota operator + startTime/endTime (C020 <=, C030 >=, C06/C060 between, C04/C05 has/no value), NOT recentDay; PartDate is a date range (startTime+endTime). Variable has no quota; override paramExpress (custom-type values include their own quotes). Only listed params are overridden; omitted params keep the report's saved defaults. Ignored for non-SQL reports.` },
274
294
  ...clusterQueryFlags("Optional cluster query scope. Supported values: GLOBAL, SLAVE. Omit to query the current self cluster.")
275
295
  ],
276
296
  risk: "read",
@@ -279,12 +299,13 @@ var queryReportData = createMcpCommand({
279
299
  reportIds: ctx.json("report_ids"),
280
300
  filters: optionalJsonString(ctx, "filters"),
281
301
  groupBy: optionalJsonString(ctx, "group_by"),
282
- requestId: optionalString(ctx, "request_id"),
302
+ requestId: ctx.str("request_id"),
283
303
  useCache: optionalBoolean(ctx, "use_cache"),
284
304
  startDate: optionalString(ctx, "start_date"),
285
305
  endDate: optionalString(ctx, "end_date"),
286
306
  timeGranularity: optionalString(ctx, "time_granularity"),
287
307
  timeoutMinutes: optionalNumber(ctx, "timeout_minutes"),
308
+ sqlParams: optionalJsonString(ctx, "sql_params"),
288
309
  ...optionalClusterQueryArgs(ctx)
289
310
  })
290
311
  });
@@ -316,23 +337,66 @@ var createReport = createMcpCommand({
316
337
  })
317
338
  });
318
339
 
340
+ // src/commands/te-analysis/report/delete-report.ts
341
+ var deleteReport = createMcpCommand({
342
+ command: "+delete_report",
343
+ description: "Delete a report by reportId",
344
+ flags: [
345
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
346
+ { name: "report_id", type: "number", required: true, desc: "Report ID to delete" }
347
+ ],
348
+ risk: "write",
349
+ buildArgs: (ctx) => ({
350
+ projectId: ctx.num("project_id"),
351
+ reportId: ctx.num("report_id")
352
+ })
353
+ });
354
+
355
+ // src/commands/te-analysis/report/update-report.ts
356
+ var updateReport = createMcpCommand({
357
+ command: "+update_report",
358
+ description: "Update an existing report. Supports updating name, description, and QP. At least one of report_name, report_desc, or qp must be provided. When updating qp, also provide report_model. First call +get_report_definition to retrieve the current version number.",
359
+ flags: [
360
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
361
+ { name: "report_id", type: "number", required: true, desc: "Report ID to update" },
362
+ { name: "version", type: "number", required: true, desc: "Current report version number. Retrieve via +get_report_definition." },
363
+ { name: "report_name", type: "string", required: false, desc: "New report name. Omit to keep existing." },
364
+ { name: "report_desc", type: "string", required: false, desc: "New report description. Omit to keep existing." },
365
+ { name: "qp", type: "string", required: false, desc: "New QP JSON string. Omit to keep existing. When provided, also supply report_model." },
366
+ { name: "report_model", type: "number", required: false, desc: "Analysis model type integer (e.g. 1=event, 2=retention). Required when qp is provided." }
367
+ ],
368
+ risk: "write",
369
+ mcpService: "te_analysis_extend",
370
+ buildArgs: (ctx) => ({
371
+ projectId: ctx.num("project_id"),
372
+ reportId: ctx.num("report_id"),
373
+ version: ctx.num("version"),
374
+ reportName: optionalString(ctx, "report_name"),
375
+ reportDesc: optionalString(ctx, "report_desc"),
376
+ qp: optionalString(ctx, "qp"),
377
+ reportModel: optionalNumber(ctx, "report_model")
378
+ })
379
+ });
380
+
319
381
  // src/commands/te-analysis/report/index.ts
320
382
  var commands2 = [
321
383
  listReports,
322
384
  getReportDefinition,
323
385
  queryReportData,
324
- createReport
386
+ createReport,
387
+ deleteReport,
388
+ updateReport
325
389
  ];
326
390
  var report_default = commands2;
327
391
 
328
392
  // src/commands/te-analysis/dashboard/list-dashboards.ts
329
393
  var listDashboards = createMcpCommand({
330
394
  command: "+list_dashboards",
331
- description: "List dashboard metadata accessible to the current user in the project. Supports keyword filtering and returns paginated dashboard summaries with selectable fields.",
395
+ description: "List dashboard metadata accessible to the current user in the project. Supports keyword filtering and returns paginated dashboard summaries. Default returned fields: dashboardId, dashboardName, remark. Dashboard metadata exposes remark but no separate desc field.",
332
396
  flags: [
333
397
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
334
- { name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against dashboard names and AI remarks; if omitted, all accessible dashboards are returned.", alias: "q" },
335
- { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: dashboardId, dashboardName, aiRemark.", alias: "f" },
398
+ { name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against dashboard names and remarks; if omitted, all accessible dashboards are returned.", alias: "q" },
399
+ { name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: dashboardId, dashboardName, remark. Default fields when omitted: dashboardId, dashboardName, remark.", alias: "f" },
336
400
  { name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
337
401
  { name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
338
402
  ],
@@ -387,13 +451,13 @@ var getBiPanelDetail = createMcpCommand({
387
451
  // src/commands/te-analysis/dashboard/query-bi-panel-data.ts
388
452
  var queryBiPanelData = createMcpCommand({
389
453
  command: "+query_bi_panel_data",
390
- description: "Query released BI panel data. Use result_type=charts for page chart data as columns and rows, or result_type=summary for summary markdown and blocks. Call get_bi_panel_detail first to obtain pageKey, chartIds, columns, and control schemas. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
454
+ description: "Query released BI panel data. Use result_type=charts for page chart data as columns and rows, or result_type=summary for summary markdown and blocks. Call get_bi_panel_detail first to obtain pageKey, chartIds, columns, and control schemas. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
391
455
  flags: [
392
456
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
393
457
  { name: "panel_id", type: "number", required: true, desc: "BI panel ID returned by +list_bi_panels" },
394
458
  { name: "page_key", type: "string", required: true, desc: "Page key returned by +get_bi_panel_detail" },
395
459
  { name: "result_type", type: "string", required: true, desc: "Result type. Supported values: charts, summary." },
396
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
460
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
397
461
  { name: "chart_ids", type: "json", required: false, desc: "Optional chart IDs when result_type=charts. If omitted, all queryable charts on the page are queried." },
398
462
  { name: "parameter_controls", type: "json", required: false, desc: "Optional dashboard-level parameter control overrides. Each item must have controlId and one scalar value." },
399
463
  { name: "permission_controls", type: "json", required: false, desc: "Optional dashboard-level permission control values. Each item must have controlId and value. value may be one scalar or an array; allowedValues are hints, not an MCP-side whitelist." },
@@ -412,7 +476,7 @@ var queryBiPanelData = createMcpCommand({
412
476
  panelId: ctx.num("panel_id"),
413
477
  pageKey: ctx.str("page_key"),
414
478
  resultType: ctx.str("result_type"),
415
- requestId: optionalString(ctx, "request_id"),
479
+ requestId: ctx.str("request_id"),
416
480
  chartIds: optionalJson(ctx, "chart_ids"),
417
481
  parameterControls: optionalJson(ctx, "parameter_controls"),
418
482
  permissionControls: optionalJson(ctx, "permission_controls"),
@@ -445,7 +509,7 @@ var queryDashboardDetail = createMcpCommand({
445
509
  // src/commands/te-analysis/dashboard/query-dashboard-report-data.ts
446
510
  var queryDashboardReportData = createMcpCommand({
447
511
  command: "+query_dashboard_report_data",
448
- description: "Query analysis data for one or more reports in a dashboard. Supports additional filters and time range overrides. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
512
+ description: "Query analysis data for one or more reports in a dashboard. Supports additional filters and time range overrides. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
449
513
  flags: [
450
514
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
451
515
  { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID", alias: "d" },
@@ -455,7 +519,7 @@ var queryDashboardReportData = createMcpCommand({
455
519
  { 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." },
456
520
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
457
521
  { name: "report_ids", type: "json", required: false, desc: "Optional report IDs JSON array" },
458
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
522
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
459
523
  { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." },
460
524
  ...clusterQueryFlags("Optional cluster query scope. Supported values: GLOBAL, SLAVE. Omit to follow dashboard configuration.")
461
525
  ],
@@ -469,7 +533,7 @@ var queryDashboardReportData = createMcpCommand({
469
533
  timeGranularity: optionalString(ctx, "time_granularity"),
470
534
  useCache: optionalBoolean(ctx, "use_cache"),
471
535
  reportIds: optionalJson(ctx, "report_ids"),
472
- requestId: optionalString(ctx, "request_id"),
536
+ requestId: ctx.str("request_id"),
473
537
  timeoutMinutes: optionalNumber(ctx, "timeout_minutes"),
474
538
  ...optionalClusterQueryArgs(ctx)
475
539
  })
@@ -641,6 +705,101 @@ var createSpace = createMcpCommand({
641
705
  })
642
706
  });
643
707
 
708
+ // src/commands/te-analysis/dashboard/delete-dashboard.ts
709
+ var deleteDashboard = createMcpCommand({
710
+ command: "+delete_dashboard",
711
+ description: "Delete a dashboard by dashboardId",
712
+ flags: [
713
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
714
+ { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID to delete" }
715
+ ],
716
+ risk: "write",
717
+ buildArgs: (ctx) => ({
718
+ projectId: ctx.num("project_id"),
719
+ dashboardId: ctx.num("dashboard_id")
720
+ })
721
+ });
722
+
723
+ // src/commands/te-analysis/dashboard/copy-dashboard.ts
724
+ var copyDashboard = createMcpCommand({
725
+ command: "+copy_dashboard",
726
+ description: "Copy a dashboard to a new dashboard. Optionally copies its associated reports. To place the copy in a space or folder, provide to_space_id or to_folder_id.",
727
+ flags: [
728
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
729
+ { name: "dashboard_id", type: "number", required: true, desc: "Source dashboard ID to copy" },
730
+ { name: "dashboard_name", type: "string", required: true, desc: "Name for the new copied dashboard" },
731
+ { name: "report_copy", type: "boolean", required: false, desc: "Whether to also copy the associated reports. Defaults to false." },
732
+ { name: "to_space_id", type: "number", required: false, desc: "Target space ID for the copied dashboard. Omit to use the default location." },
733
+ { name: "to_folder_id", type: "number", required: false, desc: "Target folder ID inside the target space. Omit to place directly in the space root." }
734
+ ],
735
+ risk: "write",
736
+ mcpService: "te_analysis_extend",
737
+ buildArgs: (ctx) => ({
738
+ projectId: ctx.num("project_id"),
739
+ dashboardId: ctx.num("dashboard_id"),
740
+ dashboardName: ctx.str("dashboard_name"),
741
+ reportCopy: optionalBoolean(ctx, "report_copy"),
742
+ toSpaceId: optionalNumber(ctx, "to_space_id"),
743
+ toFolderId: optionalNumber(ctx, "to_folder_id")
744
+ })
745
+ });
746
+
747
+ // src/commands/te-analysis/dashboard/move-dashboard.ts
748
+ var moveDashboard = createMcpCommand({
749
+ command: "+move_dashboard",
750
+ description: "Move a dashboard to a different space or folder. Provide to_space_id to move to a space root, or both to_space_id and to_folder_id to move into a folder within that space.",
751
+ flags: [
752
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
753
+ { name: "dashboard_id", type: "number", required: true, desc: "Dashboard ID to move" },
754
+ { name: "to_space_id", type: "number", required: true, desc: "Target space ID to move the dashboard into" },
755
+ { name: "to_folder_id", type: "number", required: false, desc: "Target folder ID within the target space. Omit to place at the space root." },
756
+ { name: "from_space_id", type: "number", required: false, desc: "Source space ID the dashboard is currently in. Omit if unknown." },
757
+ { name: "from_folder_id", type: "number", required: false, desc: "Source folder ID the dashboard is currently in. Omit if unknown." }
758
+ ],
759
+ risk: "write",
760
+ mcpService: "te_analysis_extend",
761
+ buildArgs: (ctx) => ({
762
+ projectId: ctx.num("project_id"),
763
+ dashboardId: ctx.num("dashboard_id"),
764
+ toSpaceId: ctx.num("to_space_id"),
765
+ toFolderId: optionalNumber(ctx, "to_folder_id"),
766
+ fromSpaceId: optionalNumber(ctx, "from_space_id"),
767
+ fromFolderId: optionalNumber(ctx, "from_folder_id")
768
+ })
769
+ });
770
+
771
+ // src/commands/te-analysis/dashboard/list-spaces.ts
772
+ var listSpaces = createMcpCommand({
773
+ command: "+list_spaces",
774
+ description: "List spaces and folders accessible to the current user in the project as a recursive tree. Use to resolve spaceId for create_dashboard / copy_dashboard, and toSpaceId / toFolderId / fromSpaceId / fromFolderId for move_dashboard and copy_dashboard.",
775
+ flags: [
776
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" }
777
+ ],
778
+ risk: "read",
779
+ mcpService: "te_analysis_extend",
780
+ buildArgs: (ctx) => ({
781
+ projectId: ctx.num("project_id")
782
+ })
783
+ });
784
+
785
+ // src/commands/te-analysis/dashboard/freeze-dashboards.ts
786
+ var freezeDashboards = createMcpCommand({
787
+ command: "+freeze_dashboards",
788
+ description: "Freeze or unfreeze one or more dashboards. freeze=true freezes and takes scheduled jobs offline; freeze=false unfreezes and brings scheduled jobs back online.",
789
+ flags: [
790
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
791
+ { name: "dashboard_ids", type: "json", required: true, desc: "List of dashboard IDs to freeze or unfreeze" },
792
+ { name: "freeze", type: "boolean", required: true, desc: "true to freeze, false to unfreeze" }
793
+ ],
794
+ risk: "write",
795
+ mcpService: "te_analysis_extend",
796
+ buildArgs: (ctx) => ({
797
+ projectId: ctx.num("project_id"),
798
+ dashboardIds: ctx.json("dashboard_ids"),
799
+ freeze: ctx.bool("freeze")
800
+ })
801
+ });
802
+
644
803
  // src/commands/te-analysis/dashboard/index.ts
645
804
  var commands3 = [
646
805
  listDashboards,
@@ -651,23 +810,28 @@ var commands3 = [
651
810
  queryDashboardReportData,
652
811
  createDashboard,
653
812
  updateDashboard,
813
+ deleteDashboard,
814
+ copyDashboard,
815
+ moveDashboard,
654
816
  createOrUpdateDashboardNote,
655
817
  listPublicAccessLinks,
656
818
  createPublicAccessLink,
657
819
  updatePublicAccessLink,
658
- createSpace
820
+ createSpace,
821
+ listSpaces,
822
+ freezeDashboards
659
823
  ];
660
824
  var dashboard_default = commands3;
661
825
 
662
826
  // src/commands/te-analysis/model/query-adhoc.ts
663
827
  var queryAdhoc = createMcpCommand({
664
828
  command: "+query_adhoc",
665
- description: "Run ad hoc analysis with an already-built qp. For event, retention, funnel, and prop_analysis, call the matching +build_*_analysis_qp command first and pass its qp; do not handcraft qp or call get_analysis_query_schema/list_events/list_properties/list_metrics/get_metric before the builder. For distribution, attribution, heat_map, interval, path, rank_list, and sql, use the legacy schema/metadata path. Supports fields/limit/offset pagination. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
829
+ description: "Run ad hoc analysis with an already-built qp. For event, retention, funnel, and prop_analysis, call the matching +build_*_analysis_qp command first and pass its qp; do not handcraft qp or call get_analysis_query_schema/list_events/list_properties/list_metrics/get_metric before the builder. For distribution, attribution, heat_map, interval, path, rank_list, and sql, use the legacy schema/metadata path. Supports fields/limit/offset pagination. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
666
830
  flags: [
667
831
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
668
832
  { 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." },
669
833
  { name: "qp", type: "json", required: true, desc: "Query parameter JSON. For event/retention/funnel/prop_analysis, pass qp returned by the matching +build_*_analysis_qp command. Use +get_analysis_query_schema only for non-builder/manual model types." },
670
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
834
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
671
835
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use result cache. Default: true" },
672
836
  { name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5" },
673
837
  { name: "is_sort_by_columns", type: "boolean", required: false, desc: "Whether to sort query results by columns. Default: false" },
@@ -690,7 +854,7 @@ var queryAdhoc = createMcpCommand({
690
854
  projectId: ctx.num("project_id"),
691
855
  modelType: ctx.str("model_type"),
692
856
  qp: requiredJsonString(ctx, "qp"),
693
- requestId: optionalString(ctx, "request_id"),
857
+ requestId: ctx.str("request_id"),
694
858
  useCache: optionalBoolean(ctx, "use_cache"),
695
859
  zoneOffset: optionalNumber(ctx, "zone_offset"),
696
860
  isSortByColumns: optionalBoolean(ctx, "is_sort_by_columns"),
@@ -706,7 +870,7 @@ var queryAdhoc = createMcpCommand({
706
870
  // src/commands/te-analysis/model/cancel-query.ts
707
871
  var cancelQuery = createMcpCommand({
708
872
  command: "+cancel_query",
709
- description: "Cancel a running MCP query by request ID. Use this when a previous query is no longer needed, the caller or agent timed out before the query returned, the request returns fetch failed, hits an HTTP timeout, or the user asks to stop waiting. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running; call +cancel_query --request_id <same value> with the preset requestId to release it. For proactive cancellation, pass requestId to the query tool before starting it, then call cancel_query with the same value if you stop waiting. The auto-generated requestId is not available when the HTTP request fails before a response.",
873
+ description: "Cancel a running MCP query by request ID. Use this when a previous query is no longer needed, the caller or agent timed out before the query returned, the request returns fetch failed, hits an HTTP timeout, or the user asks to stop waiting. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running; call +cancel_query --request_id <same value> with the requestId supplied before starting the query. For proactive cancellation, generate and pass requestId to the query tool before starting it, then call cancel_query with the same value if you stop waiting.",
710
874
  flags: [
711
875
  { name: "request_id", type: "string", required: true, desc: "Request ID returned by a query tool in metadata.requestId, or the requestId supplied before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef." },
712
876
  { name: "reason", type: "string", required: false, desc: "Optional cancellation reason. Default: MCP_CANCEL_QUERY_TOOL." }
@@ -729,7 +893,8 @@ var buildEventAnalysisQp = createMcpCommand({
729
893
  { name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Default: total." },
730
894
  { name: "groups", type: "json", required: false, desc: "Optional group-by dimensions JSON array." },
731
895
  { name: "filters", type: "json", required: false, desc: "Optional global filters JSON array." },
732
- { name: "relation", type: "string", required: false, desc: "Optional filter relation. Supported values: and, or. Default: and." }
896
+ { name: "relation", type: "string", required: false, desc: "Optional filter relation. Supported values: and, or. Default: and." },
897
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
733
898
  ],
734
899
  risk: "read",
735
900
  buildArgs: (ctx) => ({
@@ -739,7 +904,8 @@ var buildEventAnalysisQp = createMcpCommand({
739
904
  timeParticleSize: ctx.str("time_particle_size") || void 0,
740
905
  groups: optionalJson(ctx, "groups"),
741
906
  filters: optionalJson(ctx, "filters"),
742
- relation: ctx.str("relation") || void 0
907
+ relation: ctx.str("relation") || void 0,
908
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
743
909
  })
744
910
  });
745
911
 
@@ -752,7 +918,8 @@ var buildRetentionAnalysisQp = createMcpCommand({
752
918
  { name: "time_range", type: "json", required: true, desc: "Required time range JSON for retention analysis." },
753
919
  { name: "retention", type: "json", required: true, desc: "Required retention intent JSON." },
754
920
  { name: "relation", type: "string", required: false, desc: "Optional top-level retention filter relation. Supported values: and, or. Default: and." },
755
- { name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Supported values: day, week, month." }
921
+ { name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Supported values: day, week, month." },
922
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
756
923
  ],
757
924
  risk: "read",
758
925
  buildArgs: (ctx) => ({
@@ -760,7 +927,8 @@ var buildRetentionAnalysisQp = createMcpCommand({
760
927
  timeRange: ctx.json("time_range"),
761
928
  retention: ctx.json("retention"),
762
929
  relation: ctx.str("relation") || void 0,
763
- timeParticleSize: ctx.str("time_particle_size") || void 0
930
+ timeParticleSize: ctx.str("time_particle_size") || void 0,
931
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
764
932
  })
765
933
  });
766
934
 
@@ -773,7 +941,8 @@ var buildFunnelAnalysisQp = createMcpCommand({
773
941
  { name: "time_range", type: "json", required: true, desc: "Required time range JSON for funnel analysis." },
774
942
  { name: "funnel", type: "json", required: true, desc: "Required funnel intent JSON." },
775
943
  { name: "relation", type: "string", required: false, desc: "Optional top-level funnel filter relation. Supported values: and, or. Default: and." },
776
- { name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Supported values: day, week, month." }
944
+ { name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Supported values: day, week, month." },
945
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
777
946
  ],
778
947
  risk: "read",
779
948
  buildArgs: (ctx) => ({
@@ -781,7 +950,8 @@ var buildFunnelAnalysisQp = createMcpCommand({
781
950
  timeRange: ctx.json("time_range"),
782
951
  funnel: ctx.json("funnel"),
783
952
  relation: ctx.str("relation") || void 0,
784
- timeParticleSize: ctx.str("time_particle_size") || void 0
953
+ timeParticleSize: ctx.str("time_particle_size") || void 0,
954
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
785
955
  })
786
956
  });
787
957
 
@@ -791,19 +961,21 @@ var buildPropAnalysisQp = createMcpCommand({
791
961
  description: "Build a validated prop-analysis QP from structured intent. Call before query_adhoc for prop_analysis ad-hoc analysis. Do not call get_analysis_query_schema/list_properties/list_metrics/get_metric first; the builder resolves user properties internally. This command only builds qp and does not execute query_adhoc.",
792
962
  flags: [
793
963
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
794
- { name: "prop_analysis", type: "json", required: true, desc: "Required user property analysis intent JSON." }
964
+ { name: "prop_analysis", type: "json", required: true, desc: "Required user property analysis intent JSON." },
965
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
795
966
  ],
796
967
  risk: "read",
797
968
  buildArgs: (ctx) => ({
798
969
  projectId: ctx.num("project_id"),
799
- propAnalysis: ctx.json("prop_analysis")
970
+ propAnalysis: ctx.json("prop_analysis"),
971
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
800
972
  })
801
973
  });
802
974
 
803
975
  // src/commands/te-analysis/model/drilldown-users.ts
804
976
  var drilldownUsers = createMcpCommand({
805
977
  command: "+drilldown_users",
806
- 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. Supports pagination with limit/offset. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
978
+ 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. Supports pagination with limit/offset. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
807
979
  flags: [
808
980
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
809
981
  { 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." },
@@ -825,7 +997,7 @@ var drilldownUsers = createMcpCommand({
825
997
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
826
998
  { name: "limit", type: "number", required: false, desc: "Optional limit. Default: 1000, maximum: 10000." },
827
999
  { name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." },
828
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
1000
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
829
1001
  { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
830
1002
  ],
831
1003
  risk: "read",
@@ -853,7 +1025,7 @@ var drilldownUsers = createMcpCommand({
853
1025
  useCache: optionalBoolean(ctx, "use_cache"),
854
1026
  limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
855
1027
  offset: optionalNumber(ctx, "offset"),
856
- requestId: optionalString(ctx, "request_id"),
1028
+ requestId: ctx.str("request_id"),
857
1029
  timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
858
1030
  })
859
1031
  });
@@ -861,7 +1033,7 @@ var drilldownUsers = createMcpCommand({
861
1033
  // src/commands/te-analysis/model/drilldown-user-events.ts
862
1034
  var drilldownUserEvents = createMcpCommand({
863
1035
  command: "+drilldown_user_events",
864
- 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. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
1036
+ 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. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
865
1037
  flags: [
866
1038
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
867
1039
  { name: "user_id", type: "string", required: true, desc: "User ID from drilldown_users" },
@@ -881,7 +1053,7 @@ var drilldownUserEvents = createMcpCommand({
881
1053
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
882
1054
  { name: "page_num", type: "number", required: false, desc: "Start page number. Default: 1" },
883
1055
  { name: "page_size", type: "number", required: false, desc: "Page size. Default: 1000, maximum: 10000." },
884
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
1056
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
885
1057
  { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
886
1058
  ],
887
1059
  risk: "read",
@@ -907,7 +1079,7 @@ var drilldownUserEvents = createMcpCommand({
907
1079
  useCache: optionalBoolean(ctx, "use_cache"),
908
1080
  pageNum: optionalNumber(ctx, "page_num"),
909
1081
  pageSize: optionalNumber(ctx, "page_size") ?? DEFAULT_QUERY_LIMIT,
910
- requestId: optionalString(ctx, "request_id"),
1082
+ requestId: ctx.str("request_id"),
911
1083
  timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
912
1084
  })
913
1085
  });
@@ -992,20 +1164,142 @@ var loadFilters = createMcpCommand({
992
1164
  // src/commands/te-analysis/model/get-table-columns.ts
993
1165
  var getTableColumns = createMcpCommand({
994
1166
  command: "+get_table_columns",
995
- 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.",
1167
+ description: "Query the field list of a project table. Returns column names and types for a tableRef so the table structure can be understood before SQL analysis.",
996
1168
  flags: [
997
1169
  { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
998
- { name: "catalog", type: "string", required: true, desc: "Catalog name. Default: hive" },
999
- { name: "schema", type: "string", required: true, desc: "Schema name. Default: ta" },
1000
- { name: "table", type: "string", required: true, desc: "Table name" }
1170
+ { name: "table_ref", type: "string", required: true, desc: "Table reference. Supports hive.schema.table, schema.table, or table. If only table is provided, the backend resolves it against project available tables and fails on ambiguity." }
1001
1171
  ],
1002
1172
  risk: "read",
1003
1173
  mcpService: "te_analysis_extend",
1004
1174
  buildArgs: (ctx) => ({
1005
1175
  projectId: ctx.num("project_id"),
1006
- catalog: ctx.str("catalog"),
1007
- schema: ctx.str("schema"),
1008
- table: ctx.str("table")
1176
+ tableRef: ctx.str("table_ref")
1177
+ })
1178
+ });
1179
+
1180
+ // src/commands/te-analysis/model/build-interval-analysis-qp.ts
1181
+ var buildIntervalAnalysisQp = createMcpCommand({
1182
+ command: "+build_interval_analysis_qp",
1183
+ description: "Build a validated interval-analysis QP from structured interval intent. Interval analysis measures the time elapsed between an initial event and a return event per user. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
1184
+ flags: [
1185
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1186
+ { name: "time_range", type: "json", required: true, desc: "Required time range JSON for interval analysis." },
1187
+ { name: "interval", type: "json", required: true, desc: "Interval analysis intent JSON. Required fields: initialEvent, returnEvent, window (value+unit). Optional: relationEventPropertyName, groups, filters, initialFilters, returnFilters, initialFilterRelation, returnFilterRelation." },
1188
+ { name: "relation", type: "string", required: false, desc: "Filter relation for top-level interval filters. Supported values: and, or. Default: and." },
1189
+ { name: "time_particle_size", type: "string", required: false, desc: "Time granularity. Allowed values: day, week, month. Defaults to day when omitted." },
1190
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
1191
+ ],
1192
+ risk: "read",
1193
+ buildArgs: (ctx) => ({
1194
+ projectId: ctx.num("project_id"),
1195
+ timeRange: ctx.json("time_range"),
1196
+ interval: ctx.json("interval"),
1197
+ relation: optionalString(ctx, "relation"),
1198
+ timeParticleSize: optionalString(ctx, "time_particle_size"),
1199
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
1200
+ })
1201
+ });
1202
+
1203
+ // src/commands/te-analysis/model/build-path-analysis-qp.ts
1204
+ var buildPathAnalysisQp = createMcpCommand({
1205
+ command: "+build_path_analysis_qp",
1206
+ description: "Build a validated path-analysis QP from structured path intent. Path analysis visualizes user navigation flows between events within a session. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
1207
+ flags: [
1208
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1209
+ { name: "time_range", type: "json", required: true, desc: "Required time range JSON for path analysis." },
1210
+ { name: "path", type: "json", required: true, desc: "Path analysis intent JSON. Required fields: sourceEvent, eventNames (array), sessionInterval, sessionUnit. Optional: sourceType (0=forward, 1=backward, default 0)." },
1211
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
1212
+ ],
1213
+ risk: "read",
1214
+ buildArgs: (ctx) => ({
1215
+ projectId: ctx.num("project_id"),
1216
+ timeRange: ctx.json("time_range"),
1217
+ path: ctx.json("path"),
1218
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
1219
+ })
1220
+ });
1221
+
1222
+ // src/commands/te-analysis/model/build-attribution-analysis-qp.ts
1223
+ var buildAttributionAnalysisQp = createMcpCommand({
1224
+ command: "+build_attribution_analysis_qp",
1225
+ description: "Build a validated attribution-analysis QP from structured attribution intent. Attribution analysis assigns conversion credit to touchpoint events that preceded a target conversion event. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
1226
+ flags: [
1227
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1228
+ { name: "time_range", type: "json", required: true, desc: "Required time range JSON for attribution analysis." },
1229
+ { name: "attribution", type: "json", required: true, desc: "Attribution intent JSON. Required fields: targetEvent, targetAggregation, attributionEvents (array), attributionModel (first/last/linear), window (value+unit). Optional: targetProperty, directConversion, filters, relation." },
1230
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
1231
+ ],
1232
+ risk: "read",
1233
+ buildArgs: (ctx) => ({
1234
+ projectId: ctx.num("project_id"),
1235
+ timeRange: ctx.json("time_range"),
1236
+ attribution: ctx.json("attribution"),
1237
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
1238
+ })
1239
+ });
1240
+
1241
+ // src/commands/te-analysis/model/build-heat-map-analysis-qp.ts
1242
+ var buildHeatMapAnalysisQp = createMcpCommand({
1243
+ command: "+build_heat_map_analysis_qp",
1244
+ description: "Build a validated heatmap-analysis QP from structured heatmap intent. Heatmap analysis visualizes user interaction intensity on a 2D coordinate plane (e.g. screen position). Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
1245
+ flags: [
1246
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1247
+ { name: "time_range", type: "json", required: true, desc: "Required time range JSON for heatmap analysis." },
1248
+ { name: "heat_map", type: "json", required: true, desc: "Heatmap intent JSON. Required fields: hotEvent, hotAggregation, xProp, yProp. Optional: hotProperty, filters, relation." },
1249
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
1250
+ ],
1251
+ risk: "read",
1252
+ buildArgs: (ctx) => ({
1253
+ projectId: ctx.num("project_id"),
1254
+ timeRange: ctx.json("time_range"),
1255
+ heatMap: ctx.json("heat_map"),
1256
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
1257
+ })
1258
+ });
1259
+
1260
+ // src/commands/te-analysis/model/build-rank-list-analysis-qp.ts
1261
+ var buildRankListAnalysisQp = createMcpCommand({
1262
+ command: "+build_rank_list_analysis_qp",
1263
+ description: "Build a validated rank-list-analysis QP from structured rank list intent. Rank list analysis ranks entities (users, items, etc.) by a metric value. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
1264
+ flags: [
1265
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1266
+ { name: "time_range", type: "json", required: true, desc: "Required time range JSON for rank list analysis." },
1267
+ { name: "rank_list", type: "json", required: true, desc: "Rank list intent JSON. Required fields: rankDimension (field), rankEvent, rankAggregation. Optional: rankProperty, rankType (rank/dense_rank/row_rank), orderBy (DESC/ASC), filters, relation." },
1268
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
1269
+ ],
1270
+ risk: "read",
1271
+ buildArgs: (ctx) => ({
1272
+ projectId: ctx.num("project_id"),
1273
+ timeRange: ctx.json("time_range"),
1274
+ rankList: ctx.json("rank_list"),
1275
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
1276
+ })
1277
+ });
1278
+
1279
+ // src/commands/te-analysis/model/build-distribution-analysis-qp.ts
1280
+ var buildDistributionAnalysisQp = createMcpCommand({
1281
+ command: "+build_distribution_analysis_qp",
1282
+ description: "Build a validated distribution-analysis QP from structured distribution metrics. Distribution analysis shows how a metric value is distributed across users or events. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
1283
+ flags: [
1284
+ { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1285
+ { name: "time_range", type: "json", required: true, desc: "Required time range JSON for distribution analysis." },
1286
+ { name: "distribution_metrics", type: "json", required: true, desc: "Distribution metrics JSON array. Each item: event, aggregation (A200=count/A201=active-days/A202=active-hours/A103=sum etc.). Optional per item: property, percentile, intervalType, quotaIntervalArr, filters, relation." },
1287
+ { name: "time_particle_size", type: "string", required: false, desc: "Time granularity. Allowed values: day, week, month, total. Defaults to day when omitted." },
1288
+ { name: "groups", type: "json", required: false, desc: "Optional group-by dimensions JSON array." },
1289
+ { name: "filters", type: "json", required: false, desc: "Optional global filters JSON array." },
1290
+ { name: "relation", type: "string", required: false, desc: "Optional filter relation. Supported values: and, or. Default: and." },
1291
+ { name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
1292
+ ],
1293
+ risk: "read",
1294
+ buildArgs: (ctx) => ({
1295
+ projectId: ctx.num("project_id"),
1296
+ timeRange: ctx.json("time_range"),
1297
+ distributionMetrics: ctx.json("distribution_metrics"),
1298
+ timeParticleSize: optionalString(ctx, "time_particle_size"),
1299
+ groups: optionalJson(ctx, "groups"),
1300
+ filters: optionalJson(ctx, "filters"),
1301
+ relation: optionalString(ctx, "relation"),
1302
+ authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
1009
1303
  })
1010
1304
  });
1011
1305
 
@@ -1015,6 +1309,12 @@ var commands4 = [
1015
1309
  buildRetentionAnalysisQp,
1016
1310
  buildFunnelAnalysisQp,
1017
1311
  buildPropAnalysisQp,
1312
+ buildIntervalAnalysisQp,
1313
+ buildPathAnalysisQp,
1314
+ buildAttributionAnalysisQp,
1315
+ buildHeatMapAnalysisQp,
1316
+ buildRankListAnalysisQp,
1317
+ buildDistributionAnalysisQp,
1018
1318
  queryAdhoc,
1019
1319
  cancelQuery,
1020
1320
  drilldownUsers,
@@ -1028,7 +1328,7 @@ var model_default = commands4;
1028
1328
  // src/commands/te-analysis/entity/query-entity-details.ts
1029
1329
  var queryEntityDetails = createMcpCommand({
1030
1330
  command: "+query_entity_details",
1031
- description: "Query entity detail data based on an entity ID and cluster definition. Supports display properties, sorting, and result limits. For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
1331
+ description: "Query entity detail data based on an entity ID and cluster definition. Supports display properties, sorting, and result limits. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
1032
1332
  flags: [
1033
1333
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1034
1334
  { name: "entity_id", type: "number", required: false, desc: "Optional entity ID used in multi-entity scenarios. If omitted, the default user entity is used." },
@@ -1039,7 +1339,7 @@ var queryEntityDetails = createMcpCommand({
1039
1339
  { name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
1040
1340
  { name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
1041
1341
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
1042
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
1342
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
1043
1343
  { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
1044
1344
  ],
1045
1345
  risk: "read",
@@ -1056,7 +1356,7 @@ var queryEntityDetails = createMcpCommand({
1056
1356
  limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
1057
1357
  zoneOffset: optionalNumber(ctx, "zone_offset"),
1058
1358
  useCache: optionalBoolean(ctx, "use_cache"),
1059
- requestId: optionalString(ctx, "request_id"),
1359
+ requestId: ctx.str("request_id"),
1060
1360
  timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
1061
1361
  })
1062
1362
  });
@@ -1064,7 +1364,7 @@ var queryEntityDetails = createMcpCommand({
1064
1364
  // src/commands/te-analysis/entity/query-event-details.ts
1065
1365
  var queryEventDetails = createMcpCommand({
1066
1366
  command: "+query_event_details",
1067
- description: "Query event detail data. Supports time range, filters, display properties, sorting, and result limits. Time can be specified via --relative_date_range OR (--start_time AND --end_time). For long-running or cancelable queries, provide requestId before starting. For any query that may exceed the CLI or MCP HTTP timeout, preset requestId so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. If provided, requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup.",
1367
+ description: "Query event detail data. Supports time range, filters, display properties, sorting, and result limits. Time can be specified via --relative_date_range OR (--start_time AND --end_time). For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
1068
1368
  flags: [
1069
1369
  { name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
1070
1370
  { name: "event_name", type: "string", required: true, desc: "Event name" },
@@ -1078,7 +1378,7 @@ var queryEventDetails = createMcpCommand({
1078
1378
  { name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
1079
1379
  { name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
1080
1380
  { name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
1081
- { name: "request_id", type: "string", required: false, desc: "Optional unique request ID used for tracking and cancellation. If provided, it must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. For long-running or cancelable queries, provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. The auto-generated requestId is not available when the HTTP request fails before a response, so preset requestId is required for proactive cleanup. Generated automatically if omitted. The response metadata.requestId can also be passed to cancel_query when the query is no longer needed." },
1381
+ { name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
1082
1382
  { name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
1083
1383
  ],
1084
1384
  risk: "read",
@@ -1095,7 +1395,7 @@ var queryEventDetails = createMcpCommand({
1095
1395
  limit: optionalNumber(ctx, "limit"),
1096
1396
  zoneOffset: optionalNumber(ctx, "zone_offset"),
1097
1397
  useCache: optionalBoolean(ctx, "use_cache"),
1098
- requestId: optionalString(ctx, "request_id"),
1398
+ requestId: ctx.str("request_id"),
1099
1399
  timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
1100
1400
  })
1101
1401
  });