@netsendo/mcp-client 1.3.0 → 1.4.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 (51) hide show
  1. package/README.md +148 -12
  2. package/dist/api-client.d.ts +166 -1
  3. package/dist/api-client.d.ts.map +1 -1
  4. package/dist/api-client.js +157 -2
  5. package/dist/api-client.js.map +1 -1
  6. package/dist/index.js +108 -13
  7. package/dist/index.js.map +1 -1
  8. package/dist/tools/helpers.d.ts +28 -0
  9. package/dist/tools/helpers.d.ts.map +1 -0
  10. package/dist/tools/helpers.js +53 -0
  11. package/dist/tools/helpers.js.map +1 -0
  12. package/dist/tools/index.d.ts +7 -0
  13. package/dist/tools/index.d.ts.map +1 -1
  14. package/dist/tools/index.js +29 -1
  15. package/dist/tools/index.js.map +1 -1
  16. package/dist/tools/list-activity.d.ts +10 -0
  17. package/dist/tools/list-activity.d.ts.map +1 -0
  18. package/dist/tools/list-activity.js +58 -0
  19. package/dist/tools/list-activity.js.map +1 -0
  20. package/dist/tools/list-export.d.ts +10 -0
  21. package/dist/tools/list-export.d.ts.map +1 -0
  22. package/dist/tools/list-export.js +60 -0
  23. package/dist/tools/list-export.js.map +1 -0
  24. package/dist/tools/list-hygiene.d.ts +11 -0
  25. package/dist/tools/list-hygiene.d.ts.map +1 -0
  26. package/dist/tools/list-hygiene.js +143 -0
  27. package/dist/tools/list-hygiene.js.map +1 -0
  28. package/dist/tools/list-import.d.ts +11 -0
  29. package/dist/tools/list-import.d.ts.map +1 -0
  30. package/dist/tools/list-import.js +88 -0
  31. package/dist/tools/list-import.js.map +1 -0
  32. package/dist/tools/list-members.d.ts +10 -0
  33. package/dist/tools/list-members.d.ts.map +1 -0
  34. package/dist/tools/list-members.js +144 -0
  35. package/dist/tools/list-members.js.map +1 -0
  36. package/dist/tools/lists.d.ts.map +1 -1
  37. package/dist/tools/lists.js +79 -0
  38. package/dist/tools/lists.js.map +1 -1
  39. package/dist/tools/notifications.d.ts +11 -0
  40. package/dist/tools/notifications.d.ts.map +1 -0
  41. package/dist/tools/notifications.js +43 -0
  42. package/dist/tools/notifications.js.map +1 -0
  43. package/dist/tools/subscribers.js +1 -1
  44. package/dist/tools/subscribers.js.map +1 -1
  45. package/dist/tools/suppressions.d.ts +11 -0
  46. package/dist/tools/suppressions.d.ts.map +1 -0
  47. package/dist/tools/suppressions.js +54 -0
  48. package/dist/tools/suppressions.js.map +1 -0
  49. package/dist/types.d.ts +431 -0
  50. package/dist/types.d.ts.map +1 -1
  51. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ /**
2
+ * NetSendo MCP Server - List Hygiene Tools
3
+ *
4
+ * Diagnose what is hurting a list's deliverability, then fix it. Every
5
+ * mutating tool here defaults to a dry run, and the irreversible actions
6
+ * additionally require confirm=true.
7
+ */
8
+ import { z } from 'zod';
9
+ import { ok, fail, compact } from './helpers.js';
10
+ const CATEGORIES = [
11
+ 'missing_contact',
12
+ 'invalid_syntax',
13
+ 'typo_domain',
14
+ 'disposable_domain',
15
+ 'role_address',
16
+ 'duplicate',
17
+ 'hard_bounced',
18
+ 'soft_bounce_risk',
19
+ 'unsubscribed',
20
+ 'unconfirmed',
21
+ 'suppressed',
22
+ 'globally_inactive',
23
+ 'never_engaged',
24
+ 'dormant',
25
+ ];
26
+ const CATEGORY_GUIDE = `Categories:
27
+ - invalid_syntax — not a valid address; will always bounce
28
+ - typo_domain — misspelled provider (gmial.com); always bounces, a correction is suggested
29
+ - disposable_domain — throwaway mailbox; expires then hard-bounces
30
+ - role_address — shared inbox (info@, biuro@); raises complaint rates
31
+ - missing_contact — no email on an email list (or no phone on an SMS list)
32
+ - duplicate — same real mailbox present more than once (use dedupe_list to merge)
33
+ - hard_bounced — membership already marked bounced
34
+ - soft_bounce_risk — repeated soft bounces, above the list's threshold
35
+ - suppressed — on the account suppression list yet still active here
36
+ - unsubscribed — opted out (expected on a healthy list; not a defect)
37
+ - unconfirmed — double opt-in never completed
38
+ - globally_inactive — contact deactivated account-wide but still counted here
39
+ - never_engaged — no open and no click since signup, older than the threshold
40
+ - dormant — engaged once, silent since the threshold`;
41
+ const thresholds = {
42
+ unconfirmed_after_days: z.number().min(1).max(365).optional().describe('Age before an unconfirmed double opt-in counts as a problem (default: 14)'),
43
+ never_engaged_after_days: z.number().min(1).max(1095).optional().describe('Membership age before "no engagement at all" counts (default: 90)'),
44
+ dormant_after_days: z.number().min(1).max(1095).optional().describe('Silence before a previously engaged contact counts as dormant (default: 180)'),
45
+ soft_bounce_threshold: z.number().min(1).max(20).optional().describe('Soft bounces before a contact is at risk (default: the list setting, otherwise 3)'),
46
+ };
47
+ export function registerListHygieneTools(server, api) {
48
+ server.tool('analyze_list_health', `Full hygiene report for a list. Read-only — this never changes anything.
49
+
50
+ Start here before any clean-up. Returns per-category counts with samples, a 0–100 health score, the engagement split (engaged / never engaged / dormant) and ordered recommendations naming the suggested action for each problem.
51
+
52
+ ${CATEGORY_GUIDE}`, {
53
+ list_id: z.number().describe('Contact list ID'),
54
+ sample_size: z.number().min(0).max(50).optional().describe('Example contacts per category (default: 5)'),
55
+ max_scan: z.number().min(1).max(50000).optional().describe('Cap on members examined (default and max: 50000)'),
56
+ ...thresholds,
57
+ }, async ({ list_id, ...params }) => {
58
+ try {
59
+ return ok(await api.analyzeListHygiene(list_id, compact(params)));
60
+ }
61
+ catch (error) {
62
+ return fail(error);
63
+ }
64
+ });
65
+ server.tool('clean_list', `Apply an action to every member matching the chosen problem categories.
66
+
67
+ SAFETY: dry_run defaults to true. Run it that way first, show the user what would be affected, and only then re-run with dry_run=false. "delete" and "suppress" are irreversible and additionally require confirm=true.
68
+
69
+ Actions:
70
+ - unsubscribe — mark the membership unsubscribed and cancel their queued messages (safest; keeps the record and the audit trail)
71
+ - remove — detach from this list only; the contact and their other lists stay
72
+ - tag — only label them (requires "tag"); ideal for building a re-engagement segment instead of deleting
73
+ - delete — soft-delete the contact account-wide [IRREVERSIBLE, needs confirm=true]
74
+ - suppress — add to the do-not-mail suppression list and unsubscribe everywhere [IRREVERSIBLE, needs confirm=true]
75
+
76
+ Rule of thumb: bounces and invalid addresses → remove or unsubscribe; never_engaged / dormant → tag first and try a win-back campaign before deleting anything.
77
+
78
+ ${CATEGORY_GUIDE}`, {
79
+ list_id: z.number().describe('Contact list ID'),
80
+ categories: z.array(z.enum(CATEGORIES)).min(1).describe('Problem categories to act on'),
81
+ action: z.enum(['unsubscribe', 'remove', 'delete', 'tag', 'suppress']).describe('What to do with the matched members'),
82
+ tag: z.string().optional().describe('Tag name — required when action="tag"; created if it does not exist'),
83
+ dry_run: z.boolean().optional().describe('Report without writing (default: true)'),
84
+ confirm: z.boolean().optional().describe('Required for action="delete" or "suppress" when dry_run=false. Only set this after the user has explicitly approved.'),
85
+ limit: z.number().min(1).max(50000).optional().describe('Maximum members to process in this call (default: 1000)'),
86
+ reason: z.string().optional().describe('Reason recorded on the change, e.g. "quarterly hygiene"'),
87
+ ...thresholds,
88
+ }, async ({ list_id, ...payload }) => {
89
+ try {
90
+ const result = await api.cleanList(list_id, compact(payload));
91
+ return ok({ ...result.data, message: result.message });
92
+ }
93
+ catch (error) {
94
+ return fail(error);
95
+ }
96
+ });
97
+ server.tool('dedupe_list', `Merge members whose addresses point at the same real mailbox — case differences, and Gmail dot/+tag aliases (j.an+news@gmail.com = jan@gmail.com).
98
+
99
+ The surviving record keeps every list membership, tag, custom field value and the higher engagement counters; the duplicates are soft-deleted.
100
+
101
+ SAFETY: dry_run defaults to true and shows the exact merge groups. Writing requires dry_run=false AND confirm=true.`, {
102
+ list_id: z.number().describe('Contact list ID'),
103
+ dry_run: z.boolean().optional().describe('Report the merge groups without writing (default: true)'),
104
+ confirm: z.boolean().optional().describe('Required when dry_run=false — merging deletes the duplicate records'),
105
+ limit: z.number().min(1).max(5000).optional().describe('Maximum duplicate groups to process (default: 500)'),
106
+ keep: z.enum(['oldest', 'most_engaged']).optional().describe('Which record survives (default: oldest)'),
107
+ }, async ({ list_id, ...payload }) => {
108
+ try {
109
+ const result = await api.dedupeList(list_id, compact(payload));
110
+ return ok({ ...result.data, message: result.message });
111
+ }
112
+ catch (error) {
113
+ return fail(error);
114
+ }
115
+ });
116
+ server.tool('verify_list_emails', `Check whether a list's addresses can actually receive mail: syntax, disposable and role detection, typo domains with suggested corrections, and an MX/DNS lookup per domain.
117
+
118
+ Read-only. DNS results are cached for a day and looked up per domain rather than per address, so cost scales with the number of domains.
119
+
120
+ Returns deliverable / risky / undeliverable counts, the overall deliverable rate, domains lacking MX records, and the individual problem addresses.`, {
121
+ list_id: z.number().describe('Contact list ID'),
122
+ limit: z.number().min(1).max(10000).optional().describe('Addresses to check (default: 1000)'),
123
+ status: z.enum(['active', 'inactive', 'unsubscribed', 'bounced', 'all']).optional().describe('Membership status to check (default: active)'),
124
+ check_mx: z.boolean().optional().describe('Perform DNS MX lookups (default: true). Set false for a fast syntax-only pass.'),
125
+ max_domains: z.number().min(1).max(1000).optional().describe('How many of the most common domains to resolve (default: 200)'),
126
+ }, async ({ list_id, ...payload }) => {
127
+ try {
128
+ return ok(await api.verifyListEmails(list_id, compact(payload)));
129
+ }
130
+ catch (error) {
131
+ return fail(error);
132
+ }
133
+ });
134
+ server.tool('get_hygiene_options', 'Return the exact category and action names clean_list accepts, and which actions are irreversible. Use this if a clean_list call was rejected for an unknown category.', {}, async () => {
135
+ try {
136
+ return ok(await api.getHygieneOptions());
137
+ }
138
+ catch (error) {
139
+ return fail(error);
140
+ }
141
+ });
142
+ }
143
+ //# sourceMappingURL=list-hygiene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-hygiene.js","sourceRoot":"","sources":["../../src/tools/list-hygiene.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,UAAU,GAAG;IACjB,iBAAiB;IACjB,gBAAgB;IA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,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,CAAC;YACH,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACnE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,wKAAwK,EACxK,EAAE,EACF,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * NetSendo MCP Server - List Import Tools
3
+ *
4
+ * Import contacts onto a list from whatever shape the data arrives in: pasted
5
+ * CSV, a spreadsheet export, JSON records from another system, or a bare list
6
+ * of addresses.
7
+ */
8
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
9
+ import type { NetSendoApiClient } from '../api-client.js';
10
+ export declare function registerListImportTools(server: McpServer, api: NetSendoApiClient): void;
11
+ //# sourceMappingURL=list-import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-import.d.ts","sourceRoot":"","sources":["../../src/tools/list-import.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AA4B1D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QAiEhF"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * NetSendo MCP Server - List Import Tools
3
+ *
4
+ * Import contacts onto a list from whatever shape the data arrives in: pasted
5
+ * CSV, a spreadsheet export, JSON records from another system, or a bare list
6
+ * of addresses.
7
+ */
8
+ import { z } from 'zod';
9
+ import { ok, fail, compact } from './helpers.js';
10
+ const FORMAT_GUIDE = `Formats:
11
+ - "csv" → put the raw text in "data". Delimiter and header row are auto-detected (comma, semicolon, tab, pipe).
12
+ - "tsv" → same, tab-separated.
13
+ - "json" → put an array of objects in "records", e.g. [{"email":"a@b.pl","first_name":"Anna","custom_fields":{"city":"Kraków"},"tags":["vip"]}]
14
+ - "emails" → put addresses in "data", one per line. Accepts "Anna Kowalska <anna@example.com>" and "anna@example.com, Anna, Kowalska".
15
+
16
+ Column mapping is automatic for common headers in PL/EN/DE/ES (email, e-mail, imię, nazwisko, telefon, first_name, …).
17
+ Override it with column_mapping when headers are unusual: {"0":"email","1":"first_name","3":"custom:city","2":"ignore"}
18
+ (keys are column indexes for CSV/TSV, or key names for JSON records).`;
19
+ const importOptions = {
20
+ update_existing: z.boolean().optional().describe('Fill blanks on contacts that already exist (default: true). Never overwrites data NetSendo already has.'),
21
+ skip_invalid: z.boolean().optional().describe('Skip rows whose address fails syntax validation (default: true).'),
22
+ skip_role: z.boolean().optional().describe('Skip role addresses such as info@, biuro@, sales@ (default: false).'),
23
+ skip_disposable: z.boolean().optional().describe('Skip throwaway mailboxes such as mailinator.com (default: true).'),
24
+ skip_suppressed: z.boolean().optional().describe('Skip addresses on the account suppression list (default: true). Turning this off would re-mail people who asked to be forgotten.'),
25
+ fix_typos: z.boolean().optional().describe('Auto-correct known provider typos (gmial.com → gmail.com) instead of importing them as-is (default: false).'),
26
+ trigger_automations: z.boolean().optional().describe('Fire the signup event so autoresponders, funnels and webhooks start (default: true). Set false for a silent migration.'),
27
+ detect_gender: z.boolean().optional().describe('Guess gender from the first name when missing (default: true).'),
28
+ status: z.enum(['active', 'inactive', 'unsubscribed']).optional().describe('Membership status to assign (default: active).'),
29
+ source: z.string().optional().describe('Source label stored on the membership, e.g. "webinar-2026" (default: api_import).'),
30
+ tags: z.array(z.string()).optional().describe('Tag names to apply to every imported contact. Tags that do not exist are created.'),
31
+ };
32
+ export function registerListImportTools(server, api) {
33
+ server.tool('preview_list_import', `Dry-run an import: parse the data, show the detected column mapping and report exactly what would happen — without writing anything.
34
+
35
+ ALWAYS run this before import_subscribers when the data comes from the user unverified. It reveals wrong column mapping, invalid addresses, duplicates and typo domains while they are still cheap to fix.
36
+
37
+ ${FORMAT_GUIDE}
38
+
39
+ Returns: detected mapping, per-action counts (create/update/reactivate/skip/invalid), a row sample and the problem rows with reasons.`, {
40
+ list_id: z.number().describe('Target contact list ID'),
41
+ format: z.enum(['csv', 'tsv', 'json', 'emails']).optional().describe('Payload format (default: csv)'),
42
+ data: z.string().optional().describe('Raw text for csv/tsv/emails'),
43
+ records: z.array(z.record(z.any())).optional().describe('Array of objects for format=json'),
44
+ delimiter: z.string().optional().describe('Force a CSV delimiter (",", ";", "|", "tab"). Auto-detected when omitted.'),
45
+ has_header: z.boolean().optional().describe('Force header-row handling. Auto-detected when omitted.'),
46
+ column_mapping: z.record(z.string()).optional().describe('Column index/key → field name, "custom:<field>" or "ignore"'),
47
+ sample_size: z.number().min(1).max(50).optional().describe('How many parsed rows to show (default: 10)'),
48
+ ...importOptions,
49
+ }, async ({ list_id, ...payload }) => {
50
+ try {
51
+ return ok(await api.previewListImport(list_id, compact(payload)));
52
+ }
53
+ catch (error) {
54
+ return fail(error);
55
+ }
56
+ });
57
+ server.tool('import_subscribers', `Import contacts onto a list. Creates new contacts, reactivates unsubscribed ones and fills gaps on existing ones.
58
+
59
+ ${FORMAT_GUIDE}
60
+
61
+ Behaviour worth knowing:
62
+ - Duplicates are folded by real mailbox: JAN@x.pl, jan@x.pl and jan+news@gmail.com/j.an@gmail.com collapse to one contact.
63
+ - Suppressed addresses are skipped by default — they asked not to be contacted.
64
+ - By default the signup event fires, so welcome autoresponders and funnels start. Pass trigger_automations=false to migrate quietly.
65
+ - Up to 5000 rows per call; send the rest in follow-up calls.
66
+ - Pass dry_run=true to get the preview_list_import response instead of writing.
67
+
68
+ Returns: created / updated / reactivated / skipped / invalid / failed counts plus the first errors with row numbers.`, {
69
+ list_id: z.number().describe('Target contact list ID'),
70
+ format: z.enum(['csv', 'tsv', 'json', 'emails']).optional().describe('Payload format (default: csv)'),
71
+ data: z.string().optional().describe('Raw text for csv/tsv/emails'),
72
+ records: z.array(z.record(z.any())).optional().describe('Array of objects for format=json'),
73
+ delimiter: z.string().optional().describe('Force a CSV delimiter (",", ";", "|", "tab")'),
74
+ has_header: z.boolean().optional().describe('Force header-row handling'),
75
+ column_mapping: z.record(z.string()).optional().describe('Column index/key → field name, "custom:<field>" or "ignore"'),
76
+ dry_run: z.boolean().optional().describe('Report what would happen without writing (default: false)'),
77
+ ...importOptions,
78
+ }, async ({ list_id, ...payload }) => {
79
+ try {
80
+ const result = await api.importToList(list_id, compact(payload));
81
+ return ok(result.message ? { ...result.data, message: result.message } : result.data);
82
+ }
83
+ catch (error) {
84
+ return fail(error);
85
+ }
86
+ });
87
+ }
88
+ //# sourceMappingURL=list-import.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-import.js","sourceRoot":"","sources":["../../src/tools/list-import.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,YAAY,GAAG;;;;;;;;sEAQiD,CAAC;AAEvE,MAAM,aAAa,GAAG;IACpB,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yGAAyG,CAAC;IAC3J,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kEAAkE,CAAC;IACjH,S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AAM,CAAC,IAAI,CAAC,CAAC;QACxF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * NetSendo MCP Server - List Membership Tools
3
+ *
4
+ * Bulk operations over a list's members. Every tool accepts the same selection
5
+ * block: explicit IDs, explicit emails, or a filter over the list.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type { NetSendoApiClient } from '../api-client.js';
9
+ export declare function registerListMemberTools(server: McpServer, api: NetSendoApiClient): void;
10
+ //# sourceMappingURL=list-members.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-members.d.ts","sourceRoot":"","sources":["../../src/tools/list-members.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAuB1D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QAmJhF"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * NetSendo MCP Server - List Membership Tools
3
+ *
4
+ * Bulk operations over a list's members. Every tool accepts the same selection
5
+ * block: explicit IDs, explicit emails, or a filter over the list.
6
+ */
7
+ import { z } from 'zod';
8
+ import { ok, fail, compact } from './helpers.js';
9
+ const SELECTION_GUIDE = `Selection (combine freely, at most 5000 contacts per call):
10
+ - subscriber_ids — explicit contact IDs
11
+ - emails — explicit addresses
12
+ - filter — a segment of the list: {"status":"active","never_opened":true,"tag_ids":[3],"subscribed_before":"2025-01-01","engaged":false,"limit":500}`;
13
+ const selection = {
14
+ subscriber_ids: z.array(z.number()).optional().describe('Explicit contact IDs'),
15
+ emails: z.array(z.string().email()).optional().describe('Explicit email addresses'),
16
+ filter: z.object({
17
+ status: z.enum(['active', 'inactive', 'unsubscribed', 'bounced', 'all']).optional().describe('Membership status (default: active)'),
18
+ tag_ids: z.array(z.number()).optional().describe('Only contacts carrying at least one of these tags'),
19
+ engaged: z.boolean().optional().describe('true = has opened or clicked; false = has done neither'),
20
+ subscribed_before: z.string().optional().describe('ISO date — joined on/before'),
21
+ subscribed_after: z.string().optional().describe('ISO date — joined on/after'),
22
+ never_opened: z.boolean().optional().describe('Only contacts with zero opens'),
23
+ limit: z.number().min(1).max(5000).optional().describe('Cap on matched contacts (default: 5000)'),
24
+ }).optional().describe('Select a segment of the list instead of naming contacts'),
25
+ };
26
+ export function registerListMemberTools(server, api) {
27
+ server.tool('add_list_members', `Attach existing contacts to a list. This does not create contacts — use import_subscribers for new people.
28
+
29
+ ${SELECTION_GUIDE}
30
+ Using "filter" here also requires source_list_id: the list whose members you are selecting from.
31
+
32
+ By default the signup event fires, so the target list's welcome sequence and automations start. Pass trigger_automations=false to attach quietly.`, {
33
+ list_id: z.number().describe('Target contact list ID'),
34
+ source_list_id: z.number().optional().describe('List the filter selects from — required when using "filter"'),
35
+ source: z.string().optional().describe('Source label recorded on the new membership (default: api)'),
36
+ trigger_automations: z.boolean().optional().describe('Fire the signup event so sequences start (default: true)'),
37
+ ...selection,
38
+ }, async ({ list_id, ...payload }) => {
39
+ try {
40
+ const result = await api.addListMembers(list_id, compact(payload));
41
+ return ok({ ...result.data, message: result.message });
42
+ }
43
+ catch (error) {
44
+ return fail(error);
45
+ }
46
+ });
47
+ server.tool('remove_list_members', `Detach contacts from a list. The contacts themselves and their other list memberships are kept; their queued messages for this list are cancelled.
48
+
49
+ Prefer set_member_status with status="unsubscribed" when the person opted out — that preserves the opt-out record. Removal is for cleaning up an audience, not for honouring an unsubscribe.
50
+
51
+ ${SELECTION_GUIDE}
52
+ A filter-based removal requires confirm=true, since it can match a large segment.`, {
53
+ list_id: z.number().describe('Contact list ID'),
54
+ confirm: z.boolean().optional().describe('Required when selecting with "filter". Only set after the user approved the scope.'),
55
+ ...selection,
56
+ }, async ({ list_id, ...payload }) => {
57
+ try {
58
+ const result = await api.removeListMembers(list_id, compact(payload));
59
+ return ok({ ...result.data, message: result.message });
60
+ }
61
+ catch (error) {
62
+ return fail(error);
63
+ }
64
+ });
65
+ server.tool('set_member_status', `Change the membership status of contacts on a list.
66
+
67
+ - "unsubscribed" — records the opt-out, cancels queued messages and fires the unsubscribe event (webhooks, automations)
68
+ - "active" — resubscribes; by default this restarts the list's sequences, so pass trigger_automations=false when reactivating in bulk
69
+ - "bounced" — marks the address as bouncing so it stops being targeted
70
+ - "inactive" — parks the membership without recording an opt-out
71
+
72
+ ${SELECTION_GUIDE}`, {
73
+ list_id: z.number().describe('Contact list ID'),
74
+ status: z.enum(['active', 'inactive', 'unsubscribed', 'bounced']).describe('Status to set'),
75
+ reason: z.string().optional().describe('Reason recorded on the change, e.g. "user request"'),
76
+ trigger_automations: z.boolean().optional().describe('Fire signup/unsubscribe events (default: true)'),
77
+ ...selection,
78
+ }, async ({ list_id, ...payload }) => {
79
+ try {
80
+ const result = await api.setListMemberStatus(list_id, compact(payload));
81
+ return ok({ ...result.data, message: result.message });
82
+ }
83
+ catch (error) {
84
+ return fail(error);
85
+ }
86
+ });
87
+ server.tool('copy_list_members', `Copy contacts to another list, keeping them on the source list.
88
+
89
+ Both lists must be the same channel (email→email, sms→sms). By default the target list's automations start for each copied contact.
90
+
91
+ ${SELECTION_GUIDE}`, {
92
+ list_id: z.number().describe('Source contact list ID'),
93
+ target_list_id: z.number().describe('Destination contact list ID'),
94
+ source: z.string().optional().describe('Source label on the new membership (default: api_copy)'),
95
+ trigger_automations: z.boolean().optional().describe('Start the target list\'s sequences (default: true)'),
96
+ ...selection,
97
+ }, async ({ list_id, ...payload }) => {
98
+ try {
99
+ const result = await api.transferListMembers(list_id, 'copy', compact(payload));
100
+ return ok({ ...result.data, message: result.message });
101
+ }
102
+ catch (error) {
103
+ return fail(error);
104
+ }
105
+ });
106
+ server.tool('move_list_members', `Move contacts to another list — added to the target, then detached from the source.
107
+
108
+ Both lists must be the same channel. When migrating an audience that should not receive the target list's welcome sequence again, pass trigger_automations=false.
109
+
110
+ ${SELECTION_GUIDE}`, {
111
+ list_id: z.number().describe('Source contact list ID'),
112
+ target_list_id: z.number().describe('Destination contact list ID'),
113
+ source: z.string().optional().describe('Source label on the new membership (default: api_move)'),
114
+ trigger_automations: z.boolean().optional().describe('Start the target list\'s sequences (default: true)'),
115
+ ...selection,
116
+ }, async ({ list_id, ...payload }) => {
117
+ try {
118
+ const result = await api.transferListMembers(list_id, 'move', compact(payload));
119
+ return ok({ ...result.data, message: result.message });
120
+ }
121
+ catch (error) {
122
+ return fail(error);
123
+ }
124
+ });
125
+ server.tool('tag_list_members', `Add or remove tags across a segment of a list. Tags named in "add" are created if they do not exist.
126
+
127
+ This is the safe way to act on a problem segment: tag it, review it, build a campaign for it — instead of deleting contacts you may still be able to win back.
128
+
129
+ ${SELECTION_GUIDE}`, {
130
+ list_id: z.number().describe('Contact list ID'),
131
+ add: z.array(z.string()).optional().describe('Tag names to add'),
132
+ remove: z.array(z.string()).optional().describe('Tag names to remove'),
133
+ ...selection,
134
+ }, async ({ list_id, ...payload }) => {
135
+ try {
136
+ const result = await api.tagListMembers(list_id, compact(payload));
137
+ return ok({ ...result.data, message: result.message });
138
+ }
139
+ catch (error) {
140
+ return fail(error);
141
+ }
142
+ });
143
+ }
144
+ //# sourceMappingURL=list-members.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-members.js","sourceRoot":"","sources":["../../src/tools/list-members.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,eAAe,GAAG;;;6JAGqI,CAAC;AAE9J,MAAM,SAAS,GAAG;IAChB,cAAc,EAAE,CAAC,CA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AAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QAoN1E"}
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI1D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QAsT1E"}
@@ -4,6 +4,7 @@
4
4
  * Tools for managing contact lists and tags
5
5
  */
6
6
  import { z } from 'zod';
7
+ import { ok, fail, compact } from './helpers.js';
7
8
  export function registerListTools(server, api) {
8
9
  // List Contact Lists
9
10
  server.tool('list_contact_lists', `Get all contact lists with subscriber counts and default mailbox info.
@@ -156,6 +157,84 @@ Use default_mailbox info when creating campaigns to automatically select the rig
156
157
  };
157
158
  }
158
159
  });
160
+ // Get List Stats
161
+ server.tool('get_list_stats', `Operational snapshot of a list: members broken down by status, engagement share (how many have ever opened or clicked), growth over the last 30 days, and the configuration that affects sending — double opt-in, resubscription behaviour, signup limits, default mailbox and webhook.
162
+
163
+ Use this to answer "how is this list doing?" in one call. For deeper analysis: get_list_engagement for performance over time, analyze_list_health for data-quality problems.`, {
164
+ list_id: z.number().describe('Contact list ID'),
165
+ }, async ({ list_id }) => {
166
+ try {
167
+ return ok(await api.getListStats(list_id));
168
+ }
169
+ catch (error) {
170
+ return fail(error);
171
+ }
172
+ });
173
+ // Create Contact List
174
+ server.tool('create_contact_list', `Create a contact list.
175
+
176
+ Choose the channel with "type": "email" (default) or "sms" — it determines which field is required for members and cannot be changed later by these tools. Contacts can only be moved or copied between lists of the same channel.
177
+
178
+ Set a default mailbox so campaigns for this list pick the right sender automatically (see list_mailboxes).`, {
179
+ name: z.string().max(255).describe('List name'),
180
+ type: z.enum(['email', 'sms']).optional().describe('Channel (default: email)'),
181
+ description: z.string().max(1000).optional().describe('What this audience is'),
182
+ contact_list_group_id: z.number().optional().describe('Group to file the list under'),
183
+ default_mailbox_id: z.number().optional().describe('Default sender mailbox for email campaigns (see list_mailboxes)'),
184
+ default_sms_provider_id: z.number().optional().describe('Default SMS provider (see list_sms_providers)'),
185
+ double_opt_in: z.boolean().optional().describe('Require confirmation of the subscription (default: false)'),
186
+ resubscription_behavior: z.enum(['reset_date', 'keep_original_date']).optional().describe('Whether a returning contact gets a fresh signup date, which also restarts date-based autoresponders (default: reset_date)'),
187
+ max_subscribers: z.number().min(0).optional().describe('Cap on members; 0 means unlimited'),
188
+ is_public: z.boolean().optional().describe('Whether the list is publicly selectable in preference centres'),
189
+ timezone: z.string().optional().describe('List timezone, e.g. "Europe/Warsaw"'),
190
+ }, async (input) => {
191
+ try {
192
+ return ok(await api.createContactList(compact(input)));
193
+ }
194
+ catch (error) {
195
+ return fail(error);
196
+ }
197
+ });
198
+ // Update Contact List
199
+ server.tool('update_contact_list', `Update a contact list's settings. Only the fields you pass are changed; the rest of the list configuration is preserved.
200
+
201
+ Note: changing resubscription_behavior or double_opt_in affects future signups only, never existing members.`, {
202
+ list_id: z.number().describe('Contact list ID'),
203
+ name: z.string().max(255).optional().describe('New name'),
204
+ description: z.string().max(1000).optional().describe('New description'),
205
+ contact_list_group_id: z.number().optional().describe('Move the list to another group'),
206
+ default_mailbox_id: z.number().optional().describe('Default sender mailbox'),
207
+ default_sms_provider_id: z.number().optional().describe('Default SMS provider'),
208
+ double_opt_in: z.boolean().optional().describe('Require confirmation of the subscription'),
209
+ resubscription_behavior: z.enum(['reset_date', 'keep_original_date']).optional().describe('Signup-date handling for returning contacts'),
210
+ max_subscribers: z.number().min(0).optional().describe('Cap on members; 0 means unlimited'),
211
+ signups_blocked: z.boolean().optional().describe('Stop accepting new signups'),
212
+ is_public: z.boolean().optional().describe('Publicly selectable in preference centres'),
213
+ timezone: z.string().optional().describe('List timezone'),
214
+ webhook_url: z.string().url().optional().describe('URL notified about this list\'s subscriber events'),
215
+ webhook_events: z.array(z.string()).optional().describe('Events to deliver, e.g. ["subscriber.subscribed","subscriber.unsubscribed","subscriber.bounced"]'),
216
+ }, async ({ list_id, ...input }) => {
217
+ try {
218
+ return ok(await api.updateContactList(list_id, compact(input)));
219
+ }
220
+ catch (error) {
221
+ return fail(error);
222
+ }
223
+ });
224
+ // Delete Contact List
225
+ server.tool('delete_contact_list', `Delete a contact list. The contacts themselves are NOT deleted — they keep their other memberships and stay in the account.
226
+
227
+ SAFETY: deleting a list that still has members is refused unless confirm=true. Show the user the member count and get explicit approval before setting it.`, {
228
+ list_id: z.number().describe('Contact list ID'),
229
+ confirm: z.boolean().optional().describe('Required when the list still has members. Only set after the user approved.'),
230
+ }, async ({ list_id, confirm }) => {
231
+ try {
232
+ return ok(await api.deleteContactList(list_id, confirm ?? false));
233
+ }
234
+ catch (error) {
235
+ return fail(error);
236
+ }
237
+ });
159
238
  // List Custom Fields
160
239
  server.tool('list_custom_fields', 'Get all available custom fields. Custom fields allow storing additional subscriber information.', {}, async () => {
161
240
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,GAAsB;I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EAAE,CAAC,CAAC,OAAO;6BACnB,CAAC,CAAC;4BACH,KAAK,EAAE,MAAM,CAAC,MAAM;yBACrB,EAAE,IAAI,EAAE,CAAC,CAAC;qBACZ,CAAC;aACH,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAW,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC;gBAChF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * NetSendo MCP Server - Notification Tools
3
+ *
4
+ * How an automated process reports back to the human who owns the account.
5
+ * These notifications land in NetSendo's notification centre — they are never
6
+ * sent to subscribers or anyone outside the account.
7
+ */
8
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
9
+ import type { NetSendoApiClient } from '../api-client.js';
10
+ export declare function registerNotificationTools(server: McpServer, api: NetSendoApiClient): void;
11
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/tools/notifications.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QA0ClF"}