chaimi-bookkeeping-mcp 2.3.10 → 2.3.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chaimi-bookkeeping-mcp",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "柴米记账 MCP Server - 支持 Claude、Cursor、OpenClaw、WorkBuddy 等 AI 工具直接记账",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -86,6 +86,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
86
86
  amount: { type: 'number', description: '金额(必填)' },
87
87
  category: { type: 'string', description: '分类(可选,如:餐饮、食品、交通)' },
88
88
  store: { type: 'string', description: '商家名称(可选)' },
89
+ date: { type: 'string', description: '消费时间(ISO格式)(可选)' },
89
90
  note: { type: 'string', description: '备注(可选)' },
90
91
  agentType: { type: 'string', description: '【推荐自动填充】Agent类型,如:claude-desktop、cursor、openclaw、workbuddy、trae' },
91
92
  apiProvider: { type: 'string', description: '【推荐自动填充】AI服务提供商,如:anthropic、openai、doubao、aliyun' },
@@ -179,6 +180,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
179
180
  amount: { type: 'number', description: '收入金额' },
180
181
  category: { type: 'string', description: '收入分类(如:工资、奖金、投资)' },
181
182
  store: { type: 'string', description: '付款方(如:公司名称)' },
183
+ date: { type: 'string', description: '收入时间(ISO格式)(可选)' },
182
184
  note: { type: 'string', description: '备注' },
183
185
  agentType: { type: 'string', description: '【推荐自动填充】Agent类型,如:claude-desktop、cursor、openclaw、workbuddy、trae' },
184
186
  apiProvider: { type: 'string', description: '【推荐自动填充】AI服务提供商,如:anthropic、openai、doubao、aliyun' },
@@ -354,6 +356,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
354
356
  const savedAgentType = processedArgs.agentType;
355
357
  const savedApiProvider = processedArgs.apiProvider;
356
358
  const savedRawInput = processedArgs.rawInput;
359
+ const savedDate = processedArgs.date;
357
360
  processedArgs = fillResult.data;
358
361
  if (savedAgentType) {
359
362
  processedArgs.agentType = savedAgentType;
@@ -364,6 +367,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
364
367
  if (savedRawInput) {
365
368
  processedArgs.rawInput = savedRawInput;
366
369
  }
370
+ if (savedDate) {
371
+ processedArgs.date = savedDate;
372
+ }
367
373
  }
368
374
  }
369
375
 
@@ -527,6 +533,7 @@ function convertParams(toolName, args) {
527
533
  unit: '',
528
534
  weight: '',
529
535
  marketPrice: '',
536
+ date: args.date,
530
537
  note: sanitizeString(args.note, 500) || '',
531
538
  rawInput: sanitizeString(args.rawInput, 1000) || '',
532
539
  agentType: args.agentType || '',
@@ -581,6 +588,7 @@ function convertParams(toolName, args) {
581
588
  memberCardNo: sanitizeString(args.memberCardNo, 50),
582
589
  currentPoints: parseInt(args.currentPoints) || 0,
583
590
  totalPoints: parseInt(args.totalPoints) || 0,
591
+ date: args.date,
584
592
  rawInput: sanitizeString(args.rawInput, 2000),
585
593
  agentType: args.agentType || '',
586
594
  apiProvider: args.apiProvider || '',
@@ -608,6 +616,7 @@ function convertParams(toolName, args) {
608
616
  amount: validateAmount(args.amount),
609
617
  category: sanitizeString(args.category, 50) || '其他',
610
618
  store: sanitizeString(args.store, 100),
619
+ date: args.date,
611
620
  note: sanitizeString(args.note, 500),
612
621
  transactionType: 'income',
613
622
  rawInput: sanitizeString(args.rawInput, 1000),