Skip to main content
Glama

vchart-mcp-server

by VisActor
ranking_bar.ts2.18 kB
import { z } from "zod"; import { convertZodToJsonSchema } from "../utils/schema"; import { BackgroundSchema, ChartOutputSchema, ColorFieldSchema, ColorsSchema, HeightSchema, StackSchema, ThemeSchema, TitleOrientSchema, TitleSubTextSchema, TitleTextSchema, WidthSchema, XAxisHasGridSchema, XAxisHasLabelSchema, XAxisHasTickSchema, XAxisOrientSchema, XAxisTitleSchema, XAxisTypeSchema, XFieldSchema, YAxisHasGridSchema, YAxisHasLabelSchema, YAxisHasTickSchema, YAxisOrientSchema, YAxisTitleSchema, YAxisTypeSchema, YFieldSchema, } from "./common"; const schema = z.object({ output: ChartOutputSchema, width: WidthSchema, height: HeightSchema, dataTable: z .array(z.any()) .describe("Bar chart data, e.g., [{ category: 'category 01', value: 10 }].") .nonempty({ message: "Bar chart data must not be empty." }), xField: XFieldSchema, yField: YFieldSchema, colorField: ColorFieldSchema, timeField: z .string() .nonempty() .describe( "Time field, such as year or month. The x field and time field must be different." ), chartTheme: ThemeSchema, title: TitleTextSchema, subTitle: TitleSubTextSchema, titleOrient: TitleOrientSchema, xAxisType: XAxisTypeSchema, xAxisOrient: XAxisOrientSchema, xAxisTitle: XAxisTitleSchema, xAxisHasGrid: XAxisHasGridSchema, xAxisHasLabel: XAxisHasLabelSchema, xAxisHasTick: XAxisHasTickSchema, yAxisType: YAxisTypeSchema, yAxisOrient: YAxisOrientSchema, yAxisTitle: YAxisTitleSchema, yAxisHasGrid: YAxisHasGridSchema, yAxisHasLabel: YAxisHasLabelSchema, yAxisHasTick: YAxisHasTickSchema, background: BackgroundSchema, colors: ColorsSchema, stackOrPercent: StackSchema, }); const tool = { name: "generate_dynamic_bar_chart", description: "Generates a dynamic bar chart which is suitable for displaying changing data and can be used to show ranking, comparisons or data changes over time. The x field and the time field MUST be different. It updates the data dynamically according to the time field.", inputSchema: convertZodToJsonSchema(schema), }; export const ranking_bar = { 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