Skip to main content
Glama

MCP Server Chart

Official
network-graph.ts1.33 kB
import { z } from "zod"; import { zodToJsonSchema } from "../utils"; import { validatedNodeEdgeDataSchema } from "../utils/validator"; import { EdgeSchema, HeightSchema, NodeSchema, TextureSchema, ThemeSchema, WidthSchema, } from "./base"; // Network graph input schema const schema = { data: z .object({ nodes: z .array(NodeSchema) .nonempty({ message: "At least one node is required." }), edges: z.array(EdgeSchema), }) .describe( "Data for network graph chart, such as, { nodes: [{ name: 'node1' }, { name: 'node2' }], edges: [{ source: 'node1', target: 'node2', name: 'edge1' }] }", ) .refine(validatedNodeEdgeDataSchema, { message: "Invalid parameters", path: ["data", "edges"], }), style: z .object({ texture: TextureSchema, }) .optional() .describe("Custom style configuration for the chart."), theme: ThemeSchema, width: WidthSchema, height: HeightSchema, }; // Network graph tool descriptor const tool = { name: "generate_network_graph", description: "Generate a network graph chart to show relationships (edges) between entities (nodes), such as, relationships between people in social networks.", inputSchema: zodToJsonSchema(schema), }; export const networkGraph = { schema, tool, };

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/antvis/mcp-server-chart'

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