gm-mcp 1.3.18 → 1.3.20
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/dist/index.js +5 -17
- package/dist/test.js +5 -7
- package/package.json +1 -1
- package/src/index.ts +5 -17
- package/src/test.ts +5 -6
package/dist/index.js
CHANGED
|
@@ -91,33 +91,21 @@ exports.server.registerTool("debt_collection", {
|
|
|
91
91
|
`,
|
|
92
92
|
inputSchema: v4_1.default.object({
|
|
93
93
|
company_name: v4_1.default.string().describe("Company name to get data"),
|
|
94
|
-
year: v4_1.default.string().describe("Year to get company debt collection")
|
|
94
|
+
year: v4_1.default.string().nullable().describe("Year to get company debt collection"),
|
|
95
95
|
product_type: v4_1.default
|
|
96
96
|
.string()
|
|
97
97
|
.nullable()
|
|
98
|
-
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF ")
|
|
99
|
-
|
|
100
|
-
.optional(),
|
|
101
|
-
month: v4_1.default.string().nullable().describe("Month to get company debt collection").default("").optional(),
|
|
102
|
-
}),
|
|
103
|
-
outputSchema: v4_1.default.object({
|
|
104
|
-
company_name: v4_1.default.string().describe("Company name to get data"),
|
|
105
|
-
year: v4_1.default.string().describe("Year to get company debt collection").default("2025").optional(),
|
|
106
|
-
product_type: v4_1.default
|
|
107
|
-
.string()
|
|
108
|
-
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF ")
|
|
109
|
-
.default(product_type_1.PRODUCT_TYPE.EWA_02_03)
|
|
110
|
-
.optional(),
|
|
111
|
-
month: v4_1.default.string().nullable().describe("Month to get company debt collection").default("").optional(),
|
|
98
|
+
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF "),
|
|
99
|
+
month: v4_1.default.string().nullable().describe("Month to get company debt collection"),
|
|
112
100
|
}),
|
|
113
101
|
}, (args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
114
102
|
const { company_name, product_type, month, year } = args;
|
|
115
103
|
return (0, lark_tool_1.debtCollectionRateTool)({
|
|
116
104
|
sendMessageToLark: (0, env_1.getEnv)().SEND_MESSAGE_TO_LARK === "true",
|
|
117
105
|
companyName: company_name || "",
|
|
118
|
-
productType: product_type ||
|
|
106
|
+
productType: product_type || product_type_1.PRODUCT_TYPE.EWA_02_03,
|
|
119
107
|
month: month || "",
|
|
120
|
-
year,
|
|
108
|
+
year: year || "",
|
|
121
109
|
});
|
|
122
110
|
}));
|
|
123
111
|
// server.tool(
|
package/dist/test.js
CHANGED
|
@@ -14,22 +14,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const zod_1 = __importDefault(require("zod"));
|
|
16
16
|
const env_1 = require("./env");
|
|
17
|
-
const product_type_1 = require("./services/constants/product-type");
|
|
18
17
|
function setupTest() {
|
|
19
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
19
|
(0, env_1.ensureEnvVariables)();
|
|
21
|
-
console.log(zod_1.default
|
|
20
|
+
console.log(JSON.stringify(zod_1.default
|
|
22
21
|
.object({
|
|
23
22
|
company_name: zod_1.default.string().describe("Company name to get data"),
|
|
24
23
|
year: zod_1.default.string().describe("Year to get company debt collection").default("2025").optional(),
|
|
25
24
|
product_type: zod_1.default
|
|
26
25
|
.string()
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
month: zod_1.default.string().describe("Month to get company debt collection").default("").optional(),
|
|
26
|
+
.nullable()
|
|
27
|
+
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF "),
|
|
28
|
+
month: zod_1.default.string().nullable().describe("Month to get company debt collection").default("").optional(),
|
|
31
29
|
})
|
|
32
|
-
.toJSONSchema());
|
|
30
|
+
.toJSONSchema()));
|
|
33
31
|
// const res = zodToJsonSchema();
|
|
34
32
|
// console.log(res);
|
|
35
33
|
// const r = await fetchDebtCollectionRecords();
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -103,24 +103,12 @@ server.registerTool(
|
|
|
103
103
|
`,
|
|
104
104
|
inputSchema: z.object({
|
|
105
105
|
company_name: z.string().describe("Company name to get data"),
|
|
106
|
-
year: z.string().describe("Year to get company debt collection")
|
|
106
|
+
year: z.string().nullable().describe("Year to get company debt collection"),
|
|
107
107
|
product_type: z
|
|
108
108
|
.string()
|
|
109
109
|
.nullable()
|
|
110
|
-
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF ")
|
|
111
|
-
|
|
112
|
-
.optional(),
|
|
113
|
-
month: z.string().nullable().describe("Month to get company debt collection").default("").optional(),
|
|
114
|
-
}),
|
|
115
|
-
outputSchema: z.object({
|
|
116
|
-
company_name: z.string().describe("Company name to get data"),
|
|
117
|
-
year: z.string().describe("Year to get company debt collection").default("2025").optional(),
|
|
118
|
-
product_type: z
|
|
119
|
-
.string()
|
|
120
|
-
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF ")
|
|
121
|
-
.default(PRODUCT_TYPE.EWA_02_03)
|
|
122
|
-
.optional(),
|
|
123
|
-
month: z.string().nullable().describe("Month to get company debt collection").default("").optional(),
|
|
110
|
+
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF "),
|
|
111
|
+
month: z.string().nullable().describe("Month to get company debt collection"),
|
|
124
112
|
}),
|
|
125
113
|
},
|
|
126
114
|
async (args) => {
|
|
@@ -128,9 +116,9 @@ server.registerTool(
|
|
|
128
116
|
return debtCollectionRateTool({
|
|
129
117
|
sendMessageToLark: getEnv().SEND_MESSAGE_TO_LARK === "true",
|
|
130
118
|
companyName: company_name || "",
|
|
131
|
-
productType: product_type ||
|
|
119
|
+
productType: product_type || PRODUCT_TYPE.EWA_02_03,
|
|
132
120
|
month: month || "",
|
|
133
|
-
year,
|
|
121
|
+
year: year || "",
|
|
134
122
|
});
|
|
135
123
|
}
|
|
136
124
|
);
|
package/src/test.ts
CHANGED
|
@@ -18,18 +18,17 @@ import { PRODUCT_TYPE } from "./services/constants/product-type";
|
|
|
18
18
|
async function setupTest() {
|
|
19
19
|
ensureEnvVariables();
|
|
20
20
|
console.log(
|
|
21
|
-
z
|
|
21
|
+
JSON.stringify(z
|
|
22
22
|
.object({
|
|
23
23
|
company_name: z.string().describe("Company name to get data"),
|
|
24
24
|
year: z.string().describe("Year to get company debt collection").default("2025").optional(),
|
|
25
25
|
product_type: z
|
|
26
26
|
.string()
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
month: z.string().describe("Month to get company debt collection").default("").optional(),
|
|
27
|
+
.nullable()
|
|
28
|
+
.describe("Product type to get data one of follow values EWA 02 - 03 | EWA 04 | Lương X3 | Lương X3 - EVF "),
|
|
29
|
+
month: z.string().nullable().describe("Month to get company debt collection").default("").optional(),
|
|
31
30
|
})
|
|
32
|
-
.toJSONSchema()
|
|
31
|
+
.toJSONSchema())
|
|
33
32
|
);
|
|
34
33
|
|
|
35
34
|
// const res = zodToJsonSchema();
|