Skip to content

Commit 69a6542

Browse files
authored
feat #183: wire channel settings MCP tools (email, push, SMS, mobile, payment, Facebook) (#195)
Add 12 MCP tool handlers for the 6 channel settings modules: - 6 view tools for reading current config (email, push, SMS, mobile messaging, payment tracking, Facebook Messenger) - 6 prepare_configure tools for updating config via two-phase commit - Tool name constants and BLOOMREACH_MCP_TOOL_NAMES array entries - Updated test expectations (267→279 tools, 36→37 domains)
1 parent f19625e commit 69a6542

File tree

3 files changed

+279
-2
lines changed

3 files changed

+279
-2
lines changed

packages/mcp/src/__tests__/toolConstants.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { BLOOMREACH_MCP_TOOL_NAMES } from '../index.js';
33

44
describe('tool constants', () => {
55
it('exports 267 tool name constants via BLOOMREACH_MCP_TOOL_NAMES', () => {
6-
expect(BLOOMREACH_MCP_TOOL_NAMES).toHaveLength(267);
6+
expect(BLOOMREACH_MCP_TOOL_NAMES).toHaveLength(279);
77
});
88

99
it('all tool names follow bloomreach.<domain>.<action> dot-notation', () => {
@@ -46,13 +46,14 @@ describe('tool constants', () => {
4646
}
4747
});
4848

49-
it('covers all 35 expected service domains', () => {
49+
it('covers all 37 expected service domains', () => {
5050
const domains = new Set(BLOOMREACH_MCP_TOOL_NAMES.map((name) => name.split('.')[1]));
5151
const expectedDomains = [
5252
'actions',
5353
'access',
5454
'assets',
5555
'campaign_settings',
56+
'channel_settings',
5657
'campaigns_calendar',
5758
'catalogs',
5859
'customers',

packages/mcp/src/bin/bloomreach-mcp.ts

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4628,6 +4628,245 @@ const tools: ToolRoute[] = [
46284628
serviceClass: 'BloomreachEvaluationSettingsService',
46294629
methodName: 'prepareConfigureVoucherMapping',
46304630
},
4631+
// --- Channel settings tools (issue #183) ---
4632+
{
4633+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_EMAIL_VIEW_TOOL,
4634+
description:
4635+
'View email channel settings including sender domains, DKIM/SPF configuration status, and default from address. ⚠️ Not yet available — coming in a future release.',
4636+
inputSchema: createInputSchema(true),
4637+
serviceClass: 'BloomreachChannelSettingsService',
4638+
methodName: 'viewEmailSettings',
4639+
},
4640+
{
4641+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_EMAIL_PREPARE_CONFIGURE_TOOL,
4642+
description:
4643+
'Configure an email sending domain. Returns a confirmToken — call bloomreach.actions.confirm to execute.',
4644+
inputSchema: {
4645+
type: 'object',
4646+
properties: {
4647+
project: {
4648+
type: 'string',
4649+
description:
4650+
'Bloomreach project identifier. Defaults to BLOOMREACH_PROJECT when omitted.',
4651+
},
4652+
domain: {
4653+
type: 'string',
4654+
description: 'Email domain to configure (e.g. "mail.example.com").',
4655+
},
4656+
operatorNote: {
4657+
type: 'string',
4658+
description: 'Optional note describing the reason for this action.',
4659+
},
4660+
},
4661+
required: ['project', 'domain'],
4662+
additionalProperties: true,
4663+
},
4664+
serviceClass: 'BloomreachChannelSettingsService',
4665+
methodName: 'prepareConfigureEmailDomain',
4666+
},
4667+
{
4668+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_PUSH_VIEW_TOOL,
4669+
description:
4670+
'View push notification settings including provider and Firebase/APNs configuration status. ⚠️ Not yet available — coming in a future release.',
4671+
inputSchema: createInputSchema(true),
4672+
serviceClass: 'BloomreachChannelSettingsService',
4673+
methodName: 'viewPushNotificationSettings',
4674+
},
4675+
{
4676+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_PUSH_PREPARE_CONFIGURE_TOOL,
4677+
description:
4678+
'Configure push notification provider. Returns a confirmToken — call bloomreach.actions.confirm to execute.',
4679+
inputSchema: {
4680+
type: 'object',
4681+
properties: {
4682+
project: {
4683+
type: 'string',
4684+
description:
4685+
'Bloomreach project identifier. Defaults to BLOOMREACH_PROJECT when omitted.',
4686+
},
4687+
provider: {
4688+
type: 'string',
4689+
description: 'Push notification provider name (e.g. "firebase", "apns").',
4690+
},
4691+
firebaseCredentials: {
4692+
type: 'string',
4693+
description: 'Firebase Cloud Messaging credentials JSON.',
4694+
},
4695+
apnsCertificate: {
4696+
type: 'string',
4697+
description: 'Apple Push Notification service certificate.',
4698+
},
4699+
operatorNote: {
4700+
type: 'string',
4701+
description: 'Optional note describing the reason for this action.',
4702+
},
4703+
},
4704+
required: ['project', 'provider'],
4705+
additionalProperties: true,
4706+
},
4707+
serviceClass: 'BloomreachChannelSettingsService',
4708+
methodName: 'prepareConfigurePushProvider',
4709+
},
4710+
{
4711+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_SMS_VIEW_TOOL,
4712+
description:
4713+
'View SMS channel settings including provider and sender number. ⚠️ Not yet available — coming in a future release.',
4714+
inputSchema: createInputSchema(true),
4715+
serviceClass: 'BloomreachChannelSettingsService',
4716+
methodName: 'viewSmsSettings',
4717+
},
4718+
{
4719+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_SMS_PREPARE_CONFIGURE_TOOL,
4720+
description:
4721+
'Configure SMS provider. Returns a confirmToken — call bloomreach.actions.confirm to execute.',
4722+
inputSchema: {
4723+
type: 'object',
4724+
properties: {
4725+
project: {
4726+
type: 'string',
4727+
description:
4728+
'Bloomreach project identifier. Defaults to BLOOMREACH_PROJECT when omitted.',
4729+
},
4730+
provider: {
4731+
type: 'string',
4732+
description: 'SMS provider name.',
4733+
},
4734+
senderNumber: {
4735+
type: 'string',
4736+
description: 'Sender phone number for outbound SMS.',
4737+
},
4738+
operatorNote: {
4739+
type: 'string',
4740+
description: 'Optional note describing the reason for this action.',
4741+
},
4742+
},
4743+
required: ['project', 'provider'],
4744+
additionalProperties: true,
4745+
},
4746+
serviceClass: 'BloomreachChannelSettingsService',
4747+
methodName: 'prepareConfigureSmsProvider',
4748+
},
4749+
{
4750+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_MOBILE_MESSAGING_VIEW_TOOL,
4751+
description:
4752+
'View mobile messaging settings including WhatsApp and RCS configuration status. ⚠️ Not yet available — coming in a future release.',
4753+
inputSchema: createInputSchema(true),
4754+
serviceClass: 'BloomreachChannelSettingsService',
4755+
methodName: 'viewMobileMessagingSettings',
4756+
},
4757+
{
4758+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_MOBILE_MESSAGING_PREPARE_CONFIGURE_TOOL,
4759+
description:
4760+
'Configure mobile messaging channels (WhatsApp, RCS). Returns a confirmToken — call bloomreach.actions.confirm to execute.',
4761+
inputSchema: {
4762+
type: 'object',
4763+
properties: {
4764+
project: {
4765+
type: 'string',
4766+
description:
4767+
'Bloomreach project identifier. Defaults to BLOOMREACH_PROJECT when omitted.',
4768+
},
4769+
provider: {
4770+
type: 'string',
4771+
description: 'Mobile messaging provider name.',
4772+
},
4773+
whatsappEnabled: {
4774+
type: 'boolean',
4775+
description: 'Whether to enable WhatsApp messaging.',
4776+
},
4777+
rcsEnabled: {
4778+
type: 'boolean',
4779+
description: 'Whether to enable RCS messaging.',
4780+
},
4781+
operatorNote: {
4782+
type: 'string',
4783+
description: 'Optional note describing the reason for this action.',
4784+
},
4785+
},
4786+
required: ['project', 'provider'],
4787+
additionalProperties: true,
4788+
},
4789+
serviceClass: 'BloomreachChannelSettingsService',
4790+
methodName: 'prepareConfigureMobileMessaging',
4791+
},
4792+
{
4793+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_PAYMENT_TRACKING_VIEW_TOOL,
4794+
description:
4795+
'View payment tracking settings including provider and enabled status. ⚠️ Not yet available — coming in a future release.',
4796+
inputSchema: createInputSchema(true),
4797+
serviceClass: 'BloomreachChannelSettingsService',
4798+
methodName: 'viewPaymentTrackingSettings',
4799+
},
4800+
{
4801+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_PAYMENT_TRACKING_PREPARE_CONFIGURE_TOOL,
4802+
description:
4803+
'Configure payment tracking integration. Returns a confirmToken — call bloomreach.actions.confirm to execute.',
4804+
inputSchema: {
4805+
type: 'object',
4806+
properties: {
4807+
project: {
4808+
type: 'string',
4809+
description:
4810+
'Bloomreach project identifier. Defaults to BLOOMREACH_PROJECT when omitted.',
4811+
},
4812+
provider: {
4813+
type: 'string',
4814+
description: 'Payment tracking provider name.',
4815+
},
4816+
enabled: {
4817+
type: 'boolean',
4818+
description: 'Whether to enable payment tracking.',
4819+
},
4820+
operatorNote: {
4821+
type: 'string',
4822+
description: 'Optional note describing the reason for this action.',
4823+
},
4824+
},
4825+
required: ['project', 'provider'],
4826+
additionalProperties: true,
4827+
},
4828+
serviceClass: 'BloomreachChannelSettingsService',
4829+
methodName: 'prepareConfigurePaymentTracking',
4830+
},
4831+
{
4832+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_FACEBOOK_MESSAGING_VIEW_TOOL,
4833+
description:
4834+
'View Facebook Messenger settings including page connection status and page name. ⚠️ Not yet available — coming in a future release.',
4835+
inputSchema: createInputSchema(true),
4836+
serviceClass: 'BloomreachChannelSettingsService',
4837+
methodName: 'viewFacebookMessagingSettings',
4838+
},
4839+
{
4840+
name: toolNames.BLOOMREACH_CHANNEL_SETTINGS_FACEBOOK_MESSAGING_PREPARE_CONFIGURE_TOOL,
4841+
description:
4842+
'Configure Facebook Messenger integration. Returns a confirmToken — call bloomreach.actions.confirm to execute.',
4843+
inputSchema: {
4844+
type: 'object',
4845+
properties: {
4846+
project: {
4847+
type: 'string',
4848+
description:
4849+
'Bloomreach project identifier. Defaults to BLOOMREACH_PROJECT when omitted.',
4850+
},
4851+
pageId: {
4852+
type: 'string',
4853+
description: 'Facebook Page ID to connect.',
4854+
},
4855+
accessToken: {
4856+
type: 'string',
4857+
description: 'Facebook Page access token.',
4858+
},
4859+
operatorNote: {
4860+
type: 'string',
4861+
description: 'Optional note describing the reason for this action.',
4862+
},
4863+
},
4864+
required: ['project', 'pageId'],
4865+
additionalProperties: true,
4866+
},
4867+
serviceClass: 'BloomreachChannelSettingsService',
4868+
methodName: 'prepareConfigureFacebookMessaging',
4869+
},
46314870
{
46324871
name: toolNames.BLOOMREACH_WEBLAYERS_LIST_TOOL,
46334872
description:

packages/mcp/src/index.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,31 @@ export const BLOOMREACH_EVALUATION_SETTINGS_VOUCHER_MAPPING_VIEW_TOOL =
295295
'bloomreach.evaluation_settings.voucher_mapping.view';
296296
export const BLOOMREACH_EVALUATION_SETTINGS_VOUCHER_MAPPING_PREPARE_CONFIGURE_TOOL =
297297
'bloomreach.evaluation_settings.voucher_mapping.prepare_configure';
298+
// --- Channel settings tools (issue #183) ---
299+
export const BLOOMREACH_CHANNEL_SETTINGS_EMAIL_VIEW_TOOL =
300+
'bloomreach.channel_settings.email.view';
301+
export const BLOOMREACH_CHANNEL_SETTINGS_EMAIL_PREPARE_CONFIGURE_TOOL =
302+
'bloomreach.channel_settings.email.prepare_configure';
303+
export const BLOOMREACH_CHANNEL_SETTINGS_PUSH_VIEW_TOOL =
304+
'bloomreach.channel_settings.push.view';
305+
export const BLOOMREACH_CHANNEL_SETTINGS_PUSH_PREPARE_CONFIGURE_TOOL =
306+
'bloomreach.channel_settings.push.prepare_configure';
307+
export const BLOOMREACH_CHANNEL_SETTINGS_SMS_VIEW_TOOL =
308+
'bloomreach.channel_settings.sms.view';
309+
export const BLOOMREACH_CHANNEL_SETTINGS_SMS_PREPARE_CONFIGURE_TOOL =
310+
'bloomreach.channel_settings.sms.prepare_configure';
311+
export const BLOOMREACH_CHANNEL_SETTINGS_MOBILE_MESSAGING_VIEW_TOOL =
312+
'bloomreach.channel_settings.mobile_messaging.view';
313+
export const BLOOMREACH_CHANNEL_SETTINGS_MOBILE_MESSAGING_PREPARE_CONFIGURE_TOOL =
314+
'bloomreach.channel_settings.mobile_messaging.prepare_configure';
315+
export const BLOOMREACH_CHANNEL_SETTINGS_PAYMENT_TRACKING_VIEW_TOOL =
316+
'bloomreach.channel_settings.payment_tracking.view';
317+
export const BLOOMREACH_CHANNEL_SETTINGS_PAYMENT_TRACKING_PREPARE_CONFIGURE_TOOL =
318+
'bloomreach.channel_settings.payment_tracking.prepare_configure';
319+
export const BLOOMREACH_CHANNEL_SETTINGS_FACEBOOK_MESSAGING_VIEW_TOOL =
320+
'bloomreach.channel_settings.facebook_messaging.view';
321+
export const BLOOMREACH_CHANNEL_SETTINGS_FACEBOOK_MESSAGING_PREPARE_CONFIGURE_TOOL =
322+
'bloomreach.channel_settings.facebook_messaging.prepare_configure';
298323
export const BLOOMREACH_WEBLAYERS_LIST_TOOL = 'bloomreach.weblayers.list';
299324
export const BLOOMREACH_WEBLAYERS_VIEW_PERFORMANCE_TOOL = 'bloomreach.weblayers.view_performance';
300325
export const BLOOMREACH_WEBLAYERS_PREPARE_CREATE_TOOL = 'bloomreach.weblayers.prepare_create';
@@ -644,6 +669,18 @@ export const BLOOMREACH_MCP_TOOL_NAMES = [
644669
BLOOMREACH_TRACKING_TRACK_CUSTOMER_TOOL,
645670
BLOOMREACH_TRACKING_TRACK_CONSENT_TOOL,
646671
BLOOMREACH_TRACKING_TRACK_CAMPAIGN_TOOL,
672+
BLOOMREACH_CHANNEL_SETTINGS_EMAIL_VIEW_TOOL,
673+
BLOOMREACH_CHANNEL_SETTINGS_EMAIL_PREPARE_CONFIGURE_TOOL,
674+
BLOOMREACH_CHANNEL_SETTINGS_PUSH_VIEW_TOOL,
675+
BLOOMREACH_CHANNEL_SETTINGS_PUSH_PREPARE_CONFIGURE_TOOL,
676+
BLOOMREACH_CHANNEL_SETTINGS_SMS_VIEW_TOOL,
677+
BLOOMREACH_CHANNEL_SETTINGS_SMS_PREPARE_CONFIGURE_TOOL,
678+
BLOOMREACH_CHANNEL_SETTINGS_MOBILE_MESSAGING_VIEW_TOOL,
679+
BLOOMREACH_CHANNEL_SETTINGS_MOBILE_MESSAGING_PREPARE_CONFIGURE_TOOL,
680+
BLOOMREACH_CHANNEL_SETTINGS_PAYMENT_TRACKING_VIEW_TOOL,
681+
BLOOMREACH_CHANNEL_SETTINGS_PAYMENT_TRACKING_PREPARE_CONFIGURE_TOOL,
682+
BLOOMREACH_CHANNEL_SETTINGS_FACEBOOK_MESSAGING_VIEW_TOOL,
683+
BLOOMREACH_CHANNEL_SETTINGS_FACEBOOK_MESSAGING_PREPARE_CONFIGURE_TOOL,
647684
BLOOMREACH_ACTIONS_CONFIRM_TOOL,
648685
BLOOMREACH_ACTIONS_LIST_TOOL,
649686
] as const;

0 commit comments

Comments
 (0)