Skip to main content
Glama

vchart-mcp-server

by VisActor
hierarchical.ts1.3 kB
import { z } from "zod"; import { convertZodToJsonSchema } from "../utils/schema"; import { BackgroundSchema, ChartOutputSchema, ColorsSchema, HeightSchema, ThemeSchema, TitleOrientSchema, TitleSubTextSchema, TitleTextSchema, WidthSchema, XFieldSchema, YFieldSchema, } from "./common"; const schema = z.object({ output: ChartOutputSchema, chartType: z .enum(["sunburst", "treemap", "circle_packing"]) .describe("Chart type"), width: WidthSchema, height: HeightSchema, dataTable: z .array(z.any()) .describe( "Hierarchical data for the chart, e.g., [{ category: 'Category 0', subCategory: 'Category 01', value: 10}]." ) .nonempty({ message: "Data cannot be empty." }), colorField: z.array(XFieldSchema).nonempty(), valueField: YFieldSchema, chartTheme: ThemeSchema, title: TitleTextSchema, subTitle: TitleSubTextSchema, titleOrient: TitleOrientSchema, background: BackgroundSchema, colors: ColorsSchema, }); const tool = { name: "generate_hierarchical_chart", description: "Generate a chart for hierarchical visualization of multi-level categorical data proportions, include sunburst, treemap, circle_packing.", inputSchema: convertZodToJsonSchema(schema), }; export const sunburst = { schema, tool, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VisActor/vchart-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server