rfhub-mcp 0.20.0 → 0.22.0

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.
@@ -1,22 +1,24 @@
1
1
  import * as z from "zod/v4";
2
2
  import { executeGetResult } from "../utils/executeGetResult.js";
3
+ export const method = "post";
3
4
  export const name = "arfcn_calculator_4g_compute";
4
5
  export const title = "4G/LTE频点频率转换与对应频带信息";
5
6
  export const description = "支持4G LTE网络中频率与频点之间的相互转换,并附带特定频段的详细信息展示";
7
+ export const tags = [];
6
8
  export const ModeEnum = z.enum(["n", "f"]);
7
9
  export const DirectionEnum = z.enum(["uplink", "downlink"]);
8
10
  export const DuplexModeEnum = z.enum(["TDD", "FDD"]);
9
11
  export const inputSchema = z.object({
10
12
  Mode: ModeEnum.optional().describe("计算模式,例如 n 表示频点模式,f 表示频率模式"),
11
13
  DataTransmissionDirection: DirectionEnum.describe("数据传输方向,可选上行(uplink)、下行(downlink)"),
12
- NREF: z.number().int().optional().describe('频点参考(NREF),例如 504999。用于在频点模式(Mode=`"n"`)下确定中心频率。'),
14
+ NREF: z.number().int().optional().transform(String).describe('频点参考(NREF),例如 504999。用于在频点模式(Mode=`"n"`)下确定中心频率。'),
13
15
  FREF: z.number().optional().describe('频率参考(FREF),单位为 MHz,例如 3500.0。用于在频率模式(Mode=`"f"`)下直接指定中心频率。'),
14
16
  Band: z.string().optional().describe('频段标识符,例如 "b3"、"b41" 等'),
15
17
  Bandwidth: z.number().positive().optional().describe("信道带宽,单位为 MHz,例如 100 表示 100MHz"),
16
18
  });
17
19
  export const outputSchema = z.object({
18
- Mode: ModeEnum.nullable().optional(),
19
- Mode_Error: z.string().nullable().optional(),
20
+ Mode: ModeEnum.nullable().optional().describe("计算模式,例如 n 表示频点模式,f 表示频率模式"),
21
+ Mode_Error: z.string().nullable().optional().describe("计算模式错误信息"),
20
22
  DataTransmissionDirection: DirectionEnum.nullable().optional(),
21
23
  DataTransmissionDirection_Error: z.string().nullable().optional(),
22
24
  NREF: z.number().int().nullable().optional(),
@@ -77,7 +79,8 @@ export const execute = async (input, getResult) => {
77
79
  FERF: input.FREF?.toString() ?? null,
78
80
  Bandwidth: input.Bandwidth?.toString() ?? null,
79
81
  };
80
- const result = await executeGetResult(getResult, "/api/arfcn-calculator-4g/compute", apiRequest);
82
+ const a = inputSchema.parse(input);
83
+ const result = await executeGetResult(getResult, "/api/arfcn-calculator-4g/compute", input);
81
84
  const apiResult = apiResultSchema.parse(result);
82
85
  // 构建结果对象
83
86
  const structuredContent = {
@@ -1,8 +1,10 @@
1
1
  import * as z from "zod/v4";
2
2
  import { executeGetResult } from "../utils/executeGetResult.js";
3
+ export const method = "post";
3
4
  export const name = "arfcn_calculator_5g_compute";
4
5
  export const title = "5G/NR频点频率转换与对应频带信息";
5
6
  export const description = "支持5G NR网络中频率与频点之间的相互转换,并附带特定频段的详细信息展示";
7
+ export const tags = [];
6
8
  export const ModeEnum = z.enum(["n", "f"]);
7
9
  export const DirectionEnum = z.enum(["uplink", "downlink"]);
8
10
  export const DuplexModeEnum = z.enum(["TDD", "FDD"]);
@@ -1,8 +1,10 @@
1
1
  import * as z from "zod/v4";
2
2
  import { executeGetResult } from "../utils/executeGetResult.js";
3
+ export const method = "post";
3
4
  export const name = "arfcn_calculator_ntn_compute";
4
5
  export const title = "5G/NTN频点频率转换与对应频带信息";
5
6
  export const description = "支持5G NTN网络中频率与频点之间的相互转换,并附带特定频段的详细信息展示";
7
+ export const tags = [];
6
8
  export const ModeEnum = z.enum(["n", "f"]);
7
9
  export const DirectionEnum = z.enum(["uplink", "downlink"]);
8
10
  export const DuplexModeEnum = z.enum(["TDD", "FDD"]);
@@ -1,8 +1,10 @@
1
1
  import * as z from "zod/v4";
2
2
  import type { GetResult } from "../types/tool.js";
3
+ export declare const method = "post";
3
4
  export declare const name = "arfcn_calculator_4g_compute";
4
5
  export declare const title = "4G/LTE\u9891\u70B9\u9891\u7387\u8F6C\u6362\u4E0E\u5BF9\u5E94\u9891\u5E26\u4FE1\u606F";
5
6
  export declare const description = "\u652F\u63014G LTE\u7F51\u7EDC\u4E2D\u9891\u7387\u4E0E\u9891\u70B9\u4E4B\u95F4\u7684\u76F8\u4E92\u8F6C\u6362\uFF0C\u5E76\u9644\u5E26\u7279\u5B9A\u9891\u6BB5\u7684\u8BE6\u7EC6\u4FE1\u606F\u5C55\u793A";
7
+ export declare const tags: never[];
6
8
  export declare const ModeEnum: z.ZodEnum<{
7
9
  n: "n";
8
10
  f: "f";
@@ -24,7 +26,7 @@ export declare const inputSchema: z.ZodObject<{
24
26
  uplink: "uplink";
25
27
  downlink: "downlink";
26
28
  }>;
27
- NREF: z.ZodOptional<z.ZodNumber>;
29
+ NREF: z.ZodPipe<z.ZodOptional<z.ZodNumber>, z.ZodTransform<string, number | undefined>>;
28
30
  FREF: z.ZodOptional<z.ZodNumber>;
29
31
  Band: z.ZodOptional<z.ZodString>;
30
32
  Bandwidth: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"arfcn-calculator-4g-compute.d.ts","sourceRoot":"","sources":["../../../src/tools/arfcn-calculator-4g-compute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,IAAI,gCAAgC,CAAC;AAClD,eAAO,MAAM,KAAK,yFAAwB,CAAC;AAC3C,eAAO,MAAM,WAAW,2MAA2C,CAAC;AAEpE,eAAO,MAAM,QAAQ;;;EAAqB,CAAC;AAC3C,eAAO,MAAM,aAAa;;;EAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;EAAyB,CAAC;AAErD,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAOtB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BvB,CAAC;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B1B,CAAC;AAEH,eAAO,MAAM,OAAO,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDrF,CAAC"}
1
+ {"version":3,"file":"arfcn-calculator-4g-compute.d.ts","sourceRoot":"","sources":["../../../src/tools/arfcn-calculator-4g-compute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,eAAO,MAAM,IAAI,gCAAgC,CAAC;AAClD,eAAO,MAAM,KAAK,yFAAwB,CAAC;AAC3C,eAAO,MAAM,WAAW,2MAA2C,CAAC;AACpE,eAAO,MAAM,IAAI,SAAK,CAAC;AAEvB,eAAO,MAAM,QAAQ;;;EAAqB,CAAC;AAC3C,eAAO,MAAM,aAAa;;;EAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;EAAyB,CAAC;AAErD,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAOtB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BvB,CAAC;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B1B,CAAC;AAEH,eAAO,MAAM,OAAO,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDrF,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import * as z from "zod/v4";
2
2
  import type { GetResult } from "../types/tool.js";
3
+ export declare const method = "post";
3
4
  export declare const name = "arfcn_calculator_5g_compute";
4
5
  export declare const title = "5G/NR\u9891\u70B9\u9891\u7387\u8F6C\u6362\u4E0E\u5BF9\u5E94\u9891\u5E26\u4FE1\u606F";
5
6
  export declare const description = "\u652F\u63015G NR\u7F51\u7EDC\u4E2D\u9891\u7387\u4E0E\u9891\u70B9\u4E4B\u95F4\u7684\u76F8\u4E92\u8F6C\u6362\uFF0C\u5E76\u9644\u5E26\u7279\u5B9A\u9891\u6BB5\u7684\u8BE6\u7EC6\u4FE1\u606F\u5C55\u793A";
7
+ export declare const tags: never[];
6
8
  export declare const ModeEnum: z.ZodEnum<{
7
9
  n: "n";
8
10
  f: "f";
@@ -1 +1 @@
1
- {"version":3,"file":"arfcn-calculator-5g-compute.d.ts","sourceRoot":"","sources":["../../../src/tools/arfcn-calculator-5g-compute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,IAAI,gCAAgC,CAAC;AAClD,eAAO,MAAM,KAAK,wFAAuB,CAAC;AAC1C,eAAO,MAAM,WAAW,0MAA0C,CAAC;AAEnE,eAAO,MAAM,QAAQ;;;EAAqB,CAAC;AAC3C,eAAO,MAAM,aAAa;;;EAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;EAAyB,CAAC;AAErD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;iBA4BtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+DvB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+D1B,CAAC;AAEH,eAAO,MAAM,OAAO,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrF,CAAC"}
1
+ {"version":3,"file":"arfcn-calculator-5g-compute.d.ts","sourceRoot":"","sources":["../../../src/tools/arfcn-calculator-5g-compute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,eAAO,MAAM,IAAI,gCAAgC,CAAC;AAClD,eAAO,MAAM,KAAK,wFAAuB,CAAC;AAC1C,eAAO,MAAM,WAAW,0MAA0C,CAAC;AACnE,eAAO,MAAM,IAAI,SAAK,CAAC;AAEvB,eAAO,MAAM,QAAQ;;;EAAqB,CAAC;AAC3C,eAAO,MAAM,aAAa;;;EAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;EAAyB,CAAC;AAErD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;iBA4BtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+DvB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+D1B,CAAC;AAEH,eAAO,MAAM,OAAO,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrF,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import * as z from "zod/v4";
2
2
  import type { GetResult } from "../types/tool.js";
3
+ export declare const method = "post";
3
4
  export declare const name = "arfcn_calculator_ntn_compute";
4
5
  export declare const title = "5G/NTN\u9891\u70B9\u9891\u7387\u8F6C\u6362\u4E0E\u5BF9\u5E94\u9891\u5E26\u4FE1\u606F";
5
6
  export declare const description = "\u652F\u63015G NTN\u7F51\u7EDC\u4E2D\u9891\u7387\u4E0E\u9891\u70B9\u4E4B\u95F4\u7684\u76F8\u4E92\u8F6C\u6362\uFF0C\u5E76\u9644\u5E26\u7279\u5B9A\u9891\u6BB5\u7684\u8BE6\u7EC6\u4FE1\u606F\u5C55\u793A";
7
+ export declare const tags: never[];
6
8
  export declare const ModeEnum: z.ZodEnum<{
7
9
  n: "n";
8
10
  f: "f";
@@ -1 +1 @@
1
- {"version":3,"file":"arfcn-calculator-ntn-compute.d.ts","sourceRoot":"","sources":["../../../src/tools/arfcn-calculator-ntn-compute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,IAAI,iCAAiC,CAAC;AACnD,eAAO,MAAM,KAAK,yFAAwB,CAAC;AAC3C,eAAO,MAAM,WAAW,2MAA2C,CAAC;AAEpE,eAAO,MAAM,QAAQ;;;EAAqB,CAAC;AAC3C,eAAO,MAAM,aAAa;;;EAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;EAAyB,CAAC;AAErD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;iBA4BtB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+DvB,CAAC;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+D1B,CAAC;AAEH,eAAO,MAAM,OAAO,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrF,CAAC"}
1
+ {"version":3,"file":"arfcn-calculator-ntn-compute.d.ts","sourceRoot":"","sources":["../../../src/tools/arfcn-calculator-ntn-compute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,eAAO,MAAM,IAAI,iCAAiC,CAAC;AACnD,eAAO,MAAM,KAAK,yFAAwB,CAAC;AAC3C,eAAO,MAAM,WAAW,2MAA2C,CAAC;AACpE,eAAO,MAAM,IAAI,SAAK,CAAC;AAEvB,eAAO,MAAM,QAAQ;;;EAAqB,CAAC;AAC3C,eAAO,MAAM,aAAa;;;EAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;EAAyB,CAAC;AAErD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;iBA4BtB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+DvB,CAAC;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+D1B,CAAC;AAEH,eAAO,MAAM,OAAO,GAAU,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAAE,WAAW,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrF,CAAC"}
@@ -3,9 +3,11 @@ export type SafeApiPost = (endpoint: string, data: any) => Promise<object | null
3
3
  export type InternalCompute = (data: any) => object | null;
4
4
  export type GetResult = SafeApiPost | InternalCompute;
5
5
  export type CustomTool = {
6
+ method: string;
6
7
  name: string;
7
8
  title: string;
8
9
  description: string;
10
+ tags: string[];
9
11
  inputSchema: z.ZodSchema<any>;
10
12
  outputSchema: z.ZodSchema<any>;
11
13
  execute: (input: z.infer<z.ZodSchema<any>>, safeApiPost: GetResult) => Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAClF,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;AAC3D,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9B,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACrF,CAAC"}
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAClF,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;AAC3D,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9B,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACrF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rfhub-mcp",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "title": "RFHub MCP Server",
5
5
  "description": "RFHub MCP Server",
6
6
  "websiteUrl": "https://rfhub.cn/mcp-server",