@umengfe/mcp-server-chart 0.0.7 → 0.0.9

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.
@@ -35,6 +35,33 @@ export declare const bar: {
35
35
  title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
36
36
  axisXTitle: z.ZodDefault<z.ZodOptional<z.ZodString>>;
37
37
  axisYTitle: z.ZodDefault<z.ZodOptional<z.ZodString>>;
38
+ axis: z.ZodOptional<z.ZodObject<{
39
+ y: z.ZodOptional<z.ZodObject<{
40
+ labelFormatter: z.ZodOptional<z.ZodString>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ labelFormatter?: string | undefined;
43
+ }, {
44
+ labelFormatter?: string | undefined;
45
+ }>>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ y?: {
48
+ labelFormatter?: string | undefined;
49
+ } | undefined;
50
+ }, {
51
+ y?: {
52
+ labelFormatter?: string | undefined;
53
+ } | undefined;
54
+ }>>;
55
+ tooltip: z.ZodOptional<z.ZodObject<{
56
+ channel: z.ZodLiteral<"y">;
57
+ valueFormatter: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ channel: "y";
60
+ valueFormatter?: string | undefined;
61
+ }, {
62
+ channel: "y";
63
+ valueFormatter?: string | undefined;
64
+ }>>;
38
65
  };
39
66
  tool: {
40
67
  name: string;
@@ -40,6 +40,18 @@ const schema = {
40
40
  title: base_1.TitleSchema,
41
41
  axisXTitle: base_1.AxisXTitleSchema,
42
42
  axisYTitle: base_1.AxisYTitleSchema,
43
+ axis: zod_1.z
44
+ .object({
45
+ y: zod_1.z
46
+ .object({
47
+ labelFormatter: base_1.LabelFormatterSchema,
48
+ })
49
+ .optional()
50
+ .describe("Axis configuration for the chart y-axis, optional."),
51
+ })
52
+ .optional()
53
+ .describe("Axis configuration for the chart with a JSON object, optional."),
54
+ tooltip: base_1.TooltipSchema,
43
55
  };
44
56
  // Bar chart tool descriptor
45
57
  const tool = {
@@ -34,12 +34,12 @@ export declare const MapHeightSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
34
  export declare const POIsSchema: z.ZodArray<z.ZodString, "atleastone">;
35
35
  export declare const LabelFormatterSchema: z.ZodOptional<z.ZodString>;
36
36
  export declare const TooltipSchema: z.ZodOptional<z.ZodObject<{
37
- channel: z.ZodDefault<z.ZodString>;
37
+ channel: z.ZodLiteral<"y">;
38
38
  valueFormatter: z.ZodOptional<z.ZodString>;
39
39
  }, "strip", z.ZodTypeAny, {
40
- channel: string;
40
+ channel: "y";
41
41
  valueFormatter?: string | undefined;
42
42
  }, {
43
- channel?: string | undefined;
43
+ channel: "y";
44
44
  valueFormatter?: string | undefined;
45
45
  }>>;
@@ -91,8 +91,8 @@ exports.LabelFormatterSchema = zod_1.z
91
91
  // 帮我添加一个labelFormater的配置项,用于格式化标签, 主要使用d3的format方法,相关知识懂 test.md中获取
92
92
  exports.TooltipSchema = zod_1.z
93
93
  .object({
94
- channel: zod_1.z.string().default("y"),
94
+ channel: zod_1.z.literal("y"),
95
95
  valueFormatter: exports.LabelFormatterSchema,
96
96
  })
97
97
  .optional()
98
- .describe("Set the tooltip for chart , default is y channel. format is {channel: 'y', valueFormatter: 'd3-format syntax'}");
98
+ .describe("设置默认的tooltip,使用d3格式化方式,尤其涉及百分比,千分位,例如: {channel: 'y', valueFormatter: ',.0f'}");
@@ -53,13 +53,13 @@ export declare const column: {
53
53
  } | undefined;
54
54
  }>>;
55
55
  tooltip: z.ZodOptional<z.ZodObject<{
56
- channel: z.ZodDefault<z.ZodString>;
56
+ channel: z.ZodLiteral<"y">;
57
57
  valueFormatter: z.ZodOptional<z.ZodString>;
58
58
  }, "strip", z.ZodTypeAny, {
59
- channel: string;
59
+ channel: "y";
60
60
  valueFormatter?: string | undefined;
61
61
  }, {
62
- channel?: string | undefined;
62
+ channel: "y";
63
63
  valueFormatter?: string | undefined;
64
64
  }>>;
65
65
  };
package/build/server.js CHANGED
@@ -59,7 +59,7 @@ const logger_1 = require("./utils/logger.js");
59
59
  function createServer() {
60
60
  const server = new index_js_1.Server({
61
61
  name: "umeng-mcp-server-chart",
62
- version: "0.0.7",
62
+ version: "0.0.9",
63
63
  description: "本工具返回内容为 Markdown 格式,建议客户端按 Markdown 渲染",
64
64
  }, {
65
65
  capabilities: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@umengfe/mcp-server-chart",
3
3
  "description": "A Model Context Protocol server for generating charts using AntV. This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools.",
4
- "version": "0.0.7",
4
+ "version": "0.0.9",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "exports": {