hollerpost-mcp 0.4.0 → 0.6.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/CHANGELOG.md +28 -0
- package/README.md +6 -0
- package/dist/format.d.ts +6 -0
- package/dist/format.js +41 -0
- package/dist/tools.js +145 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
Texting setup with an agent, not just status.
|
|
6
|
+
|
|
7
|
+
- `sms_registration_update` (scope `account`): fill or fix the toll-free
|
|
8
|
+
registration form while it's a draft or after a rejection. Business facts
|
|
9
|
+
come from the person; the agent may draft the use case, opt-in description
|
|
10
|
+
and sample messages for approval. The registration number (EIN, or SSN for
|
|
11
|
+
a sole proprietor) can't be set through an agent: it's entered in the
|
|
12
|
+
dashboard.
|
|
13
|
+
- `sms_website_check` (scope `account`): the carrier checks on the form and
|
|
14
|
+
a live look at the website, privacy policy and terms, listed as fixes.
|
|
15
|
+
- `sms_numbers` (scope `account`): toll-free numbers to pick from.
|
|
16
|
+
- `sms_registration_submit` (scope `account`): submit after the person's
|
|
17
|
+
yes (`confirm: true`); the first time it buys the chosen number. Every
|
|
18
|
+
check runs again first, and nothing is sent or bought if one fails.
|
|
19
|
+
|
|
20
|
+
## 0.5.0 (2026-11-09)
|
|
21
|
+
|
|
22
|
+
Pictures from the person's own device.
|
|
23
|
+
|
|
24
|
+
- `email_image_upload_link` (scope `draft`): a one-time Hollerpost page
|
|
25
|
+
(30 minutes, up to 10 pictures) where the person uploads pictures an
|
|
26
|
+
agent can't pass as a URL or base64, such as one dropped into a chat.
|
|
27
|
+
- `email_images_list` (scope `read`): the workspace's stored images, newest
|
|
28
|
+
first, to reuse instead of uploading again; with `link_id`, just the
|
|
29
|
+
pictures uploaded through that link.
|
|
30
|
+
|
|
3
31
|
## 0.4.0 (2026-11-08)
|
|
4
32
|
|
|
5
33
|
More than one picture per email.
|
package/README.md
CHANGED
|
@@ -114,6 +114,8 @@ If a tool needs a scope the key lacks, the tool answers `insufficient_scope`, na
|
|
|
114
114
|
| `brand_set_voice` | draft | Save the brand voice notes (replaces the old text) |
|
|
115
115
|
| `templates_list` | read | Templates and the content blocks each accepts |
|
|
116
116
|
| `email_image_upload` | draft | Store an image (from a URL or the file) for use in an email; returns its URL |
|
|
117
|
+
| `email_image_upload_link` | draft | A one-time page where the person uploads pictures from their device |
|
|
118
|
+
| `email_images_list` | read | Stored images, newest first, or the ones from an upload link |
|
|
117
119
|
| `segments_list` | read | Tags with subscribed counts, for choosing an audience |
|
|
118
120
|
| `contacts_search` | read | Find contacts by email, status or tag |
|
|
119
121
|
| `contacts_add` | contacts | Add one contact who opted in (`consent: true` required) |
|
|
@@ -134,6 +136,10 @@ If a tool needs a scope the key lacks, the tool answers `insufficient_scope`, na
|
|
|
134
136
|
| `domain_verify` | account | Re-check DNS now; expected vs actual for every record |
|
|
135
137
|
| `domain_remove` | account | Remove the sending domain (`confirm: true` required) |
|
|
136
138
|
| `sms_setup_status` | read | Texting setup: toll-free number registration status, checklist, check results and rejection fixes |
|
|
139
|
+
| `sms_registration_update` | account | Fill or fix the texting registration form (draft or rejected only). The registration number is entered in the dashboard only |
|
|
140
|
+
| `sms_website_check` | account | Run the carrier checks on the form and the business's website, privacy policy and terms |
|
|
141
|
+
| `sms_numbers` | account | Toll-free numbers available for the first registration |
|
|
142
|
+
| `sms_registration_submit` | account | Submit (or resubmit after a rejection) after the person says yes; needs `confirm: true`. The first time it also buys the chosen number |
|
|
137
143
|
| `surveys_list` | read | Surveys with status, questions (and which can go in an email), response counts and share links |
|
|
138
144
|
| `survey_results` | read | Aggregated answers, averages and NPS for one survey |
|
|
139
145
|
| `survey_create` | draft | Create a draft survey (1 to 30 questions) |
|
package/dist/format.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ export interface OkOptions {
|
|
|
26
26
|
}
|
|
27
27
|
export declare function okResult(lead: string, data: unknown, secrets?: string[], opts?: OkOptions): CallToolResult;
|
|
28
28
|
/** Plain-language explanation for each API error code the tools can hit. */
|
|
29
|
+
/**
|
|
30
|
+
* The problems in a texting-setup check result ({ errors: {field: msg},
|
|
31
|
+
* items: [{ key, level, message }] }), form errors first, then failed
|
|
32
|
+
* website items. Warnings are left out.
|
|
33
|
+
*/
|
|
34
|
+
export declare function smsCheckProblems(checks: unknown): string[];
|
|
29
35
|
export declare function describeApiError(err: ApiError): string;
|
|
30
36
|
export declare function errorResult(err: unknown, secrets?: string[]): CallToolResult;
|
|
31
37
|
/** A validation problem the tool catches before calling the API. */
|
package/dist/format.js
CHANGED
|
@@ -60,6 +60,29 @@ function num(v) {
|
|
|
60
60
|
return typeof v === 'number' ? v.toLocaleString('en-US') : String(v ?? 'unknown');
|
|
61
61
|
}
|
|
62
62
|
/** Plain-language explanation for each API error code the tools can hit. */
|
|
63
|
+
/**
|
|
64
|
+
* The problems in a texting-setup check result ({ errors: {field: msg},
|
|
65
|
+
* items: [{ key, level, message }] }), form errors first, then failed
|
|
66
|
+
* website items. Warnings are left out.
|
|
67
|
+
*/
|
|
68
|
+
export function smsCheckProblems(checks) {
|
|
69
|
+
const c = (checks && typeof checks === 'object' ? checks : {});
|
|
70
|
+
const out = [];
|
|
71
|
+
if (c.errors && typeof c.errors === 'object') {
|
|
72
|
+
for (const [field, msg] of Object.entries(c.errors)) {
|
|
73
|
+
// Agents can't set these; the person enters them in the dashboard.
|
|
74
|
+
const where = field === 'registration_number' || field === 'registration_type' ? ' (the person enters this in the Hollerpost dashboard, not you)' : '';
|
|
75
|
+
out.push(`${field}: ${String(msg)}${where}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (Array.isArray(c.items)) {
|
|
79
|
+
for (const item of c.items) {
|
|
80
|
+
if (item && item.level === 'fail')
|
|
81
|
+
out.push(String(item.message ?? item.key ?? ''));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
63
86
|
export function describeApiError(err) {
|
|
64
87
|
const b = err.body;
|
|
65
88
|
const head = `Hollerpost API error "${err.code}"${err.status ? ` (HTTP ${err.status})` : ''}.`;
|
|
@@ -175,6 +198,24 @@ export function describeApiError(err) {
|
|
|
175
198
|
return `${head} Only drafts can be changed or scheduled${typeof b.status === 'string' ? `; this post is ${b.status}` : ''}. Cancel it first to edit it.`;
|
|
176
199
|
case 'beyond_scheduling_horizon':
|
|
177
200
|
return `${head} That time is further ahead than this plan can schedule${b.limit_days ? ` (${num(b.limit_days)} days)` : ''}.`;
|
|
201
|
+
case 'field_dashboard_only':
|
|
202
|
+
return `${head} The business registration number (EIN, or SSN for a sole proprietor) is entered in the Hollerpost dashboard only, never through an agent. Ask the person to add it under Settings, Text messaging. Nothing was saved.`;
|
|
203
|
+
case 'confirmation_required':
|
|
204
|
+
return `${head} Nothing was submitted. Show the person what will be sent (sms_setup_status), get a clear yes, then call again with confirm: true.`;
|
|
205
|
+
case 'registration_locked':
|
|
206
|
+
return `${head} The carriers are reviewing this registration${typeof b.status === 'string' ? ` (status ${b.status})` : ''}, so it can't be changed or resubmitted now. One review at a time; the person gets an email when it changes.`;
|
|
207
|
+
case 'sms_not_eligible':
|
|
208
|
+
return `${head} This workspace can't register a number${typeof b.reason === 'string' ? ` (${b.reason})` : ''}. Texting needs a paid plan with the texts, calls or AI receptionist add-on; see billing_portal_link.`;
|
|
209
|
+
case 'checks_failed': {
|
|
210
|
+
const problems = smsCheckProblems(b.checks);
|
|
211
|
+
return `${head} Nothing was submitted and no number was bought: the checks found problems the carriers would reject.${problems.length ? `\n${problems.map((p) => `- ${p}`).join('\n')}` : ''}\nHelp the person fix these (sms_registration_update for the form, their own website for website items), run sms_website_check, then ask again before submitting.`;
|
|
212
|
+
}
|
|
213
|
+
case 'phone_number_required':
|
|
214
|
+
return `${head} The first submission needs a toll-free number. Call sms_numbers, let the person pick one, then submit with phone_number.`;
|
|
215
|
+
case 'number_taken':
|
|
216
|
+
return `${head} Someone else just took that number. Call sms_numbers and let the person pick another.`;
|
|
217
|
+
case 'resubmit_not_allowed':
|
|
218
|
+
return `${head} This rejection is handled with the carrier directly by the Hollerpost team. Don't resubmit; the person will get an email.`;
|
|
178
219
|
case 'not_available_yet':
|
|
179
220
|
return `${head} That part of Hollerpost Social comes in a later beta release.`;
|
|
180
221
|
default: {
|
package/dist/tools.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// formed without them.
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { ApiError } from './client.js';
|
|
14
|
-
import { errorResult, InputError, okResult } from './format.js';
|
|
14
|
+
import { errorResult, InputError, okResult, smsCheckProblems } from './format.js';
|
|
15
15
|
export const DEFAULT_ASSUMED_SCOPES = ['read', 'contacts', 'draft', 'send', 'webhooks', 'account'];
|
|
16
16
|
export const ALL_SCOPES = [
|
|
17
17
|
'read',
|
|
@@ -316,7 +316,7 @@ export const TOOLS = [
|
|
|
316
316
|
name: 'email_image_upload',
|
|
317
317
|
title: 'Add an email image',
|
|
318
318
|
scope: 'draft',
|
|
319
|
-
description: 'Stores an image on Hollerpost for use in an email and returns its https URL. Pass url (a public https image, for example from the business website) or data_base64 (the file itself
|
|
319
|
+
description: 'Stores an image on Hollerpost for use in an email and returns its https URL. Pass url (a public https image, for example from the business website) or data_base64 (the file itself). For a picture the person has on their device or dropped into the chat, use email_image_upload_link instead. JPEG, PNG, WebP or GIF, up to 5 MB (GIFs up to 2 MB). Hollerpost shrinks it to at most 1200px wide and saves it as JPEG, or PNG when it has transparency, so the returned type can differ from the upload. Emails link to the image rather than attaching it, so it adds nothing to the message size. Limits: 100 uploads per API key per 24 hours and 500 per workspace per 30 days, so upload each picture once and reuse its url. Use the returned url in image_url, a section image_url, or an image line in body_md: . Sends nothing.',
|
|
320
320
|
input: {
|
|
321
321
|
url: https.max(2000).optional().describe('Public https URL of the image to copy.'),
|
|
322
322
|
data_base64: z.string().max(7_000_000).optional().describe('The image file, base64 encoded (a data: URL prefix is fine).'),
|
|
@@ -331,6 +331,48 @@ export const TOOLS = [
|
|
|
331
331
|
return { lead: `Image stored: ${get(data, 'url') ?? 'n/a'}. Use it in image_url, a section, or an image line in body_md.`, data };
|
|
332
332
|
},
|
|
333
333
|
}),
|
|
334
|
+
defineTool({
|
|
335
|
+
name: 'email_image_upload_link',
|
|
336
|
+
title: 'Get a link to upload pictures',
|
|
337
|
+
scope: 'draft',
|
|
338
|
+
description: 'Makes a one-time Hollerpost page where the person can upload pictures from their own device (up to 10, JPEG, PNG, WebP or GIF, 5 MB each). Use it when the person has a picture you cannot pass as a public URL or base64, for example one they dropped into this chat. Give them upload_url, wait until they say they are done, then call email_images_list with the link_id to get each picture\'s URL. The link works once and expires after 30 minutes. Sends nothing.',
|
|
339
|
+
input: {},
|
|
340
|
+
annotations: WRITE_SAFE,
|
|
341
|
+
run: async (api) => {
|
|
342
|
+
const data = await api.request('POST', '/media/upload-link', { body: {} });
|
|
343
|
+
return {
|
|
344
|
+
lead: `Ask the person to open ${get(data, 'upload_url') ?? 'the link'} and upload their pictures (it works once, for 30 minutes). When they say they are done, call email_images_list with link_id ${get(data, 'link_id') ?? ''}.`,
|
|
345
|
+
data,
|
|
346
|
+
};
|
|
347
|
+
},
|
|
348
|
+
}),
|
|
349
|
+
defineTool({
|
|
350
|
+
name: 'email_images_list',
|
|
351
|
+
title: 'List email images',
|
|
352
|
+
scope: 'read',
|
|
353
|
+
description: 'Lists images already stored on Hollerpost for this workspace, newest first, with their URLs, so you can reuse one instead of uploading it again. Pass link_id (from email_image_upload_link) to get just the pictures uploaded through that link, and whether the person has used it yet. Free and read only.',
|
|
354
|
+
input: {
|
|
355
|
+
link_id: z.string().uuid().optional().describe('The link_id from email_image_upload_link.'),
|
|
356
|
+
limit: z.number().int().min(1).max(50).optional().describe('How many recent images (default 20).'),
|
|
357
|
+
},
|
|
358
|
+
annotations: READ,
|
|
359
|
+
run: async (api, args) => {
|
|
360
|
+
if (args.link_id) {
|
|
361
|
+
const data = await api.request('GET', `/media/upload-link/${encodeURIComponent(args.link_id)}`);
|
|
362
|
+
const status = get(data, 'status');
|
|
363
|
+
const images = get(data, 'images') ?? [];
|
|
364
|
+
const lead = status === 'used'
|
|
365
|
+
? `${images.length} picture(s) uploaded. Use each url in image_url, a section, or an image line in body_md.`
|
|
366
|
+
: status === 'open'
|
|
367
|
+
? 'Nothing uploaded yet. Ask the person to finish uploading on the page, then check again.'
|
|
368
|
+
: `This link is ${status}. Make a new one with email_image_upload_link if they still need to upload.`;
|
|
369
|
+
return { lead, data };
|
|
370
|
+
}
|
|
371
|
+
const query = args.limit ? `?limit=${args.limit}` : '';
|
|
372
|
+
const data = await api.request('GET', `/media${query}`);
|
|
373
|
+
return { lead: countLead('images', data), data };
|
|
374
|
+
},
|
|
375
|
+
}),
|
|
334
376
|
defineTool({
|
|
335
377
|
name: 'segments_list',
|
|
336
378
|
title: 'List segments',
|
|
@@ -711,7 +753,7 @@ export const TOOLS = [
|
|
|
711
753
|
name: 'sms_setup_status',
|
|
712
754
|
title: 'Text messaging setup',
|
|
713
755
|
scope: 'read',
|
|
714
|
-
description: 'Returns where this workspace stands on texting: the status of its own toll-free number registration (none, draft, submitted, in_review, rejected or verified), the number, when it was submitted, the checklist the business must meet, the latest website check results, and, after a rejection, a plain explanation with fix steps. Free and read only. Carriers only deliver marketing texts from a toll-free number verified under the business itself, which takes 1 to 2 weeks and sometimes up to a month: never promise a date. Use it to walk the person through the checklist item by item (privacy policy sentence, optional standalone opt-in, sample messages starting with the brand and ending "Reply STOP to opt out").
|
|
756
|
+
description: 'Returns where this workspace stands on texting: the status of its own toll-free number registration (none, draft, submitted, in_review, rejected or verified), the number, when it was submitted, the saved form (registration number masked), the checklist the business must meet, the latest website check results, and, after a rejection, a plain explanation with fix steps. Free and read only. Carriers only deliver marketing texts from a toll-free number verified under the business itself, which takes 1 to 2 weeks and sometimes up to a month: never promise a date. Use it to walk the person through the checklist item by item (privacy policy sentence, optional standalone opt-in, sample messages starting with the brand and ending "Reply STOP to opt out"). With the account scope you can fill and fix the form (sms_registration_update), run the checks (sms_website_check) and submit after a yes (sms_registration_submit); the registration number is always entered in the dashboard at setup_url. Text campaigns cannot be scheduled until status is verified.',
|
|
715
757
|
input: {},
|
|
716
758
|
annotations: READ,
|
|
717
759
|
run: async (api) => {
|
|
@@ -736,6 +778,100 @@ export const TOOLS = [
|
|
|
736
778
|
return { lead: parts.join(' '), data };
|
|
737
779
|
},
|
|
738
780
|
}),
|
|
781
|
+
defineTool({
|
|
782
|
+
name: 'sms_registration_update',
|
|
783
|
+
title: 'Fill or fix the texting registration',
|
|
784
|
+
scope: 'account',
|
|
785
|
+
description: 'Saves fields of the toll-free texting registration as a draft (only while it is a draft or was rejected; never while the carriers review it). Send only the fields you are changing. Every fact must come from the person: ask for the legal name, entity type, address, contact and how people opt in; never guess or invent them, because carriers reject registrations that don\'t match official records. You may draft the use case summary, opt-in description and sample messages for the person to approve: each sample starts with the business name and ends "Reply STOP to opt out". The registration number (EIN, or SSN for a sole proprietor) cannot be set here: the person enters it in the dashboard. Returns the saved form (number masked) and the checklist. Nothing is sent to the carriers.',
|
|
786
|
+
input: {
|
|
787
|
+
form: z
|
|
788
|
+
.object({
|
|
789
|
+
legal_name: z.string().max(500).optional().describe('Exactly as on the official registration.'),
|
|
790
|
+
dba: z.string().max(500).optional().describe('Brand name customers see, if different.'),
|
|
791
|
+
entity_type: z.enum(['PRIVATE_PROFIT', 'SOLE_PROPRIETOR', 'NON_PROFIT', 'PUBLIC_PROFIT', 'GOVERNMENT']).optional(),
|
|
792
|
+
registration_country: z.string().length(2).optional().describe('2-letter country code, e.g. US.'),
|
|
793
|
+
vertical: z.enum(['general', 'alcohol', 'cannabis_cbd', 'lead_resale', 'mlm', 'tobacco_vape', 'firearms', 'adult', 'gambling', 'high_risk_finance']).optional().describe('Kind of business. Most are general; some kinds cannot be registered at all.'),
|
|
794
|
+
website: z.string().max(500).optional(),
|
|
795
|
+
address1: z.string().max(500).optional(),
|
|
796
|
+
address2: z.string().max(500).optional(),
|
|
797
|
+
city: z.string().max(500).optional(),
|
|
798
|
+
state: z.string().max(500).optional(),
|
|
799
|
+
zip: z.string().max(500).optional(),
|
|
800
|
+
contact_first_name: z.string().max(500).optional(),
|
|
801
|
+
contact_last_name: z.string().max(500).optional(),
|
|
802
|
+
contact_email: z.string().max(500).optional(),
|
|
803
|
+
contact_phone: z.string().max(500).optional(),
|
|
804
|
+
privacy_url: z.string().max(500).optional(),
|
|
805
|
+
terms_url: z.string().max(500).optional(),
|
|
806
|
+
opt_in_url: z.string().max(500).optional().describe('Page where people sign up for texts.'),
|
|
807
|
+
opt_in_screenshot_url: z.string().max(2000).optional(),
|
|
808
|
+
opt_in_description: z.string().max(500).optional().describe('How people agree to get texts, in plain words.'),
|
|
809
|
+
use_case_summary: z.string().max(500).optional().describe('What the texts are for.'),
|
|
810
|
+
monthly_volume: z.string().max(500).optional(),
|
|
811
|
+
samples: z.array(z.string().max(320)).max(3).optional().describe('Up to 3 example messages.'),
|
|
812
|
+
age_gate: z.boolean().optional(),
|
|
813
|
+
confirm_website: z.boolean().optional().describe('The person confirmed the website is theirs and public.'),
|
|
814
|
+
confirm_opt_in: z.boolean().optional().describe('The person confirmed everyone they text agreed to it.'),
|
|
815
|
+
})
|
|
816
|
+
.strict()
|
|
817
|
+
.describe('Only the fields to change.'),
|
|
818
|
+
},
|
|
819
|
+
annotations: WRITE_IDEMPOTENT,
|
|
820
|
+
run: async (api, { form }) => {
|
|
821
|
+
const data = await api.request('PATCH', '/sms/registration', { body: { form } });
|
|
822
|
+
const status = get(data, 'status') ?? 'draft';
|
|
823
|
+
return { lead: `Saved the texting registration (${status}). Nothing was sent to the carriers. Run sms_website_check next.`, data };
|
|
824
|
+
},
|
|
825
|
+
}),
|
|
826
|
+
defineTool({
|
|
827
|
+
name: 'sms_website_check',
|
|
828
|
+
title: 'Check the texting registration',
|
|
829
|
+
scope: 'account',
|
|
830
|
+
description: 'Runs every check the carriers care about on the saved registration, without submitting: missing or invalid form fields, and a live look at the person\'s website, privacy policy and terms (public, has the business name and address, and the privacy policy has the required sentence about mobile information). A few runs per 10 minutes. Use the results to help the person fix their form or their own site, then check again.',
|
|
831
|
+
input: {},
|
|
832
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
833
|
+
run: async (api) => {
|
|
834
|
+
const data = await api.request('POST', '/sms/registration/check', { body: {} });
|
|
835
|
+
const checks = get(data, 'checks');
|
|
836
|
+
const problems = smsCheckProblems(checks);
|
|
837
|
+
const lead = get(checks, 'ok') === true
|
|
838
|
+
? 'Every check passed. Ask the person if they want to submit (sms_registration_submit).'
|
|
839
|
+
: `${problems.length} problem${problems.length === 1 ? '' : 's'} to fix before submitting:\n${problems.map((p) => `- ${p}`).join('\n')}`;
|
|
840
|
+
return { lead, data };
|
|
841
|
+
},
|
|
842
|
+
}),
|
|
843
|
+
defineTool({
|
|
844
|
+
name: 'sms_numbers',
|
|
845
|
+
title: 'Toll-free numbers to choose from',
|
|
846
|
+
scope: 'account',
|
|
847
|
+
description: 'Lists toll-free numbers available for this workspace\'s first texting registration. Optional prefix (800, 833, 844, 855, 866, 877, 888). Read only: nothing is bought until sms_registration_submit.',
|
|
848
|
+
input: { prefix: z.enum(['800', '833', '844', '855', '866', '877', '888']).optional() },
|
|
849
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
850
|
+
run: async (api, { prefix }) => {
|
|
851
|
+
const data = await api.request('GET', '/sms/numbers', { query: prefix ? { prefix } : undefined });
|
|
852
|
+
const numbers = get(data, 'numbers') ?? [];
|
|
853
|
+
return { lead: `${numbers.length} toll-free number${numbers.length === 1 ? '' : 's'} available. Let the person pick one.`, data };
|
|
854
|
+
},
|
|
855
|
+
}),
|
|
856
|
+
defineTool({
|
|
857
|
+
name: 'sms_registration_submit',
|
|
858
|
+
title: 'Submit the texting registration',
|
|
859
|
+
scope: 'account',
|
|
860
|
+
description: 'Sends the registration to the carriers for review. The first time it also buys the chosen toll-free number (phone_number from sms_numbers, included in the person\'s add-on). After a rejection it resubmits the same request with the fixes. Only after the person reviewed the form (sms_setup_status) and said yes: needs confirm: true. Every check runs again first; if one fails, nothing is sent or bought. Review takes 1 to 2 weeks, sometimes a month; never promise a date. The person gets an email when the status changes.',
|
|
861
|
+
input: {
|
|
862
|
+
confirm: z.literal(true).describe('true: the person approved submitting.'),
|
|
863
|
+
phone_number: z.string().regex(/^\+18(00|33|44|55|66|77|88)\d{7}$/).optional().describe('First submission only: the toll-free number the person picked, E.164 (+18335550100).'),
|
|
864
|
+
},
|
|
865
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
866
|
+
run: async (api, { confirm, phone_number }) => {
|
|
867
|
+
const data = await api.request('POST', '/sms/registration/submit', { body: { confirm, ...(phone_number ? { phone_number } : {}) } });
|
|
868
|
+
if (get(data, 'pending') || get(get(data, 'view'), 'pending_number') === true) {
|
|
869
|
+
return { lead: 'The number is being set up. The registration goes to the carriers automatically in a few minutes; it can\'t be edited until then. Review then usually takes 1 to 2 weeks, and the person gets an email when the status changes.', data };
|
|
870
|
+
}
|
|
871
|
+
const status = get(get(data, 'view'), 'status') ?? 'submitted';
|
|
872
|
+
return { lead: `Submitted to the carriers (status ${status}). Review usually takes 1 to 2 weeks; the person gets an email when it changes.`, data };
|
|
873
|
+
},
|
|
874
|
+
}),
|
|
739
875
|
defineTool({
|
|
740
876
|
name: 'surveys_list',
|
|
741
877
|
title: 'List surveys',
|
|
@@ -1097,6 +1233,8 @@ export const CORE_TOOL_NAMES = [
|
|
|
1097
1233
|
'brand_set_voice',
|
|
1098
1234
|
'templates_list',
|
|
1099
1235
|
'email_image_upload',
|
|
1236
|
+
'email_image_upload_link',
|
|
1237
|
+
'email_images_list',
|
|
1100
1238
|
'segments_list',
|
|
1101
1239
|
'contacts_search',
|
|
1102
1240
|
'contacts_add',
|
|
@@ -1117,6 +1255,10 @@ export const CORE_TOOL_NAMES = [
|
|
|
1117
1255
|
'domain_verify',
|
|
1118
1256
|
'domain_remove',
|
|
1119
1257
|
'sms_setup_status',
|
|
1258
|
+
'sms_registration_update',
|
|
1259
|
+
'sms_website_check',
|
|
1260
|
+
'sms_numbers',
|
|
1261
|
+
'sms_registration_submit',
|
|
1120
1262
|
'surveys_list',
|
|
1121
1263
|
'survey_results',
|
|
1122
1264
|
'survey_create',
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.0";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Kept in sync with package.json "version" (a test checks it).
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.6.0';
|
package/package.json
CHANGED