@buzzposter/mcp 0.3.1 → 0.3.3
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/dist/index.js +7 -51
- package/dist/newsletter-studio.html +188 -1101
- package/dist/tools.d.ts +0 -2
- package/dist/tools.js +7 -51
- package/package.json +1 -20
package/dist/tools.d.ts
CHANGED
|
@@ -31,8 +31,6 @@ declare class BuzzPosterClient {
|
|
|
31
31
|
}): Promise<unknown>;
|
|
32
32
|
listMedia(): Promise<unknown>;
|
|
33
33
|
deleteMedia(key: string): Promise<unknown>;
|
|
34
|
-
createPreview(data: Record<string, unknown>): Promise<unknown>;
|
|
35
|
-
updatePreview(id: string, data: Record<string, unknown>): Promise<unknown>;
|
|
36
34
|
listSubscribers(params?: Record<string, string>): Promise<unknown>;
|
|
37
35
|
addSubscriber(data: Record<string, unknown>): Promise<unknown>;
|
|
38
36
|
listBroadcasts(params?: Record<string, string>): Promise<unknown>;
|
package/dist/tools.js
CHANGED
|
@@ -101,13 +101,6 @@ var BuzzPosterClient = class {
|
|
|
101
101
|
async deleteMedia(key) {
|
|
102
102
|
return this.request("DELETE", `/api/v1/media/${encodeURIComponent(key)}`);
|
|
103
103
|
}
|
|
104
|
-
// Newsletter Preview (no ESP required)
|
|
105
|
-
async createPreview(data) {
|
|
106
|
-
return this.request("POST", "/api/v1/newsletters/preview", data);
|
|
107
|
-
}
|
|
108
|
-
async updatePreview(id, data) {
|
|
109
|
-
return this.request("PUT", `/api/v1/newsletters/preview/${id}`, data);
|
|
110
|
-
}
|
|
111
104
|
// Newsletter
|
|
112
105
|
async listSubscribers(params) {
|
|
113
106
|
return this.request(
|
|
@@ -1141,8 +1134,8 @@ function registerNewsletterTools(server, client, options = {}) {
|
|
|
1141
1134
|
server,
|
|
1142
1135
|
"create_newsletter",
|
|
1143
1136
|
{
|
|
1144
|
-
title: "Create Newsletter
|
|
1145
|
-
description: "
|
|
1137
|
+
title: "Create Newsletter Draft",
|
|
1138
|
+
description: "Push a newsletter to the user's ESP as a draft. Always call get_brand_voice first. Show an HTML preview to the user before calling this. Use table-based layouts, inline CSS only, 600px max width, email-safe fonts only (Arial, Helvetica, Georgia, Verdana), all images must use absolute URLs, keep under 102KB to avoid Gmail clipping. Optionally pass template_id to use an ESP-native template. Use list_esp_templates to discover available templates.",
|
|
1146
1139
|
inputSchema: {
|
|
1147
1140
|
subject: z5.string().describe("Email subject line"),
|
|
1148
1141
|
content: z5.string().describe("HTML content of the newsletter"),
|
|
@@ -1176,7 +1169,7 @@ function registerNewsletterTools(server, client, options = {}) {
|
|
|
1176
1169
|
previewText: args.preview_text
|
|
1177
1170
|
};
|
|
1178
1171
|
if (args.template_id) payload.templateId = args.template_id;
|
|
1179
|
-
const result = await client.
|
|
1172
|
+
const result = await client.createBroadcast(payload);
|
|
1180
1173
|
const response = {
|
|
1181
1174
|
...result,
|
|
1182
1175
|
subject: args.subject,
|
|
@@ -1192,15 +1185,15 @@ function registerNewsletterTools(server, client, options = {}) {
|
|
|
1192
1185
|
);
|
|
1193
1186
|
server.tool(
|
|
1194
1187
|
"update_newsletter",
|
|
1195
|
-
"Update an existing newsletter
|
|
1188
|
+
"Update an existing newsletter draft.",
|
|
1196
1189
|
{
|
|
1197
|
-
|
|
1190
|
+
broadcast_id: z5.string().describe("The broadcast/newsletter ID to update"),
|
|
1198
1191
|
subject: z5.string().optional().describe("Updated subject line"),
|
|
1199
1192
|
content: z5.string().optional().describe("Updated HTML content"),
|
|
1200
1193
|
preview_text: z5.string().optional().describe("Updated preview text")
|
|
1201
1194
|
},
|
|
1202
1195
|
{
|
|
1203
|
-
title: "Update Newsletter
|
|
1196
|
+
title: "Update Newsletter Draft",
|
|
1204
1197
|
readOnlyHint: false,
|
|
1205
1198
|
destructiveHint: false,
|
|
1206
1199
|
idempotentHint: true,
|
|
@@ -1211,44 +1204,7 @@ function registerNewsletterTools(server, client, options = {}) {
|
|
|
1211
1204
|
if (args.subject) data.subject = args.subject;
|
|
1212
1205
|
if (args.content) data.content = args.content;
|
|
1213
1206
|
if (args.preview_text) data.previewText = args.preview_text;
|
|
1214
|
-
const result = await client.
|
|
1215
|
-
const response = {
|
|
1216
|
-
...result,
|
|
1217
|
-
subject: args.subject,
|
|
1218
|
-
content: args.content,
|
|
1219
|
-
previewText: args.preview_text
|
|
1220
|
-
};
|
|
1221
|
-
return {
|
|
1222
|
-
content: [
|
|
1223
|
-
{ type: "text", text: JSON.stringify(response, null, 2) }
|
|
1224
|
-
]
|
|
1225
|
-
};
|
|
1226
|
-
}
|
|
1227
|
-
);
|
|
1228
|
-
server.tool(
|
|
1229
|
-
"push_newsletter_to_esp",
|
|
1230
|
-
"Push a newsletter to the user's ESP as a draft broadcast. Requires ESP to be configured. Use create_newsletter first for preview, then push when the user is happy with the content.",
|
|
1231
|
-
{
|
|
1232
|
-
subject: z5.string().describe("Email subject line"),
|
|
1233
|
-
content: z5.string().describe("HTML content of the newsletter"),
|
|
1234
|
-
preview_text: z5.string().optional().describe("Preview text shown in email clients"),
|
|
1235
|
-
template_id: z5.string().optional().describe("ESP-native template ID")
|
|
1236
|
-
},
|
|
1237
|
-
{
|
|
1238
|
-
title: "Push Newsletter to ESP",
|
|
1239
|
-
readOnlyHint: false,
|
|
1240
|
-
destructiveHint: false,
|
|
1241
|
-
idempotentHint: false,
|
|
1242
|
-
openWorldHint: true
|
|
1243
|
-
},
|
|
1244
|
-
async (args) => {
|
|
1245
|
-
const payload = {
|
|
1246
|
-
subject: args.subject,
|
|
1247
|
-
content: args.content,
|
|
1248
|
-
previewText: args.preview_text
|
|
1249
|
-
};
|
|
1250
|
-
if (args.template_id) payload.templateId = args.template_id;
|
|
1251
|
-
const result = await client.createBroadcast(payload);
|
|
1207
|
+
const result = await client.updateBroadcast(args.broadcast_id, data);
|
|
1252
1208
|
const response = {
|
|
1253
1209
|
...result,
|
|
1254
1210
|
subject: args.subject,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buzzposter/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "BuzzPoster MCP server - Social media, newsletters, and media hosting for any AI chatbot",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,29 +42,10 @@
|
|
|
42
42
|
"zod": "^3.24.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@blocknote/core": "^0.47.0",
|
|
46
|
-
"@blocknote/mantine": "^0.47.0",
|
|
47
|
-
"@blocknote/react": "^0.47.0",
|
|
48
|
-
"@mantine/core": "^8.3.11",
|
|
49
|
-
"@mantine/hooks": "^8.3.11",
|
|
50
|
-
"@mantine/utils": "^6.0.22",
|
|
51
|
-
"@tiptap/core": "^3.13.0",
|
|
52
|
-
"@tiptap/pm": "^3.13.0",
|
|
53
45
|
"@types/node": "^22.0.0",
|
|
54
46
|
"@types/react": "^18.3.0",
|
|
55
47
|
"@types/react-dom": "^18.3.0",
|
|
56
48
|
"@vitejs/plugin-react": "^5.1.4",
|
|
57
|
-
"prosemirror-commands": "^1.6.0",
|
|
58
|
-
"prosemirror-dropcursor": "^1.8.0",
|
|
59
|
-
"prosemirror-history": "^1.4.0",
|
|
60
|
-
"prosemirror-inputrules": "^1.4.0",
|
|
61
|
-
"prosemirror-keymap": "^1.2.0",
|
|
62
|
-
"prosemirror-model": "^1.25.0",
|
|
63
|
-
"prosemirror-schema-list": "^1.4.0",
|
|
64
|
-
"prosemirror-state": "^1.4.0",
|
|
65
|
-
"prosemirror-tables": "^1.8.0",
|
|
66
|
-
"prosemirror-transform": "^1.10.0",
|
|
67
|
-
"prosemirror-view": "^1.41.0",
|
|
68
49
|
"react": "^18.3.0",
|
|
69
50
|
"react-dom": "^18.3.0",
|
|
70
51
|
"tsup": "^8.3.0",
|