Skip to main content
Glama

render

Convert EN dependency graph source code into publication-quality SVG images for system documentation and analysis.

Instructions

Render an EN dependency graph as a publication-quality SVG image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesEN source code describing the system
themeNoColor theme for the rendered image
qualityNoOutput quality / resolution

Implementation Reference

  • The handler function for the "render" tool which calls the external EN API.
    async ({ source, theme, quality }) => {
      const result = await callApi("render", { source, theme, quality });
      return {
        content: [{ type: "text" as const, text: result.text }],
        isError: result.isError,
      };
    }
  • Input schema for the "render" tool using zod validation.
    {
      source: z.string().describe("EN source code describing the system"),
      theme: z
        .enum(["dark", "light"])
        .optional()
        .describe("Color theme for the rendered image"),
      quality: z
        .enum(["small", "mid", "max"])
        .optional()
        .describe("Output quality / resolution"),
    },
  • src/index.ts:76-97 (registration)
    Tool registration for "render" using the McpServer instance.
    server.tool(
      "render",
      "Render an EN dependency graph as a publication-quality SVG image.",
      {
        source: z.string().describe("EN source code describing the system"),
        theme: z
          .enum(["dark", "light"])
          .optional()
          .describe("Color theme for the rendered image"),
        quality: z
          .enum(["small", "mid", "max"])
          .optional()
          .describe("Output quality / resolution"),
      },
      async ({ source, theme, quality }) => {
        const result = await callApi("render", { source, theme, quality });
        return {
          content: [{ type: "text" as const, text: result.text }],
          isError: result.isError,
        };
      }
    );

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/dushyant30suthar/endiagram-mcp'

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