chaimi-bookkeeping-mcp 2.4.0 → 2.4.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/package.json +1 -1
- package/server.js +8 -18
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -333,8 +333,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
case 'save_receipt': {
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
// 总是调用 fillDefaults 来补充默认值(包括 actualAmount 等字段)
|
|
337
|
+
const fillResult = await callMcpPrompt(
|
|
338
|
+
'fillDefaults',
|
|
338
339
|
{
|
|
339
340
|
data: processedArgs,
|
|
340
341
|
type: 'parseReceipt'
|
|
@@ -342,22 +343,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
342
343
|
token
|
|
343
344
|
);
|
|
344
345
|
|
|
345
|
-
if (
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
type: 'parseReceipt'
|
|
351
|
-
},
|
|
352
|
-
token
|
|
353
|
-
);
|
|
354
|
-
|
|
355
|
-
if (fillResult.success) {
|
|
356
|
-
processedArgs = {
|
|
357
|
-
...fillResult.data,
|
|
358
|
-
...processedArgs
|
|
359
|
-
};
|
|
360
|
-
}
|
|
346
|
+
if (fillResult.success) {
|
|
347
|
+
processedArgs = {
|
|
348
|
+
...fillResult.data,
|
|
349
|
+
...processedArgs
|
|
350
|
+
};
|
|
361
351
|
}
|
|
362
352
|
|
|
363
353
|
const mcpParams = convertParams('save_receipt', processedArgs);
|