@apex-inc/mcp-server 0.56.0 → 0.58.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.
@@ -100,6 +100,90 @@ export declare const measurementTools: {
100
100
  }[];
101
101
  }>;
102
102
  };
103
+ get_efforts: {
104
+ description: string;
105
+ schema: z.ZodObject<{
106
+ grain: z.ZodOptional<z.ZodEnum<["business", "campaign", "channel", "ad", "post", "link"]>>;
107
+ parentGrain: z.ZodOptional<z.ZodEnum<["business", "campaign", "channel", "ad", "post", "link"]>>;
108
+ parentRef: z.ZodOptional<z.ZodString>;
109
+ start: z.ZodOptional<z.ZodString>;
110
+ end: z.ZodOptional<z.ZodString>;
111
+ compare: z.ZodOptional<z.ZodString>;
112
+ keyEventIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
113
+ creditModel: z.ZodOptional<z.ZodEnum<["first_touch", "last_touch", "linear", "time_decay"]>>;
114
+ peopleOf: z.ZodOptional<z.ZodString>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ start?: string | undefined;
117
+ end?: string | undefined;
118
+ compare?: string | undefined;
119
+ grain?: "link" | "channel" | "campaign" | "business" | "ad" | "post" | undefined;
120
+ parentGrain?: "link" | "channel" | "campaign" | "business" | "ad" | "post" | undefined;
121
+ parentRef?: string | undefined;
122
+ keyEventIds?: string[] | undefined;
123
+ creditModel?: "first_touch" | "last_touch" | "linear" | "time_decay" | undefined;
124
+ peopleOf?: string | undefined;
125
+ }, {
126
+ start?: string | undefined;
127
+ end?: string | undefined;
128
+ compare?: string | undefined;
129
+ grain?: "link" | "channel" | "campaign" | "business" | "ad" | "post" | undefined;
130
+ parentGrain?: "link" | "channel" | "campaign" | "business" | "ad" | "post" | undefined;
131
+ parentRef?: string | undefined;
132
+ keyEventIds?: string[] | undefined;
133
+ creditModel?: "first_touch" | "last_touch" | "linear" | "time_decay" | undefined;
134
+ peopleOf?: string | undefined;
135
+ }>;
136
+ handler: (args: {
137
+ grain?: string;
138
+ parentGrain?: string;
139
+ parentRef?: string;
140
+ start?: string;
141
+ end?: string;
142
+ compare?: string;
143
+ keyEventIds?: string[];
144
+ creditModel?: string;
145
+ peopleOf?: string;
146
+ }) => Promise<{
147
+ content: {
148
+ type: "text";
149
+ text: string;
150
+ }[];
151
+ }>;
152
+ };
153
+ list_next_moves: {
154
+ description: string;
155
+ schema: z.ZodObject<{
156
+ grain: z.ZodOptional<z.ZodEnum<["business", "campaign", "channel", "ad", "post", "link"]>>;
157
+ ref: z.ZodOptional<z.ZodString>;
158
+ limit: z.ZodOptional<z.ZodNumber>;
159
+ sources: z.ZodOptional<z.ZodArray<z.ZodEnum<["channel", "insight", "observation", "spend"]>, "many">>;
160
+ perSubject: z.ZodOptional<z.ZodBoolean>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ limit?: number | undefined;
163
+ ref?: string | undefined;
164
+ grain?: "link" | "channel" | "campaign" | "business" | "ad" | "post" | undefined;
165
+ sources?: ("observation" | "channel" | "spend" | "insight")[] | undefined;
166
+ perSubject?: boolean | undefined;
167
+ }, {
168
+ limit?: number | undefined;
169
+ ref?: string | undefined;
170
+ grain?: "link" | "channel" | "campaign" | "business" | "ad" | "post" | undefined;
171
+ sources?: ("observation" | "channel" | "spend" | "insight")[] | undefined;
172
+ perSubject?: boolean | undefined;
173
+ }>;
174
+ handler: (args: {
175
+ grain?: string;
176
+ ref?: string;
177
+ limit?: number;
178
+ sources?: string[];
179
+ perSubject?: boolean;
180
+ }) => Promise<{
181
+ content: {
182
+ type: "text";
183
+ text: string;
184
+ }[];
185
+ }>;
186
+ };
103
187
  get_channel_economics: {
104
188
  description: string;
105
189
  schema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../src/tools/measurement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgFxB,eAAO,MAAM,gBAAgB;;;;;;;;;;wBAaH;YAAE,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,MAAM,GAAG,KAAK,CAAC;SACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8IqB;YACpB,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,SAAS,CAAC,EAAE,OAAO,CAAC;SACrB;;;;;;;;;;;;;;;;oCA8BiC;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;wBA2BpC;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;SAC7B;;;;;;;CAyBJ,CAAC"}
@@ -9,6 +9,41 @@ const NOT_LINKED = {
9
9
  invalid_api_key: "the Apex key isn't for this workspace",
10
10
  consent_denied: "no consent",
11
11
  };
12
+ /**
13
+ * Apple Ads installs for the source report. Apple tells the iPhone app which
14
+ * campaign and keyword brought each install, so these come from the app, not
15
+ * from clicks, and count before Apple Ads is connected. Best effort: the
16
+ * report stands without them.
17
+ */
18
+ async function appleAdsInstallLines(range) {
19
+ let report;
20
+ try {
21
+ const qs = new URLSearchParams({ start: range.start, end: range.end });
22
+ report = (await apiGet(`/api/connectors/apple-ads/installs?${qs}`)).data;
23
+ }
24
+ catch {
25
+ return [];
26
+ }
27
+ if (!report?.iphoneApp || (report.installs === 0 && report.campaigns.length === 0))
28
+ return [];
29
+ const usd = (n) => `$${n.toLocaleString("en-US", { maximumFractionDigits: 2 })}`;
30
+ const out = [
31
+ "",
32
+ `Apple Ads installs (the iPhone app reports them; not in the click counts above): ${report.installs}` +
33
+ (report.spend !== null ? ` for ${usd(report.spend)}${report.costPerInstall !== null ? `, ${usd(report.costPerInstall)} each` : ""}` : ""),
34
+ ];
35
+ for (const c of report.campaigns.slice(0, 5)) {
36
+ const cost = c.spend !== null ? `, ${usd(c.spend)}${c.costPerInstall !== null ? ` (${usd(c.costPerInstall)} each)` : ""}` : "";
37
+ const words = c.keywords.slice(0, 3).map((k) => `${k.label} ${k.installs}`).join(", ");
38
+ out.push(` • ${c.label}: ${c.installs} installs${cost}${words ? `; keywords: ${words}` : ""}`);
39
+ }
40
+ if (report.withoutCampaign > 0)
41
+ out.push(` • no campaign from Apple: ${report.withoutCampaign} installs`);
42
+ if (!report.connected) {
43
+ out.push(" Apple Ads isn't connected, so these are Apple's campaign and keyword numbers with no spend. connect_apple_ads adds names and spend.");
44
+ }
45
+ return out;
46
+ }
12
47
  /** What a test signup would have done to a person with test mode off. */
13
48
  function formatIdentityPreview(p) {
14
49
  if (p.heldExisting)
@@ -270,6 +305,10 @@ export const measurementTools = {
270
305
  if (res.metadata?.partial) {
271
306
  lines.push("", `More ${person.plural} matched than one read covers; conversion counts are for the newest.`);
272
307
  }
308
+ const scope = args.scope ?? "all";
309
+ if (scope === "all" || (scope === "source" && /^apple/i.test(args.ref ?? ""))) {
310
+ lines.push(...(await appleAdsInstallLines(report.range)));
311
+ }
273
312
  if (args.includePeople) {
274
313
  const pq = new URLSearchParams(qs);
275
314
  pq.delete("compare");
@@ -284,6 +323,151 @@ export const measurementTools = {
284
323
  return { content: [{ type: "text", text: lines.join("\n") }] };
285
324
  },
286
325
  },
326
+ get_efforts: {
327
+ description: `${APEX} — "Which campaign, ad or link is bringing my key events?" The Attribution table: one row per effort at a grain (business, campaign, channel, ad, post, link) with spend, people, how many reached each key event and what each cost, customers and revenue, credited under the workspace's rule (set_attribution_model) unless credit_model is given. Open a row with parent_grain + parent_ref (the ads in one campaign). Run it twice with different credit_model values to compare rules. Spend that wasn't recorded is "—", never $0. Set people_of to a row ref to list who it brought.`,
328
+ schema: z.object({
329
+ grain: z.enum(["business", "campaign", "channel", "ad", "post", "link"]).optional().describe("One row per what (default channel)."),
330
+ parentGrain: z.enum(["business", "campaign", "channel", "ad", "post", "link"]).optional().describe("Only rows inside this effort; pass with parent_ref."),
331
+ parentRef: z.string().optional().describe("The parent row's ref, from an earlier get_efforts."),
332
+ start: z.string().optional().describe("First day, YYYY-MM-DD (default 30 days ago)."),
333
+ end: z.string().optional().describe("Last day, YYYY-MM-DD, inclusive (default today)."),
334
+ compare: z.string().optional().describe("'previous', or YYYY-MM-DD..YYYY-MM-DD, for each row's earlier figures."),
335
+ keyEventIds: z.array(z.string()).optional().describe("Conversion ids to show as columns (default the workspace's key events)."),
336
+ creditModel: z.enum(["first_touch", "last_touch", "linear", "time_decay"]).optional().describe("Read under this rule instead of the workspace's."),
337
+ peopleOf: z.string().optional().describe("A row ref: also list up to 50 people credited to it."),
338
+ }),
339
+ handler: async (args) => {
340
+ const qs = new URLSearchParams();
341
+ if (args.grain)
342
+ qs.set("grain", args.grain);
343
+ if (args.parentGrain && args.parentRef) {
344
+ qs.set("parent_grain", args.parentGrain);
345
+ qs.set("parent_ref", args.parentRef);
346
+ }
347
+ if (args.start)
348
+ qs.set("start", args.start);
349
+ if (args.end)
350
+ qs.set("end", args.end);
351
+ if (args.compare)
352
+ qs.set("compare", args.compare);
353
+ for (const id of args.keyEventIds ?? [])
354
+ qs.append("key_event_id", id);
355
+ if (args.creditModel)
356
+ qs.set("credit_model", args.creditModel);
357
+ if (args.peopleOf)
358
+ qs.set("people_of", args.peopleOf);
359
+ const res = await apiGet(`/api/attribution/efforts?${qs}`);
360
+ const report = res.data;
361
+ if (!report)
362
+ return { content: [{ type: "text", text: `${APEX} No report came back.` }] };
363
+ const person = lowerPerson(await getPersonLabel());
364
+ const money = (n) => `$${n.toLocaleString("en-US", { maximumFractionDigits: 0 })}`;
365
+ const count = (n) => (Number.isInteger(n) ? String(n) : n.toFixed(1));
366
+ const rule = report.creditModel.replace(/_/g, " ");
367
+ const rowLine = (r) => {
368
+ const parts = [r.spend === null ? "spend —" : `spend ${money(r.spend)}`];
369
+ parts.push(`${count(r.people)} ${r.people === 1 ? person.label : person.plural}${r.costPerPerson !== null ? ` (${money(r.costPerPerson)} each)` : ""}`);
370
+ for (const col of report.columns) {
371
+ const cell = r.keyEvents[col.conversionId];
372
+ if (!cell || cell.people === 0)
373
+ continue;
374
+ parts.push(`${col.name} ${count(cell.people)}${cell.costPer !== null ? ` (${money(cell.costPer)} each)` : ""}`);
375
+ }
376
+ if (r.customers > 0)
377
+ parts.push(`${count(r.customers)} paying`);
378
+ if (r.revenue > 0)
379
+ parts.push(money(r.revenue));
380
+ if (r.previous)
381
+ parts.push(`before: ${count(r.previous.people)} ${person.plural}, ${money(r.previous.revenue)}`);
382
+ return ` • ${r.label} [${r.ref}]: ${parts.join(", ")}${r.hasChildren ? " ›" : ""}`;
383
+ };
384
+ const goal = report.columns.find((c) => c.isCurrentGoal);
385
+ const lines = [
386
+ `${APEX} ${report.parent ? `${report.parent.label} by ${report.grain}` : `By ${report.grain}`}, ${report.range.start} to ${report.range.end}${report.compareRange ? ` vs ${report.compareRange.start} to ${report.compareRange.end}` : ""}`,
387
+ `${"═".repeat(40)}`,
388
+ `Credit: ${rule}${report.creditModelChosen || args.creditModel ? "" : " (the workspace never picked a rule, so this is the default)"}. Key events: ${report.columns.map((c) => c.name).join(", ") || "none set"}${goal ? `; goal ${goal.name}` : ""}.`,
389
+ "",
390
+ ...report.rows.slice(0, 20).map(rowLine),
391
+ ...(report.rows.length > 20 ? [` … and ${report.rows.length - 20} more`] : []),
392
+ "",
393
+ `All: ${rowLine(report.totals).replace(/^ {2}• [^:]+: /, "")}`,
394
+ ];
395
+ if (report.rows.some((r) => r.hasChildren)) {
396
+ lines.push("", `› opens: call again with parent_grain ${report.grain} and parent_ref set to the row's ref.`);
397
+ }
398
+ if (report.handEnteredSpendNotInRows) {
399
+ lines.push("", `Spend here is ad platform spend only. ${money(report.handEnteredSpendNotInRows)} entered by hand belongs to no one ${report.grain}, so it counts on channels and the whole business.`);
400
+ }
401
+ for (const reason of report.partialReasons)
402
+ lines.push("", `Short of the whole story: ${reason}`);
403
+ if (report.people) {
404
+ const names = new Map(report.columns.map((c) => [c.conversionId, c.name]));
405
+ lines.push("", `${person.plural.charAt(0).toUpperCase()}${person.plural.slice(1)} (${report.peopleTotal ?? report.people.length}):`);
406
+ for (const p of report.people) {
407
+ const reached = p.reached.map((id) => names.get(id) ?? id).join(", ");
408
+ lines.push(` • ${p.name || p.email || "(no name)"}${p.share < 1 ? ` (${Math.round(p.share * 100)}% credit)` : ""}${reached ? `, reached ${reached}` : ""}${p.revenue > 0 ? `, ${money(p.revenue)}` : ""}${p.path.length ? `, came via ${p.path.join(" → ")}` : ""}`);
409
+ }
410
+ }
411
+ return { content: [{ type: "text", text: lines.join("\n") }] };
412
+ },
413
+ },
414
+ list_next_moves: {
415
+ description: `${APEX} — "What should I do next?" The ranked moves Apex shows on Attribution and the home page, from one engine: broken tracking to fix, spend that isn't paying, efforts worth scaling, and insight checks. Scope it to one effort with grain + ref (an ad's moves also show on its channel). If a source or check couldn't be read the reply says so, so a short list never means nothing to do.`,
416
+ schema: z.object({
417
+ grain: z.enum(["business", "campaign", "channel", "ad", "post", "link"]).optional().describe("Scope (default business)."),
418
+ ref: z.string().optional().describe("The effort's ref, from get_efforts. Required below business."),
419
+ limit: z.number().int().min(1).max(50).optional().describe("How many moves (default 10)."),
420
+ sources: z.array(z.enum(["channel", "insight", "observation", "spend"])).optional().describe("Only moves from these sources."),
421
+ perSubject: z.boolean().optional().describe("Only the top move for each effort."),
422
+ }),
423
+ handler: async (args) => {
424
+ const qs = new URLSearchParams();
425
+ if (args.grain)
426
+ qs.set("grain", args.grain);
427
+ if (args.ref)
428
+ qs.set("ref", args.ref);
429
+ if (args.limit !== undefined)
430
+ qs.set("limit", String(args.limit));
431
+ if (args.sources?.length)
432
+ qs.set("source", args.sources.join(","));
433
+ if (args.perSubject)
434
+ qs.set("per_subject", "1");
435
+ const res = await apiGet(`/api/next-moves${qs.toString() ? `?${qs}` : ""}`);
436
+ const moves = res.data?.moves ?? [];
437
+ const failedSources = res.metadata?.failed_sources ?? [];
438
+ const failedChecks = res.metadata?.failed_checks ?? [];
439
+ const sourceNames = {
440
+ channel: "channel economics",
441
+ insight: "insights",
442
+ observation: "the nightly ad checks",
443
+ spend: "spend",
444
+ };
445
+ const checkNames = {
446
+ stale_syncs: "connector syncs",
447
+ scoring_drift: "lead scoring",
448
+ next_experiment: "experiment ideas",
449
+ targets: "targets",
450
+ };
451
+ const missing = [
452
+ ...failedSources.map((s) => sourceNames[s] ?? s),
453
+ ...failedChecks.map((c) => checkNames[c] ?? c),
454
+ ];
455
+ const lines = [`${APEX} Next moves${args.grain && args.grain !== "business" ? ` for ${args.grain} ${args.ref ?? ""}`.trimEnd() : ""}`, `${"═".repeat(40)}`];
456
+ if (moves.length === 0) {
457
+ lines.push(missing.length ? "No moves from what Apex could read." : "No moves right now: nothing is broken and nothing stands out to scale or cut.");
458
+ }
459
+ moves.forEach((m, i) => {
460
+ lines.push(`${i + 1}. [${m.severity}] ${m.headline}`, ` ${m.detail}`);
461
+ if (m.whatWouldChange)
462
+ lines.push(` What would change this: ${m.whatWouldChange}`);
463
+ lines.push(` ${m.cta}: ${m.href}`);
464
+ });
465
+ if (missing.length) {
466
+ lines.push("", `Apex couldn't check ${missing.join(" or ")} just now, so this may not be the whole list.`);
467
+ }
468
+ return { content: [{ type: "text", text: lines.join("\n") }] };
469
+ },
470
+ },
287
471
  get_channel_economics: {
288
472
  description: `${APEX} — "Where should my next dollar go?" Per acquisition channel (raw first-touch): LTGP:CAC (lifetime gross profit over CAC) where the merchant reports product cost, LTV:CAC (lifetime revenue over CAC) everywhere else, plus payback months, CAC, and customers, split into Acquisition (paid) vs Leverage (owned/organic, no spend). Computed from real contacts + spend + revenue — metrics with missing inputs are shown as "—", never fabricated. Free intelligence; the verdict is never gated.`,
289
473
  schema: z.object({
@@ -1205,7 +1389,7 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
1205
1389
  content: [{ type: "text", text: "No active workspace. Use switch_workspace first (or set APEX_WORKSPACE_KEY)." }],
1206
1390
  };
1207
1391
  }
1208
- const json = await apiGet(`/api/workspaces/${encodeURIComponent(workspaceKey)}/readiness`);
1392
+ const json = await apiGet(`/api/workspaces/${encodeURIComponent(workspaceKey)}/readiness?include=app_sign_ins`);
1209
1393
  const d = json.data;
1210
1394
  const person = lowerPerson(await getPersonLabel());
1211
1395
  const eventLines = d.events.map((e) => `- ${e.name}: ${e.tier} (${e.count.toLocaleString()} events, platforms: ${e.platforms.join("/") || "—"})${e.observedFields?.length ? ` — fields seen: ${e.observedFields.join(", ")}` : ""}`);
@@ -1223,16 +1407,22 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
1223
1407
  ? `First identified ${person.label}: ${d.milestones.firstIdentifiedAt}`
1224
1408
  : `First identified ${person.label}: not yet`,
1225
1409
  ];
1410
+ const signIns = d.appSignIns;
1411
+ const signInSection = !signIns
1412
+ ? ""
1413
+ : signIns.firstSeenAt
1414
+ ? `\n\n## App sign-ins\n- The app tells Apex who signed in (first seen ${signIns.firstSeenAt}).\n- Last ${signIns.windowDays} days: ${signIns.installsCreditedBySignIn} install${signIns.installsCreditedBySignIn === 1 ? "" : "s"} credited because the ${person.label} signed in as someone the site already knew, ${signIns.installsCreditedByCode} because they typed a partner's code.`
1415
+ : `\n\n## App sign-ins\n- Not seen yet. Without it, an iPhone install from a partner or ad shows as Organic. Add \`await Apex.identify({ email: user.email, userId: user.id })\` where the app's login finishes (the merchant reviews it), then call this again.`;
1226
1416
  return {
1227
1417
  content: [{
1228
1418
  type: "text",
1229
- text: `# Wiring status — ${workspaceKey}\n\n## Milestones\n${milestones.map((m) => `- ${m}`).join("\n")}\n\n## Events received\n${eventLines.join("\n") || "_none yet_"}\n\n## Identify traits\n${traitLines.join("\n") || "_none yet_"}\n\n## Data sources\n${sourceLines.join("\n") || "_none yet_"}\n\n## Templates\n${templateLines.join("\n") || "_none derivable yet_"}`,
1419
+ text: `# Wiring status — ${workspaceKey}\n\n## Milestones\n${milestones.map((m) => `- ${m}`).join("\n")}${signInSection}\n\n## Events received\n${eventLines.join("\n") || "_none yet_"}\n\n## Identify traits\n${traitLines.join("\n") || "_none yet_"}\n\n## Data sources\n${sourceLines.join("\n") || "_none yet_"}\n\n## Templates\n${templateLines.join("\n") || "_none derivable yet_"}`,
1230
1420
  }],
1231
1421
  };
1232
1422
  },
1233
1423
  },
1234
1424
  propose_wiring_plan: {
1235
- description: `${APEX} — Report the Apex Spec instrumentation opportunities you found by SCANNING the merchant's codebase (auth flows → identify + user_signed_up, checkout → purchase events, forms → form_submit, app purchases → in_app_purchase, server order paths → order_placed, …). Call this BEFORE wiring: the plan appears on the merchant's setup page as pending lights, each flipping green when its first real event arrives. Structure your scan report in three sections: (1) ALREADY WIRED — events the repo already instruments (include them here with wired: true; they're awaiting their first heartbeat), (2) GAPS TO WIRE — the work you propose, (3) WON'T WIRE + WHY — opportunities you're deliberately skipping (e.g. a server event with no backend, or a form that already fires a richer dedicated event). Then instrument each gap where the truth lives and verify with get_wiring_status. Scan first; never ask the merchant to enumerate events for you.`,
1425
+ description: `${APEX} — Report the Apex Spec instrumentation opportunities you found by SCANNING the merchant's codebase (auth flows → identify + user_signed_up, the mobile app's login → Apex.identify so iPhone installs get credited, checkout → purchase events, forms → form_submit, app purchases → in_app_purchase, server order paths → order_placed, …). Call this BEFORE wiring: the plan appears on the merchant's setup page as pending lights, each flipping green when its first real event arrives. Structure your scan report in three sections: (1) ALREADY WIRED — events the repo already instruments (include them here with wired: true; they're awaiting their first heartbeat), (2) GAPS TO WIRE — the work you propose, (3) WON'T WIRE + WHY — opportunities you're deliberately skipping (e.g. a server event with no backend, or a form that already fires a richer dedicated event). Then instrument each gap where the truth lives and verify with get_wiring_status. Scan first; never ask the merchant to enumerate events for you.`,
1236
1426
  schema: z.object({
1237
1427
  events: z
1238
1428
  .array(z.object({
@@ -1268,10 +1458,13 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
1268
1458
  source: "mcp",
1269
1459
  });
1270
1460
  const lines = json.data.events.map((e) => `- ${e.name} (${e.surface})${e.wired ? " — already wired, awaiting first heartbeat" : ""}`);
1461
+ const appSignIn = args.events.some((e) => e.surface === "mobile")
1462
+ ? `\n\nApp sign-in: find where the app's login finishes (after the account is known) and add \`await Apex.identify({ email: user.email, userId: user.id });\` there. That joins the phone to the person the site already knows, so an iPhone install from a partner or ad is credited instead of showing as Organic. It is not tracking, and nothing it credits is sent to ad networks. Show the merchant the line before they ship it. get_wiring_status reports it under App sign-ins.`
1463
+ : "";
1271
1464
  return {
1272
1465
  content: [{
1273
1466
  type: "text",
1274
- text: `# Wiring plan proposed — ${workspaceKey}\n\nThe merchant's setup page now shows ${json.data.events.length} pending event light${json.data.events.length === 1 ? "" : "s"}:\n${lines.join("\n")}\n\nNext: instrument each gap where it happens in the code (smallest change, never commit), then call get_wiring_status until every light reports "detected".`,
1467
+ text: `# Wiring plan proposed — ${workspaceKey}\n\nThe merchant's setup page now shows ${json.data.events.length} pending event light${json.data.events.length === 1 ? "" : "s"}:\n${lines.join("\n")}${appSignIn}\n\nNext: instrument each gap where it happens in the code (smallest change, never commit), then call get_wiring_status until every light reports "detected".`,
1275
1468
  }],
1276
1469
  };
1277
1470
  },
@@ -1382,7 +1575,7 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
1382
1575
  },
1383
1576
  },
1384
1577
  list_conversions: {
1385
- description: `${APEX} — List the workspace's Conversions (owned-event definitions of valued actions, e.g. "Purchase", "Signup"). Call this when the user asks what conversions are defined. The starred primary is a label for that Conversion — it does not pick the funnel stages and it is not the experiment default. Experiments name their own metric; the funnel follows the workspace conversion model.`,
1578
+ description: `${APEX} — List the workspace's Conversions (owned-event definitions of valued actions, e.g. "Purchase", "Signup"). Call this when the user asks what conversions are defined. The starred primary is the current goal Attribution leads with; it does not pick the funnel stages and it is not the experiment default. Experiments name their own metric; the funnel follows the workspace conversion model.`,
1386
1579
  schema: z.object({}),
1387
1580
  handler: async () => {
1388
1581
  const conversions = await apiGet("/api/conversion-goals");
@@ -1461,7 +1654,7 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
1461
1654
  },
1462
1655
  },
1463
1656
  set_primary_conversion: {
1464
- description: `${APEX} — Mark a Conversion as the starred primary. That star labels the Conversion — it does not set experiment defaults or drive the funnel. Experiments name their own metric. Pass the conversion id from list_conversions.`,
1657
+ description: `${APEX} — Make a Conversion the workspace's current goal (the starred primary). Attribution, get_efforts and next moves lead with it, and it replaces any goal picked before. It does not set experiment defaults or the funnel stages; experiments name their own metric. Pass the conversion id from list_conversions.`,
1465
1658
  schema: z.object({
1466
1659
  conversionId: z.string().describe("The conversion id to promote (from list_conversions)."),
1467
1660
  }),