@agent-native/core-corpus 0.200.0-nightly-20261002153252 → 0.200.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +10 -8
  3. package/corpus/templates/analytics/CHANGELOG.md +13 -0
  4. package/corpus/templates/analytics/actions/account-deep-dive.ts +1 -0
  5. package/corpus/templates/analytics/actions/bigquery.ts +1 -0
  6. package/corpus/templates/analytics/actions/builder-blog-articles.ts +1 -0
  7. package/corpus/templates/analytics/actions/configure-gong-native-insights.ts +1 -1
  8. package/corpus/templates/analytics/actions/create-session-replay-agent-link.ts +1 -0
  9. package/corpus/templates/analytics/actions/data-source-status.ts +1 -0
  10. package/corpus/templates/analytics/actions/db-admin-federated-read.ts +1 -0
  11. package/corpus/templates/analytics/actions/get-analysis.ts +3 -1
  12. package/corpus/templates/analytics/actions/get-data-program.ts +1 -0
  13. package/corpus/templates/analytics/actions/get-error-issue.ts +1 -0
  14. package/corpus/templates/analytics/actions/get-first-party-analytics-health.ts +1 -0
  15. package/corpus/templates/analytics/actions/get-session-replay-summary.ts +1 -0
  16. package/corpus/templates/analytics/actions/get-session-replay-timeline.ts +1 -0
  17. package/corpus/templates/analytics/actions/get-sql-dashboard.ts +1 -0
  18. package/corpus/templates/analytics/actions/gong-calls.ts +11 -10
  19. package/corpus/templates/analytics/actions/gong-native-insights.ts +31 -148
  20. package/corpus/templates/analytics/actions/hubspot-deals.ts +14 -15
  21. package/corpus/templates/analytics/actions/hubspot-metrics.ts +2 -1
  22. package/corpus/templates/analytics/actions/hubspot-pipelines.ts +3 -1
  23. package/corpus/templates/analytics/actions/hubspot-records.ts +1 -0
  24. package/corpus/templates/analytics/actions/list-analyses.ts +1 -0
  25. package/corpus/templates/analytics/actions/list-dashboard-folders.ts +3 -1
  26. package/corpus/templates/analytics/actions/list-data-dictionary.ts +1 -0
  27. package/corpus/templates/analytics/actions/list-data-programs.ts +2 -1
  28. package/corpus/templates/analytics/actions/list-error-issues.ts +1 -0
  29. package/corpus/templates/analytics/actions/list-session-recordings.ts +9 -8
  30. package/corpus/templates/analytics/actions/list-sql-dashboards.ts +1 -0
  31. package/corpus/templates/analytics/actions/match-error-issues.ts +1 -0
  32. package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +1 -0
  33. package/corpus/templates/analytics/actions/run-gong-native-insight.ts +121 -0
  34. package/corpus/templates/analytics/actions/search-analytics-query-catalog.ts +1 -0
  35. package/corpus/templates/analytics/actions/search-bigquery-schema.ts +1 -0
  36. package/corpus/templates/analytics/actions/search-dashboard-references.ts +1 -0
  37. package/corpus/templates/analytics/changelog/2026-09-30-external-agents-read-analytics-directly-over-mcp.md +6 -0
  38. package/corpus/templates/analytics/changelog/2026-10-02-retention-reports-now-compare-returns-from-paid-and-untagged.md +6 -0
  39. package/corpus/templates/analytics/server/lib/analytics-mcp.ts +19 -0
  40. package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +88 -2
  41. package/corpus/templates/analytics/server/lib/dashboards-store.ts +57 -10
  42. package/corpus/templates/analytics/server/lib/gong-native-operations.ts +35 -0
  43. package/corpus/templates/analytics/server/lib/real-data-actions.ts +4 -1
  44. package/corpus/templates/analytics/server/plugins/agent-chat.ts +2 -8
  45. package/corpus/templates/brain/CHANGELOG.md +6 -0
  46. package/corpus/templates/calendar/CHANGELOG.md +6 -0
  47. package/corpus/templates/calendar/app/hooks/use-events.ts +10 -5
  48. package/corpus/templates/calendar/app/hooks/use-overlay-people.ts +7 -1
  49. package/corpus/templates/clips/CHANGELOG.md +20 -0
  50. package/corpus/templates/clips/actions/create-recording.ts +1 -2
  51. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +2 -2
  52. package/corpus/templates/clips/app/lib/local-recording-upload.ts +2 -3
  53. package/corpus/templates/clips/app/routes/record.tsx +1 -1
  54. package/corpus/templates/clips/changelog/2026-10-02-temporary-upload-authorization-failures-no-longer-trigger-un.md +6 -0
  55. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +13 -7
  56. package/corpus/templates/content/CHANGELOG.md +17 -0
  57. package/corpus/templates/design/CHANGELOG.md +15 -0
  58. package/corpus/templates/design/actions/generate-design.ts +1 -1
  59. package/corpus/templates/design/app/pages/DesignEditor.tsx +75 -31
  60. package/corpus/templates/design/app/pages/design-editor/commands/publish-visual-edit-pending.ts +105 -6
  61. package/corpus/templates/design/changelog/2026-10-01-live-visual-edits-stay-in-sync-when-your-app-hot-reloads.md +6 -0
  62. package/corpus/templates/dispatch/CHANGELOG.md +10 -0
  63. package/corpus/templates/forms/CHANGELOG.md +6 -0
  64. package/corpus/templates/mail/CHANGELOG.md +4 -0
  65. package/corpus/templates/plan/CHANGELOG.md +10 -0
  66. package/corpus/templates/slides/CHANGELOG.md +21 -0
  67. package/package.json +1 -1
  68. package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +0 -12
package/corpus/README.md CHANGED
@@ -32,4 +32,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core-corpus/corpu
32
32
 
33
33
  ## Generated Counts
34
34
 
35
- - template files: 11025
35
+ - template files: 11031
@@ -12,13 +12,15 @@ dive that asks what happened in customer conversations.
12
12
 
13
13
  ## Actions
14
14
 
15
- - `gong-native-insights` — one provider-native qualitative synthesis operation
16
- (`ask_account`, `ask_deal`, or `generate_brief`) through Gong's connected MCP.
17
- Use it for themes, risks, summaries, and deck narrative when the native tools
18
- are connected. One action invocation makes at most one Gong AI request; omit
19
- `operation` to inspect its schemas without spending a credit request, and set
20
- `allowCreditRequest=true` only for the one consolidated request you intend to
21
- send. Paid calls also require a workspace owner to enable them once with
15
+ - `gong-native-insights` — lists the connected provider-native qualitative
16
+ synthesis operations (`ask_account`, `ask_deal`, `generate_brief`) and their
17
+ schemas. It never calls Gong AI or spends a credit request.
18
+ - `run-gong-native-insight` — sends one of those operations through Gong's
19
+ connected MCP. Use it for themes, risks, summaries, and deck narrative when
20
+ the native tools are connected. One invocation makes at most one Gong AI
21
+ request; set `allowCreditRequest=true` only for the one consolidated request
22
+ you intend to send, and each paid request asks for approval. Paid calls also
23
+ require a workspace owner to enable them once with
22
24
  `configure-gong-native-insights`; the policy defaults off and disabling it
23
25
  never blocks the raw evidence path.
24
26
  - `account-deep-dive` — first choice for named account/deal deep dives that
@@ -39,7 +41,7 @@ native/indexed search can answer the question.
39
41
 
40
42
  ## Route Synthesis and Evidence Separately
41
43
 
42
- - Use `gong-native-insights` for qualitative synthesis where Gong may retrieve
44
+ - Use `run-gong-native-insight` for qualitative synthesis where Gong may retrieve
43
45
  and analyze evidence internally. Its result is provider synthesis: coverage
44
46
  is unknown and raw transcript evidence is unavailable.
45
47
  - Use `gong-calls` or `provider-corpus-job` for quotes, exact counts, transcript
@@ -3,15 +3,28 @@
3
3
  All notable user-facing changes to Agent-Native Analytics are documented here. Open it any
4
4
  time from the command menu (Cmd+K → "What's new") or from Settings.
5
5
 
6
+ ## 2026-10-02
7
+
8
+ ### Improved
9
+
10
+ - Retention reports now compare returns from paid and untagged signups.
11
+
6
12
  ## 2026-10-01
7
13
 
8
14
  ### Improved
9
15
 
16
+ - Clear all resets every Sessions filter in one click.
17
+ - The first-party retention chart now splits 1-7d return into paid and untagged signups, and a Chat Readiness at Prompt panel shows whether AI was ready and how many prompts got no reply.
10
18
  - Error issues in Monitoring link straight to the chat thread that failed, and one underlying error now stays a single issue instead of splitting after each deploy
11
19
  - The observability settings tab is now labeled Observability.
12
20
 
13
21
  ## 2026-09-30
14
22
 
23
+ ### Added
24
+
25
+ - External agents connected over MCP can read dashboards, saved analyses, the data dictionary, blog articles and provider data directly, without handing the question to the Analytics agent.
26
+ - With the Sessions triage Lab on, filter sessions by events they did or didn't send, see app events and failed actions on replay timelines, and browse an event catalog.
27
+
15
28
  ### Improved
16
29
 
17
30
  - Removed excess spacing above the sidebar footer
@@ -417,6 +417,7 @@ export default defineAction({
417
417
  }),
418
418
  http: { method: "GET" },
419
419
  readOnly: true,
420
+ mcpTool: true,
420
421
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
421
422
  grounding: true,
422
423
  run: async (args) => {
@@ -127,6 +127,7 @@ export default defineAction({
127
127
  sql: z.string().describe("SQL query to execute"),
128
128
  }),
129
129
  readOnly: true,
130
+ mcpTool: false,
130
131
  toolCallable: true,
131
132
  grounding: true,
132
133
  run: async (args, context?: ActionRunContext) => {
@@ -216,6 +216,7 @@ export default defineAction({
216
216
  }),
217
217
  http: { method: "GET" },
218
218
  readOnly: true,
219
+ mcpTool: true,
219
220
  grounding: true,
220
221
  run: async (args, context) => {
221
222
  return listBuilderBlogArticles(args, context);
@@ -5,7 +5,7 @@ import { writeGongNativeInsightsPolicy } from "../server/lib/gong-native-policy"
5
5
 
6
6
  export default defineAction({
7
7
  description:
8
- "Enable or disable paid Gong native semantic operations for the current workspace. Enabling this permits individually authorized gong-native-insights calls to consume Gong credits; it does not send a Gong request by itself. Disable it to fail closed for every semantic request while keeping raw Gong evidence actions available.",
8
+ "Enable or disable paid Gong native semantic operations for the current workspace. Enabling this permits individually authorized run-gong-native-insight calls to consume Gong credits; it does not send a Gong request by itself. Disable it to fail closed for every semantic request while keeping raw Gong evidence actions available.",
9
9
  schema: z.object({
10
10
  enabled: z
11
11
  .boolean()
@@ -28,4 +28,5 @@ export default defineAction({
28
28
  });
29
29
  },
30
30
  readOnly: true,
31
+ mcpTool: false,
31
32
  });
@@ -96,6 +96,7 @@ export default defineAction({
96
96
  ),
97
97
  }),
98
98
  http: { method: "GET" },
99
+ mcpTool: true,
99
100
  run: async (args) => {
100
101
  const ctx = tryRequestCredentialContext();
101
102
  if (!ctx) {
@@ -22,6 +22,7 @@ export default defineAction({
22
22
  },
23
23
  http: { method: "POST" },
24
24
  readOnly: true,
25
+ mcpTool: false,
25
26
  grounding: true,
26
27
  run: async (args, ctx) => {
27
28
  const admin = await requireDbAdminContextFromRequest(ctx);
@@ -14,7 +14,8 @@ import {
14
14
  } from "../server/lib/dashboards-store";
15
15
 
16
16
  export default defineAction({
17
- description: "Get a saved ad-hoc analysis by ID, including its full results.",
17
+ description:
18
+ "Get a saved ad-hoc analysis by ID, including its question, data sources, and full results. Use list-analyses to find IDs.",
18
19
  schema: z.object({
19
20
  id: z.string().describe("The analysis ID"),
20
21
  reviewPreview: z
@@ -31,6 +32,7 @@ export default defineAction({
31
32
  }),
32
33
  http: { method: "GET" },
33
34
  readOnly: true,
35
+ mcpTool: true,
34
36
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
35
37
  mcpApp: {
36
38
  compactCatalog: true,
@@ -19,6 +19,7 @@ export default defineAction({
19
19
  }),
20
20
  http: { method: "GET" },
21
21
  readOnly: true,
22
+ mcpTool: true,
22
23
  run: async (args) => {
23
24
  const ctx = getCredentialContext();
24
25
  if (!ctx) throw new Error("No authenticated context for get-data-program.");
@@ -28,6 +28,7 @@ export default defineAction({
28
28
  }),
29
29
  http: { method: "GET" },
30
30
  readOnly: true,
31
+ mcpTool: true,
31
32
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
32
33
  grounding: true,
33
34
  run: async (args) => {
@@ -79,6 +79,7 @@ export default defineAction({
79
79
  outputSchema: healthSchema,
80
80
  http: { method: "GET" },
81
81
  readOnly: true,
82
+ mcpTool: true,
82
83
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
83
84
  run: async () => {
84
85
  const scope = resolveScope();
@@ -21,6 +21,7 @@ export default defineAction({
21
21
  }),
22
22
  http: { method: "GET" },
23
23
  readOnly: true,
24
+ mcpTool: true,
24
25
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
25
26
  grounding: true,
26
27
  run: async (args) => {
@@ -31,6 +31,7 @@ export default defineAction({
31
31
  }),
32
32
  http: { method: "GET" },
33
33
  readOnly: true,
34
+ mcpTool: true,
34
35
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
35
36
  grounding: true,
36
37
  run: async (args) => {
@@ -44,6 +44,7 @@ export default defineAction({
44
44
  }),
45
45
  http: { method: "GET" },
46
46
  readOnly: true,
47
+ mcpTool: true,
47
48
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
48
49
  mcpApp: {
49
50
  compactCatalog: true,
@@ -487,12 +487,13 @@ function normalizeGongDate(
487
487
 
488
488
  export default defineAction({
489
489
  readOnly: true,
490
+ mcpTool: true,
490
491
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
491
492
  maxResultChars: 100_000,
492
493
  description:
493
- "Query bounded Gong sales-call evidence. Pass --users for the user list, --transcript for one transcript, or --company for a bounded search by company/domain/person/email. Without --company, the action lists calls in the date window; set exhaustive=true only for a small bounded cohort of fewer than 500 records, not a broad org-wide export. For account-level transcript mention questions, transcriptQuery performs a case-insensitive local scan after batched transcript retrieval and returns coverage counts plus snippets; it is not Gong's server-side keyword search. Use includeTranscripts=true for bounded qualitative context. For broad keyword, tracker, cross-account, or absence-sensitive work, use provider-api-catalog/provider-api-docs, stage the raw Gong API response, then use query-staged-dataset or a Data Program; use provider-corpus-job only when raw transcript bodies are required.",
494
+ "Query bounded Gong sales-call evidence. Pass --users for the user list, --transcript for one transcript, or --company for a bounded call search; without --company, lists calls in the date window. For broad keyword, tracker, cross-account, or absence-sensitive work, stage the raw Gong API response via provider-api-catalog/provider-api-docs/provider-api-request, then use query-staged-dataset or a Data Program; use provider-corpus-job only for durable scans that require raw transcript bodies.",
494
495
  schema: z.object({
495
- users: cliBoolean.optional().describe("Set to true to list Gong users"),
496
+ users: cliBoolean.optional().describe("List Gong users"),
496
497
  transcript: z.string().optional().describe("Call ID to get transcript"),
497
498
  rawTranscript: cliBoolean
498
499
  .optional()
@@ -514,7 +515,7 @@ export default defineAction({
514
515
  .max(200)
515
516
  .optional()
516
517
  .describe(
517
- "Maximum number of calls to return for call searches (default 8, max 200). Use 5-8 for quick checks, 20-50 for thorough account analysis, 100-200 for large-scale coverage.",
518
+ "Max calls to return (default 8). Use 5-8 for quick checks, 20-50 for thorough account analysis, 100-200 for large-scale coverage.",
518
519
  ),
519
520
  includeTranscripts: cliBoolean
520
521
  .optional()
@@ -528,7 +529,7 @@ export default defineAction({
528
529
  .max(MAX_GONG_TRANSCRIPT_LIMIT)
529
530
  .optional()
530
531
  .describe(
531
- "Number of matching calls to load transcripts for when includeTranscripts=true (default 3, max 50). Use 3-5 for a first pass; increase to 10-20+ for thorough account analysis.",
532
+ "Matching calls to load transcripts for when includeTranscripts=true (default 3). Use 3-5 for a first pass, 10-20+ for thorough account analysis.",
532
533
  ),
533
534
  transcriptMaxChars: z.coerce
534
535
  .number()
@@ -537,13 +538,13 @@ export default defineAction({
537
538
  .max(MAX_TRANSCRIPT_MAX_CHARS)
538
539
  .optional()
539
540
  .describe(
540
- "Maximum transcript characters to return per call (default 8000, max 100000). Batched results also share a 60000-character aggregate excerpt budget. Use the default for analysis; raise it only when the user asks for more quoted detail.",
541
+ "Max transcript characters per call (default 8000). Batched results also share a 60000-character aggregate excerpt budget. Use the default for analysis; raise it only when the user asks for more quoted detail.",
541
542
  ),
542
543
  transcriptQuery: z
543
544
  .string()
544
545
  .optional()
545
546
  .describe(
546
- "Case-insensitive phrase to search inside matching call transcripts after batched retrieval. Use only for bounded account/call searches where the matching set is already small. For broad cohort or exhaustive absence research, use the raw Gong API tracker/staging path plus query-staged-dataset or a Data Program, or provider-corpus-job when raw transcript bodies are required. Returns coverage counts and short snippets only, not full transcripts.",
547
+ "Case-insensitive phrase for a local scan of matching call transcripts after batched retrieval; not Gong's server-side keyword search. Use only for bounded account-level mention questions where the matching call set is already small. Returns coverage counts and short snippets, not full transcripts.",
547
548
  ),
548
549
  transcriptScanLimit: z.coerce
549
550
  .number()
@@ -552,24 +553,24 @@ export default defineAction({
552
553
  .max(MAX_TRANSCRIPT_SCAN_LIMIT)
553
554
  .optional()
554
555
  .describe(
555
- "Maximum number of matching calls whose transcripts should be fetched and searched when transcriptQuery is set (default 50, max 200). Combine with exhaustive=true and after/before for defensible bounded coverage.",
556
+ "Max matching calls whose transcripts are fetched and searched when transcriptQuery is set (default 50). Combine with exhaustive=true and after/before for defensible bounded coverage.",
556
557
  ),
557
558
  exhaustive: cliBoolean
558
559
  .optional()
559
560
  .describe(
560
- "Return EVERY matching call in the window instead of stopping at `limit`; without company, return every call page only for a small bounded cohort of fewer than 500 records. Cohorts at or above 500 fail closed with guidance to use provider-api-request staging and query-staged-dataset or a Data Program. By default this is metadata-only. With includeTranscripts=true, transcripts are fetched in batches and explicit coverage is returned. For broad or absence-sensitive work, prefer the raw Gong API tracker/staging path plus query-staged-dataset or a Data Program; use provider-corpus-job for durable raw-transcript scans. Always bound this with after/before or a small days window.",
561
+ "Return EVERY matching call in the window instead of stopping at `limit`. Without company, use only for a small bounded cohort of fewer than 500 records, not a broad org-wide export. Cohorts at or above 500 fail closed with staging guidance. Metadata-only unless includeTranscripts=true, which fetches transcripts in batches and returns explicit coverage. Always bound this with after/before or a small days window.",
561
562
  ),
562
563
  after: z
563
564
  .string()
564
565
  .optional()
565
566
  .describe(
566
- "Only include calls on/after this date (ISO yyyy-mm-dd or full timestamp), e.g. a deal's closed-won date. Sets the window start and overrides `days` for the start bound.",
567
+ "Only include calls on/after this date (ISO yyyy-mm-dd or full timestamp), e.g. a deal's closed-won date. Overrides `days` for the window start.",
567
568
  ),
568
569
  before: z
569
570
  .string()
570
571
  .optional()
571
572
  .describe(
572
- "Only include calls on/before this date (ISO yyyy-mm-dd or full timestamp). Sets the window end.",
573
+ "Only include calls on/before this date (ISO yyyy-mm-dd or full timestamp).",
573
574
  ),
574
575
  }),
575
576
  http: { method: "GET" },
@@ -1,167 +1,50 @@
1
1
  import { defineAction } from "@agent-native/core/action";
2
- import {
3
- callMcpTool,
4
- listVisibleMcpTools,
5
- type AppMcpTool,
6
- } from "@agent-native/core/mcp-client";
7
2
  import { z } from "zod";
8
3
 
9
- import { readGongNativeInsightsPolicy } from "../server/lib/gong-native-policy";
10
-
11
- const GONG_NATIVE_OPERATIONS = [
12
- "ask_account",
13
- "ask_deal",
14
- "generate_brief",
15
- ] as const;
16
-
17
- type GongNativeOperation = (typeof GONG_NATIVE_OPERATIONS)[number];
18
-
19
- function operationName(value: string): string {
20
- return value.trim().toLowerCase().replace(/-/g, "_");
21
- }
22
-
23
- function gongNativeTools(tools: AppMcpTool[]): AppMcpTool[] {
24
- const names = new Set<string>(GONG_NATIVE_OPERATIONS);
25
- return tools.filter((tool) => names.has(operationName(tool.name)));
26
- }
27
-
28
- function selectTool(
29
- tools: AppMcpTool[],
30
- operation: GongNativeOperation,
31
- ): AppMcpTool | null {
32
- const matches = tools.filter(
33
- (tool) => operationName(tool.name) === operation,
34
- );
35
- if (matches.length === 1) return matches[0];
36
- const gongNamed = matches.filter((tool) => /gong/i.test(tool.serverId));
37
- return gongNamed.length === 1 ? gongNamed[0] : null;
38
- }
4
+ import {
5
+ gongNativeOperationName,
6
+ listGongNativeTools,
7
+ } from "../server/lib/gong-native-operations";
39
8
 
40
9
  export default defineAction({
41
10
  description:
42
- "Use Gong's official MCP semantic operations for one bounded qualitative synthesis request. Omit operation to inspect the connected schemas without spending Gong credits. Paid calls fail closed unless configure-gong-native-insights has enabled them for this workspace and this invocation sets allowCreditRequest=true. With operation, pass one consolidated arguments object; each invocation independently consumes Gong credits. Use this only for themes, risks, summaries, and deck narrative. For transcripts, quotes, counts, source records, or absence/exhaustive claims use gong-calls or the provider corpus evidence path instead.",
43
- schema: z.object({
44
- operation: z
45
- .enum(GONG_NATIVE_OPERATIONS)
46
- .optional()
47
- .describe(
48
- "Official Gong MCP operation. Omit to list the currently connected operation schemas without calling Gong AI.",
49
- ),
50
- allowCreditRequest: z
51
- .boolean()
52
- .default(false)
53
- .describe(
54
- "Explicitly authorize this one Gong semantic request. Leave false while inspecting schemas or when the workspace should not spend Gong credits.",
55
- ),
56
- arguments: z
57
- .record(z.string(), z.unknown())
58
- .default({})
59
- .describe(
60
- "Arguments passed unchanged to the connected Gong MCP operation. Consolidate related questions into one request and narrow the entity/date scope.",
61
- ),
62
- }),
11
+ "List the Gong native semantic operations (ask_account, ask_deal, generate_brief) connected in this request scope, with their input schemas. This never calls Gong AI or consumes Gong credits. To send one paid qualitative synthesis request, call run-gong-native-insight with the chosen operation. For transcripts, quotes, counts, source records, or absence/exhaustive claims use gong-calls or the provider corpus evidence path instead.",
12
+ // Paid execution moved to run-gong-native-insight. Reject its arguments here
13
+ // instead of silently returning a listing to an older caller.
14
+ schema: z.strictObject(
15
+ {},
16
+ {
17
+ error: (issue) =>
18
+ issue.code === "unrecognized_keys"
19
+ ? `gong-native-insights only lists operations and takes no arguments (got ${issue.keys.join(", ")}). Send a paid Gong request with run-gong-native-insight.`
20
+ : undefined,
21
+ },
22
+ ),
63
23
  readOnly: true,
64
24
  parallelSafe: true,
65
- needsApproval: ({ operation, allowCreditRequest }) =>
66
- Boolean(operation && allowCreditRequest),
25
+ mcpTool: true,
67
26
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
68
27
  http: false,
69
- grounding: true,
70
- run: async ({ operation, allowCreditRequest, arguments: args }) => {
71
- const tools = gongNativeTools(await listVisibleMcpTools());
72
- if (!operation) {
73
- return {
74
- connected: tools.length > 0,
75
- creditRequests: 0,
76
- creditUnit: "request",
77
- evidenceMode: "provider-synthesis",
78
- rawEvidenceAvailable: false,
79
- operations: tools.map((tool) => ({
80
- operation: operationName(tool.name),
81
- serverId: tool.serverId,
82
- description: tool.description,
83
- inputSchema: tool.inputSchema,
84
- })),
85
- evidenceFallbackAction: "gong-calls",
86
- guidance:
87
- tools.length > 0
88
- ? "Choose one operation and make one consolidated, narrowly scoped request. Inspecting this catalog did not call Gong AI or consume a Gong credit request."
89
- : "No official Gong semantic MCP operations are connected in this request scope. Use gong-calls for bounded evidence, or connect Gong MCP before using the synthesis path.",
90
- };
91
- }
92
-
93
- if (!allowCreditRequest) {
94
- return {
95
- connected: tools.length > 0,
96
- operation,
97
- blocked: true,
98
- creditRequests: 0,
99
- creditUnit: "request",
100
- evidenceMode: "provider-synthesis",
101
- rawEvidenceAvailable: false,
102
- evidenceFallbackAction: "gong-calls",
103
- guidance:
104
- "This Gong semantic request was not sent. Set allowCreditRequest=true only after choosing one consolidated, narrowly scoped request; use gong-calls for evidence retrieval without Gong AI synthesis.",
105
- };
106
- }
107
-
108
- const policy = await readGongNativeInsightsPolicy();
109
- if (!policy.enabled) {
110
- return {
111
- connected: tools.length > 0,
112
- operation,
113
- blocked: true,
114
- blockedBy: "workspace-policy",
115
- policy,
116
- creditRequests: 0,
117
- creditUnit: "request",
118
- evidenceMode: "provider-synthesis",
119
- rawEvidenceAvailable: false,
120
- evidenceFallbackAction: "gong-calls",
121
- guidance:
122
- "This Gong semantic request was not sent because paid native insights are disabled for this workspace. An authorized user can enable them with configure-gong-native-insights; use gong-calls for evidence retrieval in the meantime.",
123
- };
124
- }
125
-
126
- const tool = selectTool(tools, operation);
127
- if (!tool) {
128
- return {
129
- connected: tools.length > 0,
130
- operation,
131
- creditRequests: 0,
132
- creditUnit: "request",
133
- evidenceMode: "provider-synthesis",
134
- rawEvidenceAvailable: false,
135
- error:
136
- tools.length === 0
137
- ? "No official Gong semantic MCP operations are connected in this request scope."
138
- : `The ${operation} operation is missing or ambiguous across connected MCP servers.`,
139
- availableOperations: tools.map((candidate) => ({
140
- operation: operationName(candidate.name),
141
- serverId: candidate.serverId,
142
- })),
143
- evidenceFallbackAction: "gong-calls",
144
- };
145
- }
146
-
147
- const startedAt = Date.now();
148
- const result = await callMcpTool(tool.serverId, tool.name, args);
28
+ run: async () => {
29
+ const tools = await listGongNativeTools();
149
30
  return {
150
- connected: true,
151
- source: "gong-native-mcp",
152
- operation,
153
- creditRequests: 1,
31
+ connected: tools.length > 0,
32
+ creditRequests: 0,
154
33
  creditUnit: "request",
155
- durationMs: Date.now() - startedAt,
156
34
  evidenceMode: "provider-synthesis",
157
- synthesisOnly: true,
158
35
  rawEvidenceAvailable: false,
159
- coverageComplete: false,
160
- coverageUnknown: true,
161
- result,
36
+ operations: tools.map((tool) => ({
37
+ operation: gongNativeOperationName(tool.name),
38
+ serverId: tool.serverId,
39
+ description: tool.description,
40
+ inputSchema: tool.inputSchema,
41
+ })),
42
+ executionAction: "run-gong-native-insight",
162
43
  evidenceFallbackAction: "gong-calls",
163
44
  guidance:
164
- "Treat this as Gong-generated qualitative synthesis, not transcript evidence. Do not use it for verbatim quotes, exact counts, source-record claims, or proof of absence; route those to gong-calls or the provider corpus evidence path.",
45
+ tools.length > 0
46
+ ? "Choose one operation and send one consolidated, narrowly scoped request with run-gong-native-insight. Inspecting this catalog did not call Gong AI or consume a Gong credit request."
47
+ : "No official Gong semantic MCP operations are connected in this request scope. Use gong-calls for bounded evidence, or connect Gong MCP before using the synthesis path.",
165
48
  };
166
49
  },
167
50
  });
@@ -426,51 +426,50 @@ function buildGuidance(options: {
426
426
 
427
427
  export default defineAction({
428
428
  readOnly: true,
429
+ mcpTool: true,
429
430
  description:
430
- "Get HubSpot deals with normalized stage, pipeline, owner, forecast, and NBM fields. This is a bounded deal analytics shortcut, not the full HubSpot capability surface. Use query for a specific customer/deal/account deep dive. For cohorts like products field = Publish, closed-won, pipeline = New Business, or close date in a range, use the structured product, pipeline, closedStatus, closedDateFrom, and closedDateTo filters instead of query when the answer is the deal list itself. If the cohort feeds a cross-source join, transcript/message/ticket search, exhaustive absence check, or downstream code/corpus workflow, prefer provider-api-catalog/provider-api-request with provider = hubspot and stageAs so the cohort is available as a staged dataset. Both paths are bounded: at most limit deals are returned (default 25, max 200). HubSpot search returns a total but no server-side aggregates and cannot page past 10,000 matches for one query; compute metrics on filtered/projected rows, and split larger cohorts into non-overlapping date windows while reporting coverage. The structured-filter path returns total as the matched count and a truncated flag; page with offset (or narrow filters) instead of expecting the whole cohort in one call, since a full enriched cohort can be several MB and overruns extension and context budgets. For non-deal CRM records use hubspot-records; for arbitrary HubSpot endpoints, filters, associations, batch APIs, or payloads use provider-api-catalog/provider-api-docs/provider-api-request with provider = hubspot.",
431
+ "Get HubSpot deals with normalized stage, pipeline, owner, forecast, and NBM fields. This is a bounded deal analytics shortcut, not the full HubSpot capability surface. Use query for a specific customer/deal/account deep dive. For cohorts, use the structured product, pipeline, closedStatus, closedDateFrom, and closedDateTo filters instead of query when the answer is the deal list itself. If the cohort feeds a cross-source join, transcript/message/ticket search, exhaustive absence check, or downstream code/corpus workflow, prefer provider-api-request with provider = hubspot and stageAs so the cohort is available as a staged dataset. HubSpot search returns a total but no server-side aggregates and cannot page past 10,000 matches for one query; compute metrics on filtered/projected rows, and split larger cohorts into non-overlapping date windows while reporting coverage. The structured-filter path also returns a truncated flag; page with offset (or narrow filters) instead of expecting the whole cohort in one call, since a full enriched cohort can be several MB and overruns extension and context budgets. For non-deal CRM records use hubspot-records; for arbitrary HubSpot endpoints, filters, associations, batch APIs, or payloads use provider-api-catalog/provider-api-docs/provider-api-request with provider = hubspot.",
431
432
  schema: z.object({
432
433
  properties: StringListSchema.describe(
433
- "Optional comma-separated extra HubSpot deal property names to include.",
434
+ "Comma-separated extra HubSpot deal property names to include.",
434
435
  ),
435
436
  owner: z
436
437
  .string()
437
438
  .optional()
438
- .describe("Optional owner name filter, case-insensitive."),
439
+ .describe("Owner name filter, case-insensitive."),
439
440
  product: z
440
441
  .string()
441
442
  .optional()
442
- .describe(
443
- "Optional structured filter for the HubSpot deals products field, e.g. Publish. Do not put product-field filters in query.",
444
- ),
443
+ .describe("Filter on the HubSpot deals products field, e.g. Publish."),
445
444
  productMatch: TextMatchSchema.default("token").describe(
446
- "How to match the products field: token for multi-select values, contains for substring, exact for exact full-field match.",
445
+ "How to match the products field: token for multi-select values, contains for substring, exact for full-field match.",
447
446
  ),
448
447
  pipeline: z
449
448
  .string()
450
449
  .optional()
451
450
  .describe(
452
- "Optional structured filter for HubSpot deal pipeline id or label, case-insensitive contains match, e.g. New Business.",
451
+ "Deal pipeline id or label, case-insensitive contains match, e.g. New Business.",
453
452
  ),
454
453
  closedStatus: ClosedStatusSchema.default("any").describe(
455
- "Optional structured stage filter based on normalized HubSpot pipeline stage metadata.",
454
+ "Stage filter based on normalized HubSpot pipeline stage metadata.",
456
455
  ),
457
456
  closedDateFrom: z
458
457
  .string()
459
458
  .optional()
460
459
  .describe(
461
- "Optional inclusive close-date lower bound for deals, YYYY-MM-DD or ISO date/time.",
460
+ "Inclusive close-date lower bound, YYYY-MM-DD or ISO date/time.",
462
461
  ),
463
462
  closedDateTo: z
464
463
  .string()
465
464
  .optional()
466
465
  .describe(
467
- "Optional inclusive close-date upper bound for deals, YYYY-MM-DD or ISO date/time.",
466
+ "Inclusive close-date upper bound, YYYY-MM-DD or ISO date/time.",
468
467
  ),
469
468
  query: z
470
469
  .string()
471
470
  .optional()
472
471
  .describe(
473
- "Optional HubSpot full-text deal search query, such as a company name, deal name, domain, or keyword. Use for customer/deal deep dives. Do not use query as a substitute for field-specific product, pipeline, stage, or date filters.",
472
+ "HubSpot full-text deal search, such as a company name, deal name, domain, or keyword. Not a substitute for the product, pipeline, stage, or date filters.",
474
473
  ),
475
474
  limit: z.coerce
476
475
  .number()
@@ -479,7 +478,7 @@ export default defineAction({
479
478
  .max(200)
480
479
  .default(25)
481
480
  .describe(
482
- "Maximum deals to return. Applies to BOTH full-text query results and structured-filter cohorts. The structured-filter path returns at most this many enriched deals (use total for the true matched count and offset to page).",
481
+ "Maximum deals to return on BOTH the full-text query and structured-filter paths. Use total for the true matched count.",
483
482
  ),
484
483
  offset: z.coerce
485
484
  .number()
@@ -488,12 +487,12 @@ export default defineAction({
488
487
  .max(HUBSPOT_SEARCH_RESULT_CAP - 1)
489
488
  .default(0)
490
489
  .describe(
491
- "Number of structured-filter results to skip before returning limit deals. Use for paging through a large cohort; ignored when query is provided.",
490
+ "Structured-filter results to skip when paging; ignored when query is provided.",
492
491
  ),
493
492
  after: z
494
493
  .string()
495
494
  .optional()
496
- .describe("Optional HubSpot pagination cursor for query results."),
495
+ .describe("HubSpot pagination cursor for query results."),
497
496
  }),
498
497
  http: { method: "GET" },
499
498
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
@@ -9,8 +9,9 @@ import {
9
9
 
10
10
  export default defineAction({
11
11
  readOnly: true,
12
+ mcpTool: true,
12
13
  description:
13
- "Get computed HubSpot sales metrics: win rate, ACV, pipeline value, etc.",
14
+ "Get computed HubSpot sales metrics such as win rate, ACV, and pipeline value, aggregated from deals in the configured metrics pipelines.",
14
15
  schema: z.object({}),
15
16
  http: { method: "GET" },
16
17
  grounding: true,
@@ -5,7 +5,9 @@ import { getDealPipelines, getVisiblePipelines } from "../server/lib/hubspot";
5
5
 
6
6
  export default defineAction({
7
7
  readOnly: true,
8
- description: "Get HubSpot deal pipelines and their stages.",
8
+ mcpTool: true,
9
+ description:
10
+ "Get the visible HubSpot deal pipelines and their stages. Pass a pipeline ID or label to hubspot-deals to filter deals.",
9
11
  schema: z.object({}),
10
12
  http: { method: "GET" },
11
13
  grounding: true,
@@ -17,6 +17,7 @@ const StringListSchema = z.preprocess((value) => {
17
17
 
18
18
  export default defineAction({
19
19
  readOnly: true,
20
+ mcpTool: true,
20
21
  description:
21
22
  "Search or list HubSpot CRM records across contacts, companies, deals, and tickets. Use this for HubSpot data that is not just deal pipeline metrics. This is a convenience reader; for unsupported object types, associations, custom filters, batch APIs, pagination modes, or any HubSpot endpoint this does not model, use provider-api-catalog/provider-api-docs/provider-api-request with provider = hubspot.",
22
23
  schema: z.object({
@@ -16,6 +16,7 @@ export default defineAction({
16
16
  }),
17
17
  http: { method: "GET" },
18
18
  readOnly: true,
19
+ mcpTool: true,
19
20
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
20
21
  link: () => ({
21
22
  url: buildDeepLink({ app: "analytics", view: "analyses" }),
@@ -8,10 +8,12 @@ import { z } from "zod";
8
8
  import { listDashboardFolders } from "../server/lib/dashboard-folders-store";
9
9
 
10
10
  export default defineAction({
11
- description: "List dashboard folders accessible to the current user.",
11
+ description:
12
+ "List the dashboard folders the current user can access. Use list-sql-dashboards to list the dashboards themselves.",
12
13
  schema: z.object({}),
13
14
  http: { method: "GET" },
14
15
  readOnly: true,
16
+ mcpTool: true,
15
17
  publicAgent: { expose: true, readOnly: true, requiresAuth: true },
16
18
  run: async () => {
17
19
  const email = getRequestUserEmail();