@iterable/mcp 1.0.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.
- package/LICENSE +21 -0
- package/README.md +318 -0
- package/TOOLS.md +133 -0
- package/dist/client-detection.d.ts +7 -0
- package/dist/client-detection.d.ts.map +1 -0
- package/dist/client-detection.js +22 -0
- package/dist/client-detection.js.map +1 -0
- package/dist/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +74 -0
- package/dist/config.js.map +1 -0
- package/dist/http-headers.d.ts +5 -0
- package/dist/http-headers.d.ts.map +1 -0
- package/dist/http-headers.js +5 -0
- package/dist/http-headers.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +41 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +725 -0
- package/dist/install.js.map +1 -0
- package/dist/key-manager.d.ts +236 -0
- package/dist/key-manager.d.ts.map +1 -0
- package/dist/key-manager.js +776 -0
- package/dist/key-manager.js.map +1 -0
- package/dist/keys-cli.d.ts +8 -0
- package/dist/keys-cli.d.ts.map +1 -0
- package/dist/keys-cli.js +487 -0
- package/dist/keys-cli.js.map +1 -0
- package/dist/prompts.d.ts +15 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +66 -0
- package/dist/prompts.js.map +1 -0
- package/dist/schema-utils.d.ts +22 -0
- package/dist/schema-utils.d.ts.map +1 -0
- package/dist/schema-utils.js +65 -0
- package/dist/schema-utils.js.map +1 -0
- package/dist/server.d.ts +13 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +172 -0
- package/dist/server.js.map +1 -0
- package/dist/shutdown.d.ts +5 -0
- package/dist/shutdown.d.ts.map +1 -0
- package/dist/shutdown.js +68 -0
- package/dist/shutdown.js.map +1 -0
- package/dist/tool-filter.d.ts +19 -0
- package/dist/tool-filter.d.ts.map +1 -0
- package/dist/tool-filter.js +144 -0
- package/dist/tool-filter.js.map +1 -0
- package/dist/tools/campaigns.d.ts +7 -0
- package/dist/tools/campaigns.d.ts.map +1 -0
- package/dist/tools/campaigns.js +88 -0
- package/dist/tools/campaigns.js.map +1 -0
- package/dist/tools/catalogs.d.ts +7 -0
- package/dist/tools/catalogs.d.ts.map +1 -0
- package/dist/tools/catalogs.js +85 -0
- package/dist/tools/catalogs.js.map +1 -0
- package/dist/tools/events.d.ts +7 -0
- package/dist/tools/events.d.ts.map +1 -0
- package/dist/tools/events.js +34 -0
- package/dist/tools/events.js.map +1 -0
- package/dist/tools/experiments.d.ts +7 -0
- package/dist/tools/experiments.d.ts.map +1 -0
- package/dist/tools/experiments.js +16 -0
- package/dist/tools/experiments.js.map +1 -0
- package/dist/tools/export.d.ts +7 -0
- package/dist/tools/export.d.ts.map +1 -0
- package/dist/tools/export.js +41 -0
- package/dist/tools/export.js.map +1 -0
- package/dist/tools/index.d.ts +19 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +44 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/journeys.d.ts +10 -0
- package/dist/tools/journeys.d.ts.map +1 -0
- package/dist/tools/journeys.js +25 -0
- package/dist/tools/journeys.js.map +1 -0
- package/dist/tools/lists.d.ts +7 -0
- package/dist/tools/lists.d.ts.map +1 -0
- package/dist/tools/lists.js +58 -0
- package/dist/tools/lists.js.map +1 -0
- package/dist/tools/messaging.d.ts +11 -0
- package/dist/tools/messaging.d.ts.map +1 -0
- package/dist/tools/messaging.js +103 -0
- package/dist/tools/messaging.js.map +1 -0
- package/dist/tools/snippets.d.ts +7 -0
- package/dist/tools/snippets.d.ts.map +1 -0
- package/dist/tools/snippets.js +46 -0
- package/dist/tools/snippets.js.map +1 -0
- package/dist/tools/subscriptions.d.ts +4 -0
- package/dist/tools/subscriptions.d.ts.map +1 -0
- package/dist/tools/subscriptions.js +37 -0
- package/dist/tools/subscriptions.js.map +1 -0
- package/dist/tools/templates.d.ts +7 -0
- package/dist/tools/templates.d.ts.map +1 -0
- package/dist/tools/templates.js +118 -0
- package/dist/tools/templates.js.map +1 -0
- package/dist/tools/users.d.ts +10 -0
- package/dist/tools/users.d.ts.map +1 -0
- package/dist/tools/users.js +74 -0
- package/dist/tools/users.js.map +1 -0
- package/dist/tools/webhooks.d.ts +7 -0
- package/dist/tools/webhooks.d.ts.map +1 -0
- package/dist/tools/webhooks.js +22 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/dist/utils/cli-env.d.ts +11 -0
- package/dist/utils/cli-env.d.ts.map +1 -0
- package/dist/utils/cli-env.js +32 -0
- package/dist/utils/cli-env.js.map +1 -0
- package/dist/utils/endpoint-prompt.d.ts +14 -0
- package/dist/utils/endpoint-prompt.d.ts.map +1 -0
- package/dist/utils/endpoint-prompt.js +73 -0
- package/dist/utils/endpoint-prompt.js.map +1 -0
- package/dist/utils/formatting.d.ts +10 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +12 -0
- package/dist/utils/formatting.js.map +1 -0
- package/dist/utils/password-prompt.d.ts +19 -0
- package/dist/utils/password-prompt.d.ts.map +1 -0
- package/dist/utils/password-prompt.js +37 -0
- package/dist/utils/password-prompt.js.map +1 -0
- package/dist/utils/sanitize.d.ts +13 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +23 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/utils/tool-config.d.ts +13 -0
- package/dist/utils/tool-config.d.ts.map +1 -0
- package/dist/utils/tool-config.js +45 -0
- package/dist/utils/tool-config.js.map +1 -0
- package/dist/utils/ui.d.ts +90 -0
- package/dist/utils/ui.d.ts.map +1 -0
- package/dist/utils/ui.js +298 -0
- package/dist/utils/ui.js.map +1 -0
- package/dist/utils/url.d.ts +20 -0
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/url.js +53 -0
- package/dist/utils/url.js.map +1 -0
- package/package.json +105 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable campaign operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbortCampaignParamsSchema, ActivateTriggeredCampaignParamsSchema, ArchiveCampaignsParamsSchema, CancelCampaignParamsSchema, CreateCampaignParamsSchema, DeactivateTriggeredCampaignParamsSchema, GetCampaignMetricsParamsSchema, GetCampaignParamsSchema, GetCampaignsParamsSchema, GetChildCampaignsParamsSchema, ScheduleCampaignParamsSchema, SendCampaignParamsSchema, TriggerCampaignParamsSchema, } from "@iterable/api";
|
|
5
|
+
import { createTool } from "../schema-utils.js";
|
|
6
|
+
export function createCampaignTools(client) {
|
|
7
|
+
return [
|
|
8
|
+
createTool({
|
|
9
|
+
name: "get_campaigns",
|
|
10
|
+
description: "Retrieve campaigns",
|
|
11
|
+
schema: GetCampaignsParamsSchema,
|
|
12
|
+
execute: (params) => client.getCampaigns(params),
|
|
13
|
+
}),
|
|
14
|
+
createTool({
|
|
15
|
+
name: "get_campaign",
|
|
16
|
+
description: "Get detailed information about a specific campaign",
|
|
17
|
+
schema: GetCampaignParamsSchema,
|
|
18
|
+
execute: (params) => client.getCampaign(params),
|
|
19
|
+
}),
|
|
20
|
+
createTool({
|
|
21
|
+
name: "get_campaign_metrics",
|
|
22
|
+
description: "Get campaign performance metrics",
|
|
23
|
+
schema: GetCampaignMetricsParamsSchema,
|
|
24
|
+
execute: (params) => client.getCampaignMetrics(params),
|
|
25
|
+
}),
|
|
26
|
+
createTool({
|
|
27
|
+
name: "create_campaign",
|
|
28
|
+
description: "Create a new blast or triggered campaign from an existing template. If listIds are provided, the campaign will be a blast campaign, otherwise it will be a triggered campaign. Blast campaigns will be sent immediately if sendAt is not provided.",
|
|
29
|
+
schema: CreateCampaignParamsSchema,
|
|
30
|
+
execute: (params) => client.createCampaign(params),
|
|
31
|
+
}),
|
|
32
|
+
createTool({
|
|
33
|
+
name: "get_child_campaigns",
|
|
34
|
+
description: "Get child campaigns generated by a recurring campaign",
|
|
35
|
+
schema: GetChildCampaignsParamsSchema,
|
|
36
|
+
execute: (params) => client.getChildCampaigns(params),
|
|
37
|
+
}),
|
|
38
|
+
createTool({
|
|
39
|
+
name: "schedule_campaign",
|
|
40
|
+
description: "Schedule an existing campaign to be sent at a specific time",
|
|
41
|
+
schema: ScheduleCampaignParamsSchema,
|
|
42
|
+
execute: (params) => client.scheduleCampaign(params),
|
|
43
|
+
}),
|
|
44
|
+
createTool({
|
|
45
|
+
name: "abort_campaign",
|
|
46
|
+
description: "Abort a campaign that is currently running",
|
|
47
|
+
schema: AbortCampaignParamsSchema,
|
|
48
|
+
execute: (params) => client.abortCampaign(params),
|
|
49
|
+
}),
|
|
50
|
+
createTool({
|
|
51
|
+
name: "cancel_campaign",
|
|
52
|
+
description: "Cancel a scheduled or recurring campaign",
|
|
53
|
+
schema: CancelCampaignParamsSchema,
|
|
54
|
+
execute: (params) => client.cancelCampaign(params),
|
|
55
|
+
}),
|
|
56
|
+
createTool({
|
|
57
|
+
name: "activate_triggered_campaign",
|
|
58
|
+
description: "Activate a triggered campaign (requires API triggered campaign activation enabled)",
|
|
59
|
+
schema: ActivateTriggeredCampaignParamsSchema,
|
|
60
|
+
execute: (params) => client.activateTriggeredCampaign(params),
|
|
61
|
+
}),
|
|
62
|
+
createTool({
|
|
63
|
+
name: "deactivate_triggered_campaign",
|
|
64
|
+
description: "Deactivate a triggered campaign (requires API triggered campaign deactivation enabled)",
|
|
65
|
+
schema: DeactivateTriggeredCampaignParamsSchema,
|
|
66
|
+
execute: (params) => client.deactivateTriggeredCampaign(params),
|
|
67
|
+
}),
|
|
68
|
+
createTool({
|
|
69
|
+
name: "archive_campaigns",
|
|
70
|
+
description: "Archive one or more campaigns. Scheduled/recurring campaigns will be cancelled, running campaigns will be aborted.",
|
|
71
|
+
schema: ArchiveCampaignsParamsSchema,
|
|
72
|
+
execute: (params) => client.archiveCampaigns(params),
|
|
73
|
+
}),
|
|
74
|
+
createTool({
|
|
75
|
+
name: "trigger_campaign",
|
|
76
|
+
description: "Trigger a campaign to send to specified lists",
|
|
77
|
+
schema: TriggerCampaignParamsSchema,
|
|
78
|
+
execute: (params) => client.triggerCampaign(params),
|
|
79
|
+
}),
|
|
80
|
+
createTool({
|
|
81
|
+
name: "send_campaign",
|
|
82
|
+
description: "Send an existing scheduled campaign immediately",
|
|
83
|
+
schema: SendCampaignParamsSchema,
|
|
84
|
+
execute: (params) => client.sendCampaign(params),
|
|
85
|
+
}),
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=campaigns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"campaigns.js","sourceRoot":"","sources":["../../src/tools/campaigns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,yBAAyB,EACzB,qCAAqC,EACrC,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,uCAAuC,EACvC,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,mBAAmB,CAAC,MAAsB;IACxD,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,oBAAoB;YACjC,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;SACjD,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,oDAAoD;YACjE,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;SAChD,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAA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,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC;SAC9D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,+BAA+B;YACrC,WAAW,EACT,wFAAwF;YAC1F,MAAM,EAAE,uCAAuC;YAC/C,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC,MAAM,CAAC;SAChE,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,mBAAmB;YACzB,WAAW,EACT,oHAAoH;YACtH,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC;SACrD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,+CAA+C;YAC5D,MAAM,EAAE,2BAA2B;YACnC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;SACpD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,iDAAiD;YAC9D,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;SACjD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable catalog operations
|
|
3
|
+
*/
|
|
4
|
+
import type { IterableClient } from "@iterable/api";
|
|
5
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
export declare function createCatalogTools(client: IterableClient): Tool[];
|
|
7
|
+
//# sourceMappingURL=catalogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogs.d.ts","sourceRoot":"","sources":["../../src/tools/catalogs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAcpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAK/D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAmFjE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable catalog operations
|
|
3
|
+
*/
|
|
4
|
+
import { BulkDeleteCatalogItemsParamsSchema, CreateCatalogParamsSchema, DeleteCatalogItemParamsSchema, GetCatalogFieldMappingsParamsSchema, GetCatalogItemParamsSchema, GetCatalogItemsParamsSchema, GetCatalogsParamsSchema, PartialUpdateCatalogItemParamsSchema, ReplaceCatalogItemParamsSchema, UpdateCatalogFieldMappingsParamsSchema, UpdateCatalogItemParamsSchema, } from "@iterable/api";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { createTool } from "../schema-utils.js";
|
|
7
|
+
export function createCatalogTools(client) {
|
|
8
|
+
return [
|
|
9
|
+
createTool({
|
|
10
|
+
name: "create_catalog",
|
|
11
|
+
description: "Create a new catalog",
|
|
12
|
+
schema: CreateCatalogParamsSchema,
|
|
13
|
+
execute: (params) => client.createCatalog(params.catalogName),
|
|
14
|
+
}),
|
|
15
|
+
createTool({
|
|
16
|
+
name: "update_catalog_items",
|
|
17
|
+
description: "Update catalog items",
|
|
18
|
+
schema: UpdateCatalogItemParamsSchema,
|
|
19
|
+
execute: (params) => client.updateCatalogItems(params),
|
|
20
|
+
}),
|
|
21
|
+
createTool({
|
|
22
|
+
name: "get_catalog_item",
|
|
23
|
+
description: "Get a specific catalog item by ID",
|
|
24
|
+
schema: GetCatalogItemParamsSchema,
|
|
25
|
+
execute: (params) => client.getCatalogItem(params.catalogName, params.itemId),
|
|
26
|
+
}),
|
|
27
|
+
createTool({
|
|
28
|
+
name: "delete_catalog_item",
|
|
29
|
+
description: "Delete a specific catalog item by ID",
|
|
30
|
+
schema: DeleteCatalogItemParamsSchema,
|
|
31
|
+
execute: (params) => client.deleteCatalogItem(params.catalogName, params.itemId),
|
|
32
|
+
}),
|
|
33
|
+
createTool({
|
|
34
|
+
name: "get_catalogs",
|
|
35
|
+
description: "Get list of all catalogs with optional pagination",
|
|
36
|
+
schema: GetCatalogsParamsSchema,
|
|
37
|
+
execute: (params) => client.getCatalogs(params),
|
|
38
|
+
}),
|
|
39
|
+
createTool({
|
|
40
|
+
name: "get_catalog_field_mappings",
|
|
41
|
+
description: "Get field mappings and data types for a catalog",
|
|
42
|
+
schema: GetCatalogFieldMappingsParamsSchema,
|
|
43
|
+
execute: (params) => client.getCatalogFieldMappings(params),
|
|
44
|
+
}),
|
|
45
|
+
createTool({
|
|
46
|
+
name: "get_catalog_items",
|
|
47
|
+
description: "Get items from a catalog with optional pagination and sorting",
|
|
48
|
+
schema: GetCatalogItemsParamsSchema,
|
|
49
|
+
execute: (params) => client.getCatalogItems(params),
|
|
50
|
+
}),
|
|
51
|
+
createTool({
|
|
52
|
+
name: "delete_catalog",
|
|
53
|
+
description: "Delete a catalog",
|
|
54
|
+
schema: z.object({
|
|
55
|
+
catalogName: z.string().describe("Name of the catalog to delete"),
|
|
56
|
+
}),
|
|
57
|
+
execute: (params) => client.deleteCatalog(params.catalogName),
|
|
58
|
+
}),
|
|
59
|
+
createTool({
|
|
60
|
+
name: "update_catalog_field_mappings",
|
|
61
|
+
description: "Update catalog field mappings (data types). Valid types: boolean, date, geo_location, long, double, object, and string",
|
|
62
|
+
schema: UpdateCatalogFieldMappingsParamsSchema,
|
|
63
|
+
execute: (params) => client.updateCatalogFieldMappings(params),
|
|
64
|
+
}),
|
|
65
|
+
createTool({
|
|
66
|
+
name: "bulk_delete_catalog_items",
|
|
67
|
+
description: "Bulk delete catalog items by their IDs",
|
|
68
|
+
schema: BulkDeleteCatalogItemsParamsSchema,
|
|
69
|
+
execute: (params) => client.bulkDeleteCatalogItems(params),
|
|
70
|
+
}),
|
|
71
|
+
createTool({
|
|
72
|
+
name: "partial_update_catalog_item",
|
|
73
|
+
description: "Partial update (PATCH) a catalog item - updates only specified fields",
|
|
74
|
+
schema: PartialUpdateCatalogItemParamsSchema,
|
|
75
|
+
execute: (params) => client.partialUpdateCatalogItem(params),
|
|
76
|
+
}),
|
|
77
|
+
createTool({
|
|
78
|
+
name: "replace_catalog_item",
|
|
79
|
+
description: "Replace (PUT) a catalog item - replaces the entire item with new value",
|
|
80
|
+
schema: ReplaceCatalogItemParamsSchema,
|
|
81
|
+
execute: (params) => client.replaceCatalogItem(params),
|
|
82
|
+
}),
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=catalogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogs.js","sourceRoot":"","sources":["../../src/tools/catalogs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,6BAA6B,EAC7B,mCAAmC,EACnC,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACvB,oCAAoC,EACpC,8BAA8B,EAC9B,sCAAsC,EACtC,6BAA6B,GAC9B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,kBAAkB,CAAC,MAAsB;IACvD,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,sBAAsB;YACnC,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC;SAC9D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,sBAAsB;YACnC,MAAM,EAAE,6BAA6B;YACrC,O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AM,CAAC;gBACf,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAClE,CAAC;YACF,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC;SAC9D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,+BAA+B;YACrC,WAAW,EACT,wHAAwH;YAC1H,MAAM,EAAE,sCAAsC;YAC9C,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,MAAM,CAAC;SAC/D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,2BAA2B;YACjC,WAAW,EAAE,wCAAwC;YACrD,MAAM,EAAE,kCAAkC;YAC1C,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC;SAC3D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,6BAA6B;YACnC,WAAW,EACT,uEAAuE;YACzE,MAAM,EAAE,oCAAoC;YAC5C,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,MAAM,CAAC;SAC7D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,wEAAwE;YAC1E,MAAM,EAAE,8BAA8B;YACtC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC;SACvD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable event operations
|
|
3
|
+
*/
|
|
4
|
+
import type { IterableClient } from "@iterable/api";
|
|
5
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
export declare function createEventTools(client: IterableClient): Tool[];
|
|
7
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/tools/events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CA+B/D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable event operations
|
|
3
|
+
*/
|
|
4
|
+
import { GetUserEventsByEmailParamsSchema, GetUserEventsByUserIdParamsSchema, TrackBulkEventsParamsSchema, TrackEventParamsSchema, } from "@iterable/api";
|
|
5
|
+
import { createTool } from "../schema-utils.js";
|
|
6
|
+
export function createEventTools(client) {
|
|
7
|
+
return [
|
|
8
|
+
createTool({
|
|
9
|
+
name: "track_event",
|
|
10
|
+
description: "Track a custom event for a user",
|
|
11
|
+
schema: TrackEventParamsSchema,
|
|
12
|
+
execute: (params) => client.trackEvent(params),
|
|
13
|
+
}),
|
|
14
|
+
createTool({
|
|
15
|
+
name: "track_bulk_events",
|
|
16
|
+
description: "Track multiple events in a single request for better performance",
|
|
17
|
+
schema: TrackBulkEventsParamsSchema,
|
|
18
|
+
execute: (params) => client.trackBulkEvents(params),
|
|
19
|
+
}),
|
|
20
|
+
createTool({
|
|
21
|
+
name: "get_user_events_by_email",
|
|
22
|
+
description: "Get event history for a user by email address",
|
|
23
|
+
schema: GetUserEventsByEmailParamsSchema,
|
|
24
|
+
execute: (params) => client.getUserEventsByEmail(params),
|
|
25
|
+
}),
|
|
26
|
+
createTool({
|
|
27
|
+
name: "get_user_events_by_user_id",
|
|
28
|
+
description: "Get event history for a user by user ID",
|
|
29
|
+
schema: GetUserEventsByUserIdParamsSchema,
|
|
30
|
+
execute: (params) => client.getUserEventsByUserId(params),
|
|
31
|
+
}),
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/tools/events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,gBAAgB,CAAC,MAAsB;IACrD,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,iCAAiC;YAC9C,MAAM,EAAE,sBAAsB;YAC9B,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;SAC/C,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,mBAAmB;YACzB,WAAW,EACT,kEAAkE;YACpE,MAAM,EAAE,2BAA2B;YACnC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;SACpD,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,+CAA+C;YAC5D,MAAM,EAAE,gCAAgC;YACxC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC;SACzD,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,4BAA4B;YAClC,WAAW,EAAE,yCAAyC;YACtD,MAAM,EAAE,iCAAiC;YACzC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC;SAC1D,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable experiment operations
|
|
3
|
+
*/
|
|
4
|
+
import type { IterableClient } from "@iterable/api";
|
|
5
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
export declare function createExperimentTools(client: IterableClient): Tool[];
|
|
7
|
+
//# sourceMappingURL=experiments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/tools/experiments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAUpE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable experiment operations
|
|
3
|
+
*/
|
|
4
|
+
import { GetExperimentMetricsParamsSchema } from "@iterable/api";
|
|
5
|
+
import { createTool } from "../schema-utils.js";
|
|
6
|
+
export function createExperimentTools(client) {
|
|
7
|
+
return [
|
|
8
|
+
createTool({
|
|
9
|
+
name: "get_experiment_metrics",
|
|
10
|
+
description: "Get experiment metrics for A/B testing analysis (currently supports email experiments only)",
|
|
11
|
+
schema: GetExperimentMetricsParamsSchema,
|
|
12
|
+
execute: (params) => client.getExperimentMetrics(params),
|
|
13
|
+
}),
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=experiments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/tools/experiments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EACT,6FAA6F;YAC/F,MAAM,EAAE,gCAAgC;YACxC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC;SACzD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable data export operations
|
|
3
|
+
*/
|
|
4
|
+
import type { IterableClient } from "@iterable/api";
|
|
5
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
export declare function createExportTools(client: IterableClient): Tool[];
|
|
7
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/tools/export.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAK/D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAuChE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable data export operations
|
|
3
|
+
*/
|
|
4
|
+
import { CancelExportJobParamsSchema, GetExportFilesParamsSchema, GetExportJobsParamsSchema, StartExportJobParamsSchema, } from "@iterable/api";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { createTool } from "../schema-utils.js";
|
|
7
|
+
export function createExportTools(client) {
|
|
8
|
+
return [
|
|
9
|
+
createTool({
|
|
10
|
+
name: "get_available_export_data_types",
|
|
11
|
+
description: "Get the list of all available export data types that can be used with start_export_job. Returns an array of data type names that are supported by the Iterable API.",
|
|
12
|
+
schema: z.object({}),
|
|
13
|
+
execute: async () => StartExportJobParamsSchema.shape.dataTypeName.options,
|
|
14
|
+
}),
|
|
15
|
+
createTool({
|
|
16
|
+
name: "get_export_jobs",
|
|
17
|
+
description: "Get a list of recent export jobs for the current project. Jobs can be filtered by state (enqueued, queued, running, completed, failed, cancelled, cancelling).",
|
|
18
|
+
schema: GetExportJobsParamsSchema,
|
|
19
|
+
execute: (params) => client.getExportJobs(params),
|
|
20
|
+
}),
|
|
21
|
+
createTool({
|
|
22
|
+
name: "get_export_files",
|
|
23
|
+
description: "Get the job status and download URLs for files from a completed export job. Files are added to the list as the export job runs. Use 'startAfter' parameter to paginate through files. Each file is up to 10MB, with exports limited to 100GB total size.",
|
|
24
|
+
schema: GetExportFilesParamsSchema,
|
|
25
|
+
execute: (params) => client.getExportFiles(params),
|
|
26
|
+
}),
|
|
27
|
+
createTool({
|
|
28
|
+
name: "start_export_job",
|
|
29
|
+
description: "Start a data export job that processes as a background job. Use 'get_export_files' to check status and obtain download links. Supports many data types including: email events (emailSend, emailOpen, emailClick, emailBounce, etc.), push events (pushSend, pushOpen, etc.), SMS events (smsSend, smsBounce, etc.), WhatsApp events, in-app message events, user data, purchase events, and more. Additional requests are queued if concurrent limit is reached.",
|
|
30
|
+
schema: StartExportJobParamsSchema,
|
|
31
|
+
execute: (params) => client.startExportJob(params),
|
|
32
|
+
}),
|
|
33
|
+
createTool({
|
|
34
|
+
name: "cancel_export_job",
|
|
35
|
+
description: "Cancel a queued or running export job created with 'start_export_job'. Use the jobId returned from the start export endpoint.",
|
|
36
|
+
schema: CancelExportJobParamsSchema,
|
|
37
|
+
execute: (params) => client.cancelExportJob(params),
|
|
38
|
+
}),
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/tools/export.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,2BAA2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
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central registry for all Iterable MCP tools
|
|
3
|
+
* Simplified tool creation with registry pattern
|
|
4
|
+
*/
|
|
5
|
+
import type { IterableClient } from "@iterable/api";
|
|
6
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Registry of all tool creators
|
|
9
|
+
* Makes it easy to add/remove tool categories
|
|
10
|
+
*/
|
|
11
|
+
export declare const TOOL_CREATORS_BY_CATEGORY: {
|
|
12
|
+
category: string;
|
|
13
|
+
creator: (client: IterableClient) => Tool[];
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* Create all Iterable MCP tools
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAllTools(client: IterableClient): Tool[];
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAiB/D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,EAAE,CAAC;CAC7C,EAcS,CAAC;AAEX;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAE7D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central registry for all Iterable MCP tools
|
|
3
|
+
* Simplified tool creation with registry pattern
|
|
4
|
+
*/
|
|
5
|
+
// Import all tool creators
|
|
6
|
+
import { createCampaignTools } from "./campaigns.js";
|
|
7
|
+
import { createCatalogTools } from "./catalogs.js";
|
|
8
|
+
import { createEventTools } from "./events.js";
|
|
9
|
+
import { createExperimentTools } from "./experiments.js";
|
|
10
|
+
import { createExportTools } from "./export.js";
|
|
11
|
+
import { createJourneyTools } from "./journeys.js";
|
|
12
|
+
import { createListTools } from "./lists.js";
|
|
13
|
+
import { createMessagingTools } from "./messaging.js";
|
|
14
|
+
import { createSnippetTools } from "./snippets.js";
|
|
15
|
+
import { createSubscriptionTools } from "./subscriptions.js";
|
|
16
|
+
import { createTemplateTools } from "./templates.js";
|
|
17
|
+
import { createUserTools } from "./users.js";
|
|
18
|
+
import { createWebhookTools } from "./webhooks.js";
|
|
19
|
+
/**
|
|
20
|
+
* Registry of all tool creators
|
|
21
|
+
* Makes it easy to add/remove tool categories
|
|
22
|
+
*/
|
|
23
|
+
export const TOOL_CREATORS_BY_CATEGORY = [
|
|
24
|
+
{ category: "Campaigns", creator: createCampaignTools },
|
|
25
|
+
{ category: "Catalogs", creator: createCatalogTools },
|
|
26
|
+
{ category: "Data Export", creator: createExportTools },
|
|
27
|
+
{ category: "Events", creator: createEventTools },
|
|
28
|
+
{ category: "Experiments", creator: createExperimentTools },
|
|
29
|
+
{ category: "Journeys", creator: createJourneyTools },
|
|
30
|
+
{ category: "Lists", creator: createListTools },
|
|
31
|
+
{ category: "Messaging", creator: createMessagingTools },
|
|
32
|
+
{ category: "Snippets", creator: createSnippetTools },
|
|
33
|
+
{ category: "Subscriptions", creator: createSubscriptionTools },
|
|
34
|
+
{ category: "Templates", creator: createTemplateTools },
|
|
35
|
+
{ category: "Users", creator: createUserTools },
|
|
36
|
+
{ category: "Webhooks", creator: createWebhookTools },
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Create all Iterable MCP tools
|
|
40
|
+
*/
|
|
41
|
+
export function createAllTools(client) {
|
|
42
|
+
return TOOL_CREATORS_BY_CATEGORY.flatMap(({ creator }) => creator(client));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,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AE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE;IAC/C,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,oBAAoB,EAAE;IACxD,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,EAAE;IACrD,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,uBAAuB,EAAE;IAC/D,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,EAAE;IACvD,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE;IAC/C,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,EAAE;CAC7C,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsB;IACnD,OAAO,yBAAyB,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable journey (workflow) operations
|
|
3
|
+
*/
|
|
4
|
+
import type { IterableClient } from "@iterable/api";
|
|
5
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Create all journey management tools
|
|
8
|
+
*/
|
|
9
|
+
export declare function createJourneyTools(client: IterableClient): Tool[];
|
|
10
|
+
//# sourceMappingURL=journeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journeys.d.ts","sourceRoot":"","sources":["../../src/tools/journeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAKpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAgBjE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable journey (workflow) operations
|
|
3
|
+
*/
|
|
4
|
+
import { GetJourneysParamsSchema, TriggerJourneyParamsSchema, } from "@iterable/api";
|
|
5
|
+
import { createTool } from "../schema-utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* Create all journey management tools
|
|
8
|
+
*/
|
|
9
|
+
export function createJourneyTools(client) {
|
|
10
|
+
return [
|
|
11
|
+
createTool({
|
|
12
|
+
name: "get_journeys",
|
|
13
|
+
description: "Get journeys (workflows) with optional pagination and state filtering",
|
|
14
|
+
schema: GetJourneysParamsSchema,
|
|
15
|
+
execute: (params) => client.getJourneys(params),
|
|
16
|
+
}),
|
|
17
|
+
createTool({
|
|
18
|
+
name: "trigger_journey",
|
|
19
|
+
description: "Trigger a journey (workflow) for a user",
|
|
20
|
+
schema: TriggerJourneyParamsSchema,
|
|
21
|
+
execute: (params) => client.triggerJourney(params),
|
|
22
|
+
}),
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=journeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journeys.js","sourceRoot":"","sources":["../../src/tools/journeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAsB;IACvD,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,cAAc;YACpB,WAAW,EACT,uEAAuE;YACzE,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;SAChD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,yCAAyC;YACtD,MAAM,EAAE,0BAA0B;YAClC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC;SACnD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable list operations
|
|
3
|
+
*/
|
|
4
|
+
import type { IterableClient } from "@iterable/api";
|
|
5
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
export declare function createListTools(client: IterableClient): Tool[];
|
|
7
|
+
//# sourceMappingURL=lists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAWpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAoD9D"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tools for Iterable list operations
|
|
3
|
+
*/
|
|
4
|
+
import { CreateListParamsSchema, DeleteListParamsSchema, GetListPreviewUsersParamsSchema, GetListSizeParamsSchema, GetListsParamsSchema, GetListUsersParamsSchema, SubscribeToListParamsSchema, UnsubscribeFromListParamsSchema, } from "@iterable/api";
|
|
5
|
+
import { createTool } from "../schema-utils.js";
|
|
6
|
+
export function createListTools(client) {
|
|
7
|
+
return [
|
|
8
|
+
createTool({
|
|
9
|
+
name: "get_lists",
|
|
10
|
+
description: "Retrieve user lists",
|
|
11
|
+
schema: GetListsParamsSchema,
|
|
12
|
+
execute: () => client.getLists(),
|
|
13
|
+
}),
|
|
14
|
+
createTool({
|
|
15
|
+
name: "subscribe_to_list",
|
|
16
|
+
description: "Subscribe users to a specific list",
|
|
17
|
+
schema: SubscribeToListParamsSchema,
|
|
18
|
+
execute: (params) => client.subscribeUserToList(params),
|
|
19
|
+
}),
|
|
20
|
+
createTool({
|
|
21
|
+
name: "get_list_users",
|
|
22
|
+
description: "Get users in a specific list",
|
|
23
|
+
schema: GetListUsersParamsSchema,
|
|
24
|
+
execute: (params) => client.getListUsers(params),
|
|
25
|
+
}),
|
|
26
|
+
createTool({
|
|
27
|
+
name: "create_list",
|
|
28
|
+
description: "Create a new user list",
|
|
29
|
+
schema: CreateListParamsSchema,
|
|
30
|
+
execute: (params) => client.createList(params),
|
|
31
|
+
}),
|
|
32
|
+
createTool({
|
|
33
|
+
name: "delete_list",
|
|
34
|
+
description: "Delete a user list",
|
|
35
|
+
schema: DeleteListParamsSchema,
|
|
36
|
+
execute: (params) => client.deleteList(params.listId),
|
|
37
|
+
}),
|
|
38
|
+
createTool({
|
|
39
|
+
name: "unsubscribe_from_list",
|
|
40
|
+
description: "Unsubscribe users from a specific list",
|
|
41
|
+
schema: UnsubscribeFromListParamsSchema,
|
|
42
|
+
execute: (params) => client.unsubscribeUserFromList(params),
|
|
43
|
+
}),
|
|
44
|
+
createTool({
|
|
45
|
+
name: "get_list_size",
|
|
46
|
+
description: "Get the count of users in a specific list",
|
|
47
|
+
schema: GetListSizeParamsSchema,
|
|
48
|
+
execute: (params) => client.getListSize(params),
|
|
49
|
+
}),
|
|
50
|
+
createTool({
|
|
51
|
+
name: "get_list_preview_users",
|
|
52
|
+
description: "Preview users in a list (up to 5000 users)",
|
|
53
|
+
schema: GetListPreviewUsersParamsSchema,
|
|
54
|
+
execute: (params) => client.getListPreviewUsers(params),
|
|
55
|
+
}),
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=lists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":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AAU,CAAC;YACT,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,wCAAwC;YACrD,MAAM,EAAE,+BAA+B;YACvC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC;SAC5D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,2CAA2C;YACxD,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;SAChD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EAAE,4CAA4C;YACzD,MAAM,EAAE,+BAA+B;YACvC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC;SACxD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consolidated messaging tools for all communication channels
|
|
3
|
+
* Uses factory pattern to eliminate duplication across channels
|
|
4
|
+
*/
|
|
5
|
+
import type { IterableClient } from "@iterable/api";
|
|
6
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Create all messaging tools using the factory pattern
|
|
9
|
+
*/
|
|
10
|
+
export declare function createMessagingTools(client: IterableClient): Tool[];
|
|
11
|
+
//# sourceMappingURL=messaging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/tools/messaging.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAcpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAuF/D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAoCnE"}
|