@mambasms/mcp-server 0.7.13 → 0.7.14

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/index.js CHANGED
@@ -123,7 +123,7 @@ function defineTool(name, description, shape, handler) {
123
123
  }
124
124
 
125
125
  const server = new McpServer(
126
- { name: "mambasms-mcp-server", version: "0.7.13" },
126
+ { name: "mambasms-mcp-server", version: "0.7.14" },
127
127
  {
128
128
  instructions: `MambaSMS 营销自动化(店铺级,鉴权用 MAMBA_ACCESS_TOKEN 店铺密钥)。共 66 个工具,分四组。
129
129
  不确定用什么/想先看总览 → mamba_guide;只知道关键词 → mamba_search;要参数细节 → mamba_tool_schema。
@@ -1133,7 +1133,7 @@ const DRAFT_NOTE = "⚠️本工具只创建/修改草稿,不会发送、不会
1133
1133
  defineTool(
1134
1134
  "campaign_create_email",
1135
1135
  `创建邮件营销活动草稿。${DRAFT_NOTE}
1136
- 正文两种写法:**富文本=html**(默认形式;简单排版或整份 HTML 源码都放这里,走后台富文本/HTML 编辑器)或 **组件=email_design**(结构化JSON;先 catalog_query(topic=emailDesign) 查规范,或 template_list_system 选模板后传 template_id)。二者必传其一、互斥。客户没说清→用 html(富文本)。`,
1136
+ 正文两种写法:**富文本/HTML=html**(默认形式;简单排版或整份 HTML 源码都放这里,editor 参数可选后台默认打开富文本还是 HTML 源码编辑器)或 **组件=email_design**(结构化JSON;先 catalog_query(topic=emailDesign) 查规范,或 template_list_system 选模板后传 template_id)。二者必传其一、互斥。客户没说清→用 html(富文本)。`,
1137
1137
  {
1138
1138
  title: z.string().min(1).describe("活动名称"),
1139
1139
  email_design: z
@@ -1152,6 +1152,10 @@ defineTool(
1152
1152
  .enum(["promo-hero", "promo-flash", "single-spotlight", "new-arrival", "newsletter", "win-back"])
1153
1153
  .optional()
1154
1154
  .describe("版式骨架(不套系统模板时用;与 template_id 二选一)"),
1155
+ editor: z
1156
+ .enum(["richtext", "html"])
1157
+ .optional()
1158
+ .describe("后台默认编辑器(仅 html 正文用):richtext=富文本(默认),html=HTML 源码编辑器。客户明确要「自己改 HTML 源码」时传 html"),
1155
1159
  subject_line: z.string().optional().describe("邮件主题(不传则按内容推导)"),
1156
1160
  preheader: z.string().optional().describe("预览文本"),
1157
1161
  send_name: z.string().optional().describe("发件人名称(不传用店铺名)"),
@@ -1193,6 +1197,7 @@ defineTool(
1193
1197
  communicationSelect: a.communication_select,
1194
1198
  tagId: a.tag_id,
1195
1199
  nonSendTagId: a.non_send_tag_id,
1200
+ editor: a.editor,
1196
1201
  })) if (v !== undefined) body[k] = v;
1197
1202
  const data = await callApi("/api/v1/campaign/draft/create-html", body);
1198
1203
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mambasms/mcp-server",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "MCP server for MambaSMS email templates - create/manage templates from AI agents (Codex, Claude Desktop, Cursor)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
 
26
26
  **① 邮件怎么做**(第一次做邮件时)
27
27
  > 这封邮件想怎么做?
28
- > **A. 富文本(默认)**:我直接写出成品——简单排版或整份 HTML 源码都可以(你有现成 HTML 也可以发我)。交付是**活动草稿**,后台富文本/HTML 编辑器都能改
28
+ > **A. 富文本(默认)**:我直接写出成品——简单排版或整份 HTML 源码都可以(你有现成 HTML 也可以发我)。交付是**活动草稿**,后台富文本/HTML 编辑器都能改(想在后台直接改源码就说一声,我按 HTML 编辑器建)
29
29
  > **B. 组件**:用平台模板或从零生成组件,之后可在后台拖拽微调;这种能存成**模板**,也能给自动化流程用
30
30
 
31
31
  **② 发给谁**
@@ -54,7 +54,7 @@
54
54
 
55
55
  | 方式 | 一句话 |
56
56
  |---|---|
57
- | 富文本(默认) | 直接出成品,源码/简单排版都行;产物是**活动草稿**,后台富文本/HTML 编辑器改 |
57
+ | 富文本(默认) | 直接出成品,源码/简单排版都行;产物是**活动草稿**,后台富文本/HTML 编辑器改(要自己改源码 → `editor="html"`) |
58
58
  | 组件 | 平台模板或从零生成,后台拖拽微调;能存成**模板**、能给自动化流程复用 |
59
59
 
60
60
  ---
@@ -16,6 +16,8 @@
16
16
  | HTML | `html`(整份源码) | `edition=richtext` | 完全控制,后台 HTML 编辑器可改 |
17
17
 
18
18
  > 富文本与 HTML 存储同形,只是编辑器不同。选哪种**先问客户**(见 [`ask-first.md`](ask-first.md))。
19
+ > 客户说"我要自己改 HTML 源码/给我 HTML 编辑器" → `campaign_create_email(html=…, editor="html")`,草稿打开就是 HTML 源码编辑器;
20
+ > 不传 `editor` = 富文本编辑器(默认)。已建好的草稿客户也能在后台第 1 步自己切富文本⇄HTML(内容不丢)。
19
21
  >
20
22
  > ⚠️ **邮件只有两种形式:富文本(默认,含 HTML)与组件**。客户要富文本/整封 HTML → `campaign_create_email(html=...)` **建活动草稿**(`edition=richtext`);
21
23
  > `template_create` 属于**组件**(模板里嵌一个 HTML 区块),不要拿它交付富文本式邮件。客户没说清 → 默认富文本。