Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions TOOLS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Available Iterable MCP Tools (109 tools)
# Available Iterable MCP Tools (118 tools)

**Legend:**
- 🔒 = Requires enabling user PII access
Expand Down Expand Up @@ -50,11 +50,20 @@
- **track_bulk_events** 🔒✏️✉️: Track multiple events in a single request for better performance
- **track_event** 🔒✏️✉️: Track a custom event for a user

## Experiments (4 tools)
## Experiments (13 tools)
- **cancel_experiment** ✏️: Cancel a running or winner_found campaign experiment without declaring a winner.
- **copy_experiment_variant** ✏️: Copy a template into a new variant on a draft or ready campaign experiment.
- **create_experiment** ✏️: Create a draft campaign experiment. The campaign template becomes the control.
- **declare_experiment_winner** ✏️✉️: Declare a winning variant and end a running or winner_found campaign experiment.
- **delete_experiment** ✏️: Delete a draft, ready, or errored campaign experiment.
- **get_experiment**: Get detailed information about a specific experiment by ID, including variants summary and constraints
- **get_experiment_metrics**: Get experiment metrics for A/B testing analysis (currently supports email experiments only)
- **get_experiment_totals**: Get lifetime send and conversion totals for a campaign experiment. Holdout is omitted, missing counts are 0, and lift and confidence are not included.
- **get_experiment_trends**: Get the performance time series for a campaign experiment. Provide both startDateTime and endDateTime, or omit both to use the run window. The span is at most 31 days; a longer default window is clipped to the last 31 days.
- **get_experiment_variants**: Get variant content for an experiment, including subject lines, preheaders, HTML source, and plain text
- **list_experiments**: List experiments with optional filtering by campaign, status, and date range. Supports pagination.
- **start_experiment** ✏️✉️: Start a draft or ready campaign experiment.
- **update_experiment_settings** ✏️: Update settings on a draft or ready campaign experiment. Omit a field to leave it unchanged.

## Journeys (2 tools)
- **get_journeys**: Get journeys (workflows) with optional pagination and state filtering
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"dependencies": {
"@alcyone-labs/zod-to-json-schema": "4.0.10",
"@iterable/api": "0.12.0",
"@iterable/api": "0.13.0",
"@modelcontextprotocol/sdk": "1.18.1",
"@primno/dpapi": "2.0.1",
"@types/json-schema": "7.0.15",
Expand Down
22 changes: 8 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions src/tool-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ export const NON_PII_TOOLS: Set<string> = new Set([
"archive_campaigns",
"bulk_delete_catalog_items",
"cancel_campaign",
"cancel_experiment",
"copy_experiment_variant",
"create_blast_campaign",
"create_experiment",
"create_triggered_campaign",
"create_catalog",
"create_list",
"create_snippet",
"deactivate_triggered_campaign",
"declare_experiment_winner",
"delete_catalog",
"delete_experiment",
"delete_catalog_item",
"delete_list",
"delete_snippet",
Expand All @@ -36,6 +41,8 @@ export const NON_PII_TOOLS: Set<string> = new Set([
"get_email_template",
"get_experiment",
"get_experiment_metrics",
"get_experiment_totals",
"get_experiment_trends",
"get_experiment_variants",
"get_inapp_template",
"get_journeys",
Expand All @@ -57,11 +64,13 @@ export const NON_PII_TOOLS: Set<string> = new Set([
"replace_catalog_item",
"schedule_campaign",
"send_campaign",
"start_experiment",
"trigger_campaign",
"update_catalog_field_mappings",
"partial_update_catalog_items",
"replace_catalog_items",
"update_email_template",
"update_experiment_settings",
"update_inapp_template",
"update_push_template",
"update_sms_template",
Expand All @@ -87,6 +96,8 @@ export const READ_ONLY_TOOLS: Set<string> = new Set([
"get_embedded_messages",
"get_experiment",
"get_experiment_metrics",
"get_experiment_totals",
"get_experiment_trends",
"get_experiment_variants",
"get_export_files",
"get_export_jobs",
Expand Down Expand Up @@ -125,6 +136,8 @@ export const SEND_TOOLS: Set<string> = new Set([
"send_campaign",
"trigger_campaign",
"schedule_campaign",
"start_experiment",
"declare_experiment_winner",
// Triggered campaigns can cause sends upon activation; block unless explicitly allowed
"activate_triggered_campaign",
// Journey triggers enqueue users which may send
Expand Down
68 changes: 68 additions & 0 deletions src/tools/experiments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@

import type { IterableClient } from "@iterable/api";
import {
CopyExperimentVariantParamsSchema,
CreateExperimentParamsSchema,
DeclareExperimentWinnerParamsSchema,
ExperimentIdParamsSchema,
GetExperimentMetricsParamsSchema,
GetExperimentParamsSchema,
GetExperimentTotalsParamsSchema,
GetExperimentTrendsParamsSchema,
GetExperimentVariantsParamsSchema,
ListExperimentsParamsSchema,
UpdateExperimentSettingsParamsSchema,
} from "@iterable/api";
import type { Tool } from "@modelcontextprotocol/sdk/types.js";

Expand Down Expand Up @@ -43,5 +50,66 @@ export function createExperimentTools(client: IterableClient): Tool[] {
schema: GetExperimentMetricsParamsSchema,
execute: (params) => client.getExperimentMetrics(params),
}),
createTool({
name: "get_experiment_totals",
description:
"Get lifetime send and conversion totals for a campaign experiment. Holdout is omitted, missing counts are 0, and lift and confidence are not included.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to include or will it have a major rework, or is it out of scope?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lift and confidence? Out of scope, might be added when we change our data source further down the road

schema: GetExperimentTotalsParamsSchema,
execute: (params) => client.getExperimentTotals(params),
}),
createTool({
name: "get_experiment_trends",
description:
"Get the performance time series for a campaign experiment. Provide both startDateTime and endDateTime, or omit both to use the run window. The span is at most 31 days; a longer default window is clipped to the last 31 days.",
schema: GetExperimentTrendsParamsSchema,
execute: (params) => client.getExperimentTrends(params),
}),
createTool({
name: "create_experiment",
description:
"Create a draft campaign experiment. The campaign template becomes the control.",
schema: CreateExperimentParamsSchema,
execute: (params) => client.createExperiment(params),
}),
createTool({
name: "copy_experiment_variant",
description:
"Copy a template into a new variant on a draft or ready campaign experiment.",
schema: CopyExperimentVariantParamsSchema,
execute: (params) => client.copyExperimentVariant(params),
}),
createTool({
name: "update_experiment_settings",
description:
"Update settings on a draft or ready campaign experiment. Omit a field to leave it unchanged.",
schema: UpdateExperimentSettingsParamsSchema,
execute: (params) => client.updateExperimentSettings(params),
}),
createTool({
name: "start_experiment",
description: "Start a draft or ready campaign experiment.",
schema: ExperimentIdParamsSchema,
execute: (params) => client.startExperiment(params),
}),
createTool({
name: "cancel_experiment",
description:
"Cancel a running or winner_found campaign experiment without declaring a winner.",
schema: ExperimentIdParamsSchema,
execute: (params) => client.cancelExperiment(params),
}),
createTool({
name: "declare_experiment_winner",
description:
"Declare a winning variant and end a running or winner_found campaign experiment.",
schema: DeclareExperimentWinnerParamsSchema,
execute: (params) => client.declareExperimentWinner(params),
}),
createTool({
name: "delete_experiment",
description: "Delete a draft, ready, or errored campaign experiment.",
schema: ExperimentIdParamsSchema,
execute: (params) => client.deleteExperiment(params),
}),
];
}
Loading
Loading