Skip to main content
Glama

Render ECharts

render_echart

Renders ECharts options server-side to produce SVG, PNG, or self-contained HTML, enabling chart generation without a browser.

Instructions

Renders an Apache ECharts visualization server-side (no browser). Returns image (base64 PNG), SVG text, and/or self-contained interactive HTML, selectable via the formats list. PNG requires the optional @napi-rs/canvas dep. For chat-platform targets (Slack/Discord/Telegram), use exportToUrl (needs hosting config).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
themeNoBuilt-in theme name (e.g. 'light', 'dark') or an inline theme JSON object.light
widthNoRender width in pixels (logical/CSS px).
heightNoRender height in pixels (logical/CSS px).
optionYesStandard Apache ECharts option object (full passthrough to echarts v6).
formatsNoOutput formats to produce in one call: 'svg' (text block with raw SVG), 'png' (image block with base64 PNG; requires optional @napi-rs/canvas), 'html' (text block with a self-contained interactive static HTML page).
animationNoWhether to emit animated output. Disabled by default for deterministic output.
backgroundNoBackground color for the chart (e.g. '#ffffff' or 'transparent').transparent
exportToUrlNoWhen true and chart hosting is configured, also persist the chart and return its public HTTPS URL (for Slack/Discord/Telegram targets).
devicePixelRatioNoDPI multiplier for raster/PNG output.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
svgNo
urlNo
htmlNo
themeYesTheme name used ('inline' when a theme object was supplied).
widthYes
heightYes
formatsYes
versionYesPinned echarts runtime version.
warningNo
pngBytesNo
backgroundYes
pngMimeTypeNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed25 schema fields changedv1.0.0
    • changedInput schema / properties / animation / description
      Previous value: -"Whether to emit an animated SVG. Disabled by default for deterministic output."New value: +"Whether to emit animated output. Disabled by default for deterministic output."
    • changedInput schema / properties / devicePixelRatio / description
      Previous value: -"DPI multiplier (raster only)."New value: +"DPI multiplier for raster/PNG output."
    • removedInput schema / properties / devicePixelRatio / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / devicePixelRatio / maximum
      Added value: +3
    • addedInput schema / properties / devicePixelRatio / minimum
      Added value: +1
    • addedInput schema / properties / exportToUrl
      Added value: +{
      +  "default": false,
      +  "description": "When true and chart hosting is configured, also persist the chart and return its public HTTPS URL (for Slack/Discord/Telegram targets).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / formats
      Added value: +{
      +  "default": [
      +    "svg"
      +  ],
      +  "description": "Output formats to produce in one call: 'svg' (text block with raw SVG), 'png' (image block with base64 PNG; requires optional @napi-rs/canvas), 'html' (text block with a self-contained interactive static HTML page).",
      +  "items": {
      +    "enum": [
      +      "svg",
      +      "png",
      +      "html"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 3,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / height / description
      Previous value: -"Render height in pixels."New value: +"Render height in pixels (logical/CSS px)."
    • removedInput schema / properties / height / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / height / maximum
      Previous value: -9007199254740991New value: +4096
    • addedInput schema / properties / height / minimum
      Added value: +100
    • removedInput schema / properties / renderer
      Removed value: -{
      -  "default": "svg",
      -  "description": "Output mode: 'svg' (vector, available now) or 'canvas'/'dual' (raster PNG, ships in v1.1).",
      -  "enum": [
      -    "svg",
      -    "canvas",
      -    "dual"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / width / description
      Previous value: -"Render width in pixels."New value: +"Render width in pixels (logical/CSS px)."
    • removedInput schema / properties / width / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / width / maximum
      Previous value: -9007199254740991New value: +4096
    • addedInput schema / properties / width / minimum
      Added value: +100
    • addedOutput schema / properties / formats
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / html
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / pngBytes
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / pngMimeType
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / renderer
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / svg / description
      Removed value: -"Raw SVG source of the rendered chart."
    • addedOutput schema / properties / url
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / warning
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "svg",
      -  "width",
      -  "height",
      -  "renderer",
      -  "theme",
      -  "background",
      -  "version"
      -]New value: +[
      +  "formats",
      +  "width",
      +  "height",
      +  "theme",
      +  "background",
      +  "version"
      +]
  2. First observedv0.1.2

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so description carries the load. It discloses the server-side behavior, output options, optional dependency for PNG, and the exportToUrl alternative. It doesn't mention failure modes or performance characteristics, but given the context, that's acceptable. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, informative three sentences. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given complexity (rendering, formats, dependency), description covers key aspects: server-side, output types, dependency requirement, and alternative for chat platforms. Output schema exists, so return values are covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all 9 parameters with descriptions (100% coverage). The description adds the dependency caveat for PNG and the chat-platform alternative, which are beyond schema. So it adds value above the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool renders Apache ECharts visualizations server-side outputting PNG/SVG/HTML formats. It distinguishes itself from sibling tools like validate_echart_option (validation) and listing chart types by focusing on rendering.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use exportToUrl for chat platforms (Slack/Discord/Telegram) as an alternative, which is a clear usage guideline. It also notes the requirement for hosting configuration, giving strong contextual guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/ryuk3nd0/echarts-mcp'

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