@apex-inc/mcp-server 0.78.0 → 0.79.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 (48) hide show
  1. package/README.md +8 -0
  2. package/dist/api-client.d.ts +2 -4
  3. package/dist/api-client.d.ts.map +1 -1
  4. package/dist/api-client.js +30 -2
  5. package/dist/api-client.js.map +1 -1
  6. package/dist/hosted.d.ts +6 -0
  7. package/dist/hosted.d.ts.map +1 -1
  8. package/dist/hosted.js +18 -0
  9. package/dist/hosted.js.map +1 -1
  10. package/dist/index.js +11 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/letter-blocks.d.ts.map +1 -1
  13. package/dist/letter-blocks.js +13 -22
  14. package/dist/letter-blocks.js.map +1 -1
  15. package/dist/request-context.d.ts +2 -0
  16. package/dist/request-context.d.ts.map +1 -1
  17. package/dist/request-context.js.map +1 -1
  18. package/dist/server-factory.d.ts +13 -0
  19. package/dist/server-factory.d.ts.map +1 -1
  20. package/dist/server-factory.js +426 -62
  21. package/dist/server-factory.js.map +1 -1
  22. package/dist/setup-catchup-tools.d.ts.map +1 -1
  23. package/dist/setup-catchup-tools.js +18 -63
  24. package/dist/setup-catchup-tools.js.map +1 -1
  25. package/dist/tool-mode.d.ts +48 -0
  26. package/dist/tool-mode.d.ts.map +1 -0
  27. package/dist/tool-mode.js +189 -0
  28. package/dist/tool-mode.js.map +1 -0
  29. package/dist/tool-shared.d.ts +7 -0
  30. package/dist/tool-shared.d.ts.map +1 -1
  31. package/dist/tool-shared.js +35 -4
  32. package/dist/tool-shared.js.map +1 -1
  33. package/dist/tools/apex-campaigns.d.ts +4 -0
  34. package/dist/tools/apex-campaigns.d.ts.map +1 -1
  35. package/dist/tools/apex-campaigns.js +4 -1
  36. package/dist/tools/apex-campaigns.js.map +1 -1
  37. package/dist/tools/experiments.js +53 -53
  38. package/dist/tools/experiments.js.map +1 -1
  39. package/dist/tools/letters.d.ts.map +1 -1
  40. package/dist/tools/letters.js +13 -34
  41. package/dist/tools/letters.js.map +1 -1
  42. package/dist/tools/measurement.d.ts.map +1 -1
  43. package/dist/tools/measurement.js +14 -14
  44. package/dist/tools/measurement.js.map +1 -1
  45. package/dist/tools.d.ts +4 -0
  46. package/dist/tools.d.ts.map +1 -1
  47. package/package.json +1 -1
  48. package/skills/apex-setup/SKILL.md +1 -0
@@ -16,15 +16,15 @@ const keyEventConditionSchema = z.object({
16
16
  .describe("One value for equals / not_equals / contains / gt / gte / lt / lte, a list for in, none for exists."),
17
17
  });
18
18
  const keyEventSourceSchema = z.object({
19
- type: z.enum(["custom_event", "form_submit"]).describe("custom_event: a named event. form_submit: a form sent on the site."),
20
- event_name: z.string().optional().describe("For custom_event: the event's name, e.g. application_submitted."),
21
- selector: z.string().optional().describe('For form_submit: one form, as "#id". Omit for any form.'),
22
- target_url: z.string().optional().describe("For form_submit: the page the form is on. Omit for any page."),
23
- where: z.array(keyEventConditionSchema).max(10).optional().describe("Conditions on the event's data, all must hold."),
19
+ type: z.enum(["custom_event", "form_submit"]).describe("custom_event or form_submit"),
20
+ event_name: z.string().optional().describe("Event name for custom_event"),
21
+ selector: z.string().optional().describe('Optional form "#id" for form_submit'),
22
+ target_url: z.string().optional().describe("Optional page path/URL for form_submit"),
23
+ where: z.array(keyEventConditionSchema).max(10).optional().describe("Optional event property conditions (all must match)"),
24
24
  revenue_stream: z
25
25
  .enum(["dedupe_with_billing", "additive"])
26
26
  .optional()
27
- .describe('Only on Revenue key events (purchase/subscribe): "dedupe_with_billing" (default, billing stays primary) or "additive" (separate money stream not in Stripe/Shopify/QuickBooks, e.g. offline deals).'),
27
+ .describe('Revenue key events only: "dedupe_with_billing" (default) or "additive".'),
28
28
  });
29
29
  const keyEventCategorySchema = z
30
30
  .enum([
@@ -761,23 +761,23 @@ export const measurementTools = {
761
761
  },
762
762
  },
763
763
  create_key_event: {
764
- description: `${APEX} — Make a key event: an action that matters to the business, reached by any one of its events (sources), each with optional conditions on the event's data. Example: Lead captured, reached by application_submitted, or by audit_booked where plan is pro. Outside experiments Apex counts named events (custom_event) and form submissions (form_submit, optionally one form #id on one page). entity_scope account makes a company reach it when its first person does. People who already did it are found in their history and counted, but nothing is sent for them. Workspace admin.`,
764
+ description: `${APEX} — Create a key event reached by one or more source events (with optional conditions). Backfills history without triggering sends. Workspace admin.`,
765
765
  schema: z.object({
766
- name: z.string().min(1).max(200).describe('What the business calls it, e.g. "Lead captured".'),
767
- sources: z.array(keyEventSourceSchema).min(1).max(20).describe("The events that reach it. Any one is enough."),
766
+ name: z.string().min(1).max(200).describe('Key event name, e.g. "Lead captured"'),
767
+ sources: z.array(keyEventSourceSchema).min(1).max(20).describe("Source events (any match counts)"),
768
768
  category: keyEventCategorySchema.optional(),
769
- entityScope: z.enum(["person", "account"]).optional().describe("person (default) or account (a company reaches it when its first person does)."),
769
+ entityScope: z.enum(["person", "account"]).optional().describe("person (default) or account"),
770
770
  description: z.string().max(1000).optional(),
771
- template: z.string().max(100).optional().describe("The template it follows, e.g. lead_captured."),
772
- position: z.number().int().min(0).max(999).optional().describe("Optional explicit funnel rank (0 = earliest step). Omit to use automatic funnel order."),
771
+ template: z.string().max(100).optional().describe("Optional template id, e.g. lead_captured"),
772
+ position: z.number().int().min(0).max(999).optional().describe("Optional funnel rank (0 = earliest)"),
773
773
  funnelRole: z
774
774
  .enum(["stage", "off_ramp", "return", "milestone"])
775
775
  .optional()
776
- .describe("Role in the workspace funnel & contact lifecycle: stage (advances contact lifecycle), off_ramp (churn/lost), return (reactivation), or milestone (does not change stage)."),
776
+ .describe("Funnel role: stage, off_ramp (churn), return (reactivation), or milestone"),
777
777
  reactivatesChurned: z
778
778
  .boolean()
779
779
  .optional()
780
- .describe("Whether reaching this key event brings a churned person back to active (defaults to true for purchase, subscribe, and reactivation)."),
780
+ .describe("Bring churned people back to active when reached"),
781
781
  }),
782
782
  handler: async (args) => {
783
783
  try {