gm-mcp 1.1.32 → 1.1.33

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 CHANGED
@@ -70,8 +70,13 @@ exports.server.tool("statistic_salary_x3_in_range", "Get statistic salary x3 wit
70
70
  sendMessageToLark: (0, env_1.getEnv)().SEND_MESSAGE_TO_LARK === "true",
71
71
  });
72
72
  }));
73
- exports.server.tool("debt_collection", "The company's debt collection information", {
73
+ exports.server.tool("debt_collection", "The company's debt collection by year (optional) information, if year is not provided use this year (vietname time zone)", {
74
74
  company_name: zod_1.default.string({ description: "Company name to get data" }),
75
+ year: zod_1.default
76
+ .string({
77
+ description: "Year of company debt collection, if year is not provided use this year (vietname time zone)",
78
+ })
79
+ .optional(),
75
80
  }, (args) => __awaiter(void 0, void 0, void 0, function* () {
76
81
  const { company_name } = args;
77
82
  return (0, lark_tool_1.debtCollectionRateTool)({
package/dist/test.js CHANGED
@@ -8,24 +8,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ const zod_1 = __importDefault(require("zod"));
12
16
  const env_1 = require("./env");
13
- const lark_tool_1 = require("./tools/lark-tool");
14
- const product_type_1 = require("./services/constants/product-type");
17
+ const zod_to_json_schema_1 = require("zod-to-json-schema");
15
18
  function setupTest() {
16
19
  return __awaiter(this, void 0, void 0, function* () {
17
20
  (0, env_1.ensureEnvVariables)();
21
+ const res = (0, zod_to_json_schema_1.zodToJsonSchema)(zod_1.default.object({
22
+ name: zod_1.default.string(),
23
+ phone: zod_1.default.string().optional(),
24
+ }));
25
+ console.log(res);
18
26
  // const r = await fetchDebtCollectionRecords();
19
27
  // console.log(r.length);
20
28
  // const compnay = "BGG";
21
29
  // const month = "12/2025";
22
- const res = yield (0, lark_tool_1.debtCollectionRateTool)({
23
- sendMessageToLark: true,
24
- companyName: "Tkg",
25
- // monthDate: "8/2025",
26
- productType: product_type_1.PRODUCT_TYPE.X3_EVF,
27
- });
28
- console.log(res);
30
+ // const res = await debtCollectionRateTool({
31
+ // sendMessageToLark: true,
32
+ // companyName: "Tkg",
33
+ // // monthDate: "8/2025",
34
+ // productType: PRODUCT_TYPE.X3_EVF,
35
+ // });
36
+ // console.log(res);
29
37
  // const fieldNames = REPORT_COLUMS.map((item) => item.field_name);
30
38
  // try {
31
39
  // const records = await fetchReportRecords({ view_id: "vewI23hNnx", field_names: fieldNames });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-mcp",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "Mcp server for Gm",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -92,9 +92,14 @@ server.tool(
92
92
 
93
93
  server.tool(
94
94
  "debt_collection",
95
- "The company's debt collection information",
95
+ "The company's debt collection by year (optional) information, if year is not provided use this year (vietname time zone)",
96
96
  {
97
97
  company_name: z.string({ description: "Company name to get data" }),
98
+ year: z
99
+ .string({
100
+ description: "Year of company debt collection, if year is not provided use this year (vietname time zone)",
101
+ })
102
+ .optional(),
98
103
  },
99
104
  async (args) => {
100
105
  const { company_name } = args;
package/src/test.ts CHANGED
@@ -1,4 +1,4 @@
1
- import z from "zod/v3";
1
+ import z from "zod";
2
2
  import { ensureEnvVariables, getEnv } from "./env";
3
3
  import { searchLike } from "./helpers/search-like";
4
4
  import { REPORT_COLUMS } from "./services/constants/report-columns";
@@ -18,18 +18,27 @@ import { PRODUCT_TYPE } from "./services/constants/product-type";
18
18
  async function setupTest() {
19
19
  ensureEnvVariables();
20
20
 
21
+ const res = zodToJsonSchema(
22
+ z.object({
23
+ name: z.string(),
24
+ phone: z.string().optional(),
25
+ })
26
+ );
27
+
28
+ console.log(res);
29
+
21
30
  // const r = await fetchDebtCollectionRecords();
22
31
  // console.log(r.length);
23
32
 
24
33
  // const compnay = "BGG";
25
34
  // const month = "12/2025";
26
- const res = await debtCollectionRateTool({
27
- sendMessageToLark: true,
28
- companyName: "Tkg",
29
- // monthDate: "8/2025",
30
- productType: PRODUCT_TYPE.X3_EVF,
31
- });
32
- console.log(res);
35
+ // const res = await debtCollectionRateTool({
36
+ // sendMessageToLark: true,
37
+ // companyName: "Tkg",
38
+ // // monthDate: "8/2025",
39
+ // productType: PRODUCT_TYPE.X3_EVF,
40
+ // });
41
+ // console.log(res);
33
42
 
34
43
  // const fieldNames = REPORT_COLUMS.map((item) => item.field_name);
35
44
  // try {