@mambasms/mcp-server 0.7.19 → 0.7.21
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.
|
|
126
|
+
{ name: "mambasms-mcp-server", version: "0.7.21" },
|
|
127
127
|
{
|
|
128
128
|
instructions: `MambaSMS 营销自动化(店铺级,鉴权用 MAMBA_ACCESS_TOKEN 店铺密钥)。共 66 个工具,分四组。
|
|
129
129
|
不确定用什么/想先看总览 → mamba_guide;只知道关键词 → mamba_search;要参数细节 → mamba_tool_schema。
|
|
@@ -1465,7 +1465,7 @@ name 最长 20 字。创建后 status=draft,人数由后台异步打包(可用 g
|
|
|
1465
1465
|
{
|
|
1466
1466
|
name: z.string().min(1).describe("分组名称(最长 20 字)"),
|
|
1467
1467
|
query_content: z.string().min(2).describe("二维条件数组的 JSON 字符串,例:[[{\"field\":\"country\",\"condition\":\"term_query\",\"value\":\"US\",\"logic\":\"must\",\"nestedPath\":\"\"}]]"),
|
|
1468
|
-
intent: z.string().optional().describe("客户原始需求原文(
|
|
1468
|
+
intent: z.string().optional().describe("客户原始需求原文(**必填**):后端用它做语义护栏(否定意图/退订口径/别多塞条件/OR结构);缺失会被拒绝"),
|
|
1469
1469
|
},
|
|
1470
1470
|
async ({ name, query_content, intent }) => {
|
|
1471
1471
|
if (Date.now() - groupCatalogQueriedAt > GROUP_CATALOG_TTL_MS) {
|
|
@@ -1481,6 +1481,16 @@ name 最长 20 字。创建后 status=draft,人数由后台异步打包(可用 g
|
|
|
1481
1481
|
}],
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
1484
|
+
if (!intent || !intent.trim()) {
|
|
1485
|
+
return {
|
|
1486
|
+
isError: true,
|
|
1487
|
+
content: [{ type: "text", text: JSON.stringify({
|
|
1488
|
+
error: "缺少 intent(客户原始需求原文)",
|
|
1489
|
+
next: "把客户这句需求原样传进 intent 后重试,例如 intent=\"把近90天在美国下过两次单的客户圈出来\"",
|
|
1490
|
+
why: "后端的语义护栏(否定意图/活动退订口径/多余订阅条件/OR结构/语义覆盖)只靠这段原话判定;不传等于放弃这层保护,会把『没下过单』圈成『下单≥1』这类人群",
|
|
1491
|
+
}, null, 2) }],
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1484
1494
|
const body = { tool: "create_user_group", arguments: { name, queryContent: query_content } };
|
|
1485
1495
|
// 有原话就带上:后端靠它做语义护栏(没下过单/退订口径/OR 结构等),空着这些护栏会跳过
|
|
1486
1496
|
if (intent && intent.trim()) body.intent = intent.trim();
|
package/package.json
CHANGED
|
@@ -167,4 +167,6 @@ query_content = [
|
|
|
167
167
|
|
|
168
168
|
### 8.2 重试必须带原话
|
|
169
169
|
|
|
170
|
-
每次调用 `user_group_create` 都要带 `intent
|
|
170
|
+
每次调用 `user_group_create` 都要带 `intent=<客户原话>`(**必填**,缺了会被直接拒绝)。语义类护栏(否定/退订/多余条件/OR/覆盖)**只靠 intent 判定**,不传等于放弃这层保护。
|
|
171
|
+
|
|
172
|
+
`intent` 就写客户这一句需求即可——把**本轮的限定语**(时间窗、国家、次数、订单状态)带全,不需要把历史对话塞进来。例:`intent="把近90天在美国下过两次单的客户圈出来"`。
|