chaimi-keep-mcp 3.1.36-beta.0 → 3.1.36-beta.2
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/SKILL.md +15 -27
- package/package.json +1 -1
- package/server.js +48 -29
package/SKILL.md
CHANGED
|
@@ -82,27 +82,18 @@ argument-hint: "[记账内容]"
|
|
|
82
82
|
2. 使用 Prompt 解析用户输入,获取 JSON 结果
|
|
83
83
|
3. 调用 `save_expense` 保存(传入所有解析结果字段)
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| "晚餐"、"晚饭" | 18:00 或 19:00 |
|
|
91
|
-
| "夜宵" | 23:00 |
|
|
92
|
-
| "早上" | 09:00 |
|
|
93
|
-
| "下午" | 15:00 |
|
|
94
|
-
| "晚上" | 20:00 |
|
|
95
|
-
| 具体时间(如"11点半") | 使用具体时间 |
|
|
96
|
-
| 无时间信息 | 使用当前时间 |
|
|
97
|
-
|
|
98
|
-
**重要:** 最终传入的 `date` 参数必须包含时间部分,格式:`2026-04-14T12:00:00+08:00`
|
|
85
|
+
**时间处理规则:**
|
|
86
|
+
|
|
87
|
+
Agent **直接使用当前时间**作为消费时间,无需进行时间语义解析。
|
|
88
|
+
|
|
89
|
+
**最终传入的 `date` 参数必须包含时间部分,格式:**`2026-04-14T12:00:00+08:00`
|
|
99
90
|
|
|
100
91
|
**必填字段:** `name`、`amount`、`category`、`date`
|
|
101
92
|
|
|
102
93
|
**可选字段:**
|
|
103
|
-
- `subCategory
|
|
104
|
-
- `unit
|
|
105
|
-
- `marketPrice
|
|
94
|
+
- `subCategory`:子分类(可选)
|
|
95
|
+
- `unit`:单位(可选)
|
|
96
|
+
- `marketPrice`:市场单价(可选)
|
|
106
97
|
|
|
107
98
|
---
|
|
108
99
|
|
|
@@ -113,21 +104,18 @@ argument-hint: "[记账内容]"
|
|
|
113
104
|
2. 使用 Prompt 解析用户输入,获取 JSON 结果
|
|
114
105
|
3. 调用 `save_income` 保存(传入所有解析结果字段)
|
|
115
106
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
| "工资"、"收入" | 09:00(默认工作时间) |
|
|
120
|
-
| "红包"、"奖金" | 具体时间或当前时间 |
|
|
121
|
-
| 无时间信息 | 使用当前时间 |
|
|
107
|
+
**时间处理规则:**
|
|
108
|
+
|
|
109
|
+
Agent **直接使用当前时间**作为收入时间,无需进行时间语义解析。
|
|
122
110
|
|
|
123
|
-
|
|
111
|
+
**最终传入的 `date` 参数必须包含时间部分,格式:**`2026-04-14T09:00:00+08:00`
|
|
124
112
|
|
|
125
113
|
**必填字段:** `name`、`amount`、`category`、`date`
|
|
126
114
|
|
|
127
115
|
**可选字段:**
|
|
128
|
-
- `subCategory
|
|
129
|
-
- `unit
|
|
130
|
-
- `marketPrice
|
|
116
|
+
- `subCategory`:子分类(可选)
|
|
117
|
+
- `unit`:单位(可选)
|
|
118
|
+
- `marketPrice`:市场单价(可选)
|
|
131
119
|
|
|
132
120
|
---
|
|
133
121
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -139,19 +139,19 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
139
139
|
properties: {
|
|
140
140
|
name: { type: 'string', description: '商品名称(必填)' },
|
|
141
141
|
amount: { type: 'number', description: '金额(必填)' },
|
|
142
|
-
category: { type: 'string', description: '
|
|
143
|
-
subCategory: { type: 'string', description: '
|
|
144
|
-
unit: { type: 'string', description: '
|
|
145
|
-
marketPrice: { type: 'string', description: '
|
|
142
|
+
category: { type: 'string', description: '【必填】分类,如:餐饮、食品、交通' },
|
|
143
|
+
subCategory: { type: 'string', description: '子分类(可选)' },
|
|
144
|
+
unit: { type: 'string', description: '单位(可选)' },
|
|
145
|
+
marketPrice: { type: 'string', description: '市场单价(可选)' },
|
|
146
146
|
store: { type: 'string', description: '商家名称(可选)' },
|
|
147
147
|
date: { type: 'string', description: '消费时间(ISO格式)(可选)' },
|
|
148
148
|
note: { type: 'string', description: '备注(可选)' },
|
|
149
|
-
agentType: { type: 'string', description: '
|
|
150
|
-
apiProvider: { type: 'string', description: '
|
|
151
|
-
rawInput: { type: 'string', description: '
|
|
149
|
+
agentType: { type: 'string', description: '【必填】Agent类型,如:claude-desktop、cursor、openclaw、workbuddy、trae' },
|
|
150
|
+
apiProvider: { type: 'string', description: '【必填】AI服务提供商,如:anthropic、openai、doubao、aliyun' },
|
|
151
|
+
rawInput: { type: 'string', description: '【必填】用户的原始输入内容,用于记录用户原始请求' },
|
|
152
152
|
mcp_version: { type: 'string', description: 'MCP Server 版本号(自动填充)' },
|
|
153
153
|
},
|
|
154
|
-
required: ['name', 'amount'],
|
|
154
|
+
required: ['name', 'amount', 'category', 'agentType', 'apiProvider', 'rawInput'],
|
|
155
155
|
},
|
|
156
156
|
},
|
|
157
157
|
{
|
|
@@ -178,55 +178,74 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
178
178
|
originalName: { type: 'string', description: '原始商品名称(含规格)' },
|
|
179
179
|
price: { type: 'number', description: '【必填】单价' },
|
|
180
180
|
quantity: { type: 'number', description: '【必填】数量' },
|
|
181
|
-
unit: { type: 'string', description: '
|
|
181
|
+
unit: { type: 'string', description: '【必填】计价单位(如:元/500g、元/个、元/盒、元/袋)' },
|
|
182
182
|
amount: { type: 'number', description: '【必填】金额,必须等于 price × quantity' },
|
|
183
183
|
weight: { type: 'string', description: '重量' },
|
|
184
|
-
marketPrice: { type: 'string', description: '
|
|
185
|
-
category: { type: 'string', description: '
|
|
184
|
+
marketPrice: { type: 'string', description: '【必填】单价数值,根据unit计算,如unit=元/500g,则marketPrice=金额÷重量(g)×500' },
|
|
185
|
+
category: { type: 'string', description: '【必填】主分类(如:蔬菜、肉类、水果、水产,常见超市购物分类)' },
|
|
186
186
|
subCategory: { type: 'string', description: '子分类(如:叶菜类、根茎类、猪肉类,超市细分类目),推荐填写' },
|
|
187
187
|
},
|
|
188
|
-
required: ['name', 'amount', 'price', 'quantity'],
|
|
188
|
+
required: ['name', 'amount', 'price', 'quantity', 'unit', 'marketPrice', 'category'],
|
|
189
189
|
},
|
|
190
190
|
},
|
|
191
|
-
agentType: { type: 'string', description: '
|
|
192
|
-
apiProvider: { type: 'string', description: '
|
|
193
|
-
rawInput: { type: 'string', description: '
|
|
191
|
+
agentType: { type: 'string', description: '【必填】Agent类型:claude-desktop、cursor、openclaw、workbuddy、trae' },
|
|
192
|
+
apiProvider: { type: 'string', description: '【必填】AI服务提供商:anthropic、openai、doubao、aliyun' },
|
|
193
|
+
rawInput: { type: 'string', description: '【必填】用户的原始输入内容' },
|
|
194
194
|
mcp_version: { type: 'string', description: '【自动填充】MCP Server版本号' },
|
|
195
195
|
},
|
|
196
|
-
required: ['store', 'items'],
|
|
196
|
+
required: ['store', 'items', 'agentType', 'apiProvider', 'rawInput'],
|
|
197
197
|
},
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
name: 'get_expenses',
|
|
201
|
-
description: '
|
|
201
|
+
description: '查询消费记录。支持按日期范围、分类、商家、来源等多维度筛选',
|
|
202
202
|
inputSchema: {
|
|
203
203
|
type: 'object',
|
|
204
204
|
properties: {
|
|
205
|
-
limit: { type: 'number', description: '
|
|
206
|
-
|
|
205
|
+
limit: { type: 'number', description: '返回数量限制,默认10条,最大100', default: 10 },
|
|
206
|
+
skip: { type: 'number', description: '跳过条数,用于分页', default: 0 },
|
|
207
|
+
startDate: { type: 'string', description: '开始日期(ISO格式,如:2026-04-01)' },
|
|
208
|
+
endDate: { type: 'string', description: '结束日期(ISO格式,如:2026-04-30)' },
|
|
209
|
+
category: { type: 'string', description: '按分类筛选(如:餐饮、食品、交通)' },
|
|
210
|
+
subCategory: { type: 'string', description: '按子分类筛选(如:叶菜类、猪肉类)' },
|
|
211
|
+
store: { type: 'string', description: '按商家名称筛选' },
|
|
212
|
+
source: { type: 'string', description: '按来源筛选(如:mcp_txt_expense、mcp_receipt)' },
|
|
213
|
+
keyword: { type: 'string', description: '按商品名称关键词搜索' },
|
|
214
|
+
orderBy: { type: 'string', description: '排序方式:date_desc(默认)、date_asc、amount_desc、amount_asc', enum: ['date_desc', 'date_asc', 'amount_desc', 'amount_asc'], default: 'date_desc' },
|
|
207
215
|
},
|
|
208
216
|
},
|
|
209
217
|
},
|
|
210
218
|
{
|
|
211
219
|
name: 'get_receipt_list',
|
|
212
|
-
description: '
|
|
220
|
+
description: '获取小票列表。支持按日期范围、商家、金额等多维度筛选',
|
|
213
221
|
inputSchema: {
|
|
214
222
|
type: 'object',
|
|
215
223
|
properties: {
|
|
216
|
-
limit: { type: 'number', description: '
|
|
224
|
+
limit: { type: 'number', description: '返回数量限制,默认5条,最大50', default: 5 },
|
|
225
|
+
skip: { type: 'number', description: '跳过条数,用于分页', default: 0 },
|
|
226
|
+
startDate: { type: 'string', description: '开始日期(ISO格式,如:2026-04-01)' },
|
|
227
|
+
endDate: { type: 'string', description: '结束日期(ISO格式,如:2026-04-30)' },
|
|
228
|
+
store: { type: 'string', description: '按商家名称筛选' },
|
|
229
|
+
minAmount: { type: 'number', description: '最小金额筛选' },
|
|
230
|
+
maxAmount: { type: 'number', description: '最大金额筛选' },
|
|
231
|
+
orderBy: { type: 'string', description: '排序方式:date_desc(默认)、date_asc、amount_desc、amount_asc', enum: ['date_desc', 'date_asc', 'amount_desc', 'amount_asc'], default: 'date_desc' },
|
|
217
232
|
},
|
|
218
233
|
},
|
|
219
234
|
},
|
|
220
235
|
{
|
|
221
236
|
name: 'get_statistics',
|
|
222
|
-
description: '
|
|
237
|
+
description: '获取消费统计。支持按年月、日期范围统计,可查看分类占比、消费趋势等',
|
|
223
238
|
inputSchema: {
|
|
224
239
|
type: 'object',
|
|
225
240
|
properties: {
|
|
226
|
-
yearMonth: { type: 'string', description: '年月(如:2026-03
|
|
227
|
-
|
|
241
|
+
yearMonth: { type: 'string', description: '年月(如:2026-03),与startDate/endDate二选一' },
|
|
242
|
+
startDate: { type: 'string', description: '开始日期(ISO格式),与yearMonth二选一' },
|
|
243
|
+
endDate: { type: 'string', description: '结束日期(ISO格式),与yearMonth二选一' },
|
|
244
|
+
type: { type: 'string', description: '统计维度:item(商品明细)、receipt(小票汇总)、category(分类统计)、daily(每日趋势)、store(商家统计)', enum: ['item', 'receipt', 'category', 'daily', 'store'], default: 'category' },
|
|
245
|
+
category: { type: 'string', description: '按特定分类筛选统计' },
|
|
246
|
+
store: { type: 'string', description: '按特定商家筛选统计' },
|
|
247
|
+
groupBy: { type: 'string', description: '分组方式:category(分类)、date(日期)、store(商家)', enum: ['category', 'date', 'store'] },
|
|
228
248
|
},
|
|
229
|
-
required: ['yearMonth'],
|
|
230
249
|
},
|
|
231
250
|
},
|
|
232
251
|
{
|
|
@@ -241,12 +260,12 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
241
260
|
store: { type: 'string', description: '付款方(如:公司名称)(可选)' },
|
|
242
261
|
date: { type: 'string', description: '收入时间(ISO格式,必须包含时间部分,如:2026-04-14T09:00:00+08:00)(可选)' },
|
|
243
262
|
note: { type: 'string', description: '备注(可选)' },
|
|
244
|
-
agentType: { type: 'string', description: '
|
|
245
|
-
apiProvider: { type: 'string', description: '
|
|
246
|
-
rawInput: { type: 'string', description: '
|
|
263
|
+
agentType: { type: 'string', description: '【必填】Agent类型,如:claude-desktop、cursor、openclaw、workbuddy、trae' },
|
|
264
|
+
apiProvider: { type: 'string', description: '【必填】AI服务提供商,如:anthropic、openai、doubao、aliyun' },
|
|
265
|
+
rawInput: { type: 'string', description: '【必填】用户的原始输入内容,用于记录用户原始请求' },
|
|
247
266
|
mcp_version: { type: 'string', description: 'MCP Server 版本号(自动填充)' },
|
|
248
267
|
},
|
|
249
|
-
required: ['name', 'amount', 'category'],
|
|
268
|
+
required: ['name', 'amount', 'category', 'agentType', 'apiProvider', 'rawInput'],
|
|
250
269
|
},
|
|
251
270
|
},
|
|
252
271
|
{
|