Skip to main content
Glama

Interactive ECharts

echarts

Render an interactive Apache ECharts chart from a standard ECharts option JSON object. Supports line, bar (incl. stacked & dual-axis mixed), pie, radar, scatter, funnel, gauge, sankey, graph and more — chosen via series[].type. Use this whenever a user would benefit from a chart or data visualization instead of raw numbers. The option field description contains ready-to-copy JSON templates for every common chart type — follow those shapes and fill in the user's real data. Inputs: option (required ECharts option object), optional title, subtitle, insights (one-line takeaway under the chart). When enableInteractivity is true (default), clicking a data point sends a follow-up message to the conversation for drill-down. Output valid JSON only (no comments, no functions).

Input Schema

NameRequiredDescriptionDefault
titleNoCard title shown above the chart.
localeNoUI language for the rendered card.en
optionYesA valid Apache ECharts option object. Generate it from the user's data. Type templates (copy the shape, fill in real data): Valid JSON only: no comments, no trailing commas, no functions. Always include "series": [{ "type": ..., "data": [...] }]. line: {"tooltip":{"trigger":"axis"},"xAxis":{"type":"category","data":["Mon","Tue","Wed"]},"yAxis":{"type":"value"},"series":[{"type":"line","smooth":true,"data":[120,200,150]}]} bar: same axis shape as line, then {"series":[{"type":"bar","data":[5,9,7]}]} stacked bar: series:[{type:"bar",stack:"t",data:[..]},{type:"bar",stack:"t",data:[..]}] mixed (bar+line, dual axis): {"xAxis":{"type":"category","data":[..]},"yAxis":[{"type":"value"},{"type":"value"}],"series":[{"type":"bar","yAxisIndex":0,"data":[..]},{"type":"line","yAxisIndex":1,"data":[..]}]} pie: {"tooltip":{"trigger":"item"},"series":[{"type":"pie","radius":["40%","70%"],"data":[{"name":"A","value":10},{"name":"B","value":20}]}]} radar: {"tooltip":{},"radar":{"indicator":[{"name":"Speed","max":100},{"name":"Cost","max":100},{"name":"Quality","max":100}]},"series":[{"type":"radar","data":[{"name":"Model A","value":[80,40,70]},{"name":"Model B","value":[60,70,85]}]}]} scatter:{"xAxis":{"type":"value"},"yAxis":{"type":"value"},"series":[{"type":"scatter","symbolSize":8,"data":[[10,20],[15,25],[30,12]]}]} sankey: {"tooltip":{"trigger":"item"},"series":[{"type":"sankey","data":[{"name":"A"},{"name":"B"},{"name":"C"}],"links":[{"source":"A","target":"B","value":5},{"source":"B","target":"C","value":3}]}]} funnel: {"tooltip":{"trigger":"item"},"series":[{"type":"funnel","data":[{"name":"Visit","value":100},{"name":"Signup","value":45},{"name":"Buy","value":12}]}]} gauge: {"series":[{"type":"gauge","min":0,"max":100,"data":[{"value":72,"name":"Score"}]}]} Supported series types: line, bar, pie, radar, scatter, sankey, funnel, gauge. Any other type will not render. Notes: category x-axis needs "data": [...]; pie/radar/sankey/funnel/gauge need no xAxis/yAxis. Keep series[].data as a plain array; use objects only for pie/funnel/radar named items. Dark theme, axis colors, legend and tooltip styling are auto-applied — omit styling unless needed.
insightsNoA one-line AI takeaway rendered under the chart.
subtitleNoSmall subtitle under the title.
enableInteractivityNoWhen true, clicking a data point sends it back to the conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / option / description
      Previous value: -"A valid Apache ECharts option object. Generate it from the user's data. Type templates (copy the shape, fill in real data):\nValid JSON only: no comments, no trailing commas, no functions.\nAlways include \"series\": [{ \"type\": ..., \"data\": [...] }].\n\nline:   {\"tooltip\":{\"trigger\":\"axis\"},\"xAxis\":{\"type\":\"category\",\"data\":[\"Mon\",\"Tue\",\"Wed\"]},\"yAxis\":{\"type\":\"value\"},\"series\":[{\"type\":\"line\",\"smooth\":true,\"data\":[120,200,150]}]}\nbar:    same axis shape as line, then {\"series\":[{\"type\":\"bar\",\"data\":[5,9,7]}]}\nstacked bar: series:[{type:\"bar\",stack:\"t\",data:[..]},{type:\"bar\",stack:\"t\",data:[..]}]\nmixed (bar+line, dual axis): {\"xAxis\":{\"type\":\"category\",\"data\":[..]},\"yAxis\":[{\"type\":\"value\"},{\"type\":\"value\"}],\"series\":[{\"type\":\"bar\",\"yAxisIndex\":0,\"data\":[..]},{\"type\":\"line\",\"yAxisIndex\":1,\"data\":[..]}]}\npie:    {\"tooltip\":{\"trigger\":\"item\"},\"series\":[{\"type\":\"pie\",\"radius\":[\"40%\",\"70%\"],\"data\":[{\"name\":\"A\",\"value\":10},{\"name\":\"B\",\"value\":20}]}]}\nradar:  {\"tooltip\":{},\"radar\":{\"indicator\":[{\"name\":\"Speed\",\"max\":100},{\"name\":\"Cost\",\"max\":100},{\"name\":\"Quality\",\"max\":100}]},\"series\":[{\"type\":\"radar\",\"data\":[{\"name\":\"Model A\",\"value\":[80,40,70]},{\"name\":\"Model B\",\"value\":[60,70,85]}]}]}\nscatter:{\"xAxis\":{\"type\":\"value\"},\"yAxis\":{\"type\":\"value\"},\"series\":[{\"type\":\"scatter\",\"symbolSize\":8,\"data\":[[10,20],[15,25],[30,12]]}]}\nsankey: {\"tooltip\":{\"trigger\":\"item\"},\"series\":[{\"type\":\"sankey\",\"data\":[{\"name\":\"A\"},{\"name\":\"B\"},{\"name\":\"C\"}],\"links\":[{\"source\":\"A\",\"target\":\"B\",\"value\":5},{\"source\":\"B\",\"target\":\"C\",\"value\":3}]}]}\nfunnel: {\"tooltip\":{\"trigger\":\"item\"},\"series\":[{\"type\":\"funnel\",\"data\":[{\"name\":\"Visit\",\"value\":100},{\"name\":\"Signup\",\"value\":45},{\"name\":\"Buy\",\"value\":12}]}]}\ngauge:  {\"series\":[{\"type\":\"gauge\",\"min\":0,\"max\":100,\"data\":[{\"value\":72,\"name\":\"Score\"}]}]}\n\nNotes: category x-axis needs \"data\": [...]; pie/radar/sankey/funnel/gauge need no xAxis/yAxis.\nKeep series[].data as a plain array; use objects only for pie/funnel/radar named items.\nDark theme, axis colors, legend and tooltip styling are auto-applied — omit styling unless needed."New value: +"A valid Apache ECharts option object. Generate it from the user's data. Type templates (copy the shape, fill in real data):\nValid JSON only: no comments, no trailing commas, no functions.\nAlways include \"series\": [{ \"type\": ..., \"data\": [...] }].\n\nline:   {\"tooltip\":{\"trigger\":\"axis\"},\"xAxis\":{\"type\":\"category\",\"data\":[\"Mon\",\"Tue\",\"Wed\"]},\"yAxis\":{\"type\":\"value\"},\"series\":[{\"type\":\"line\",\"smooth\":true,\"data\":[120,200,150]}]}\nbar:    same axis shape as line, then {\"series\":[{\"type\":\"bar\",\"data\":[5,9,7]}]}\nstacked bar: series:[{type:\"bar\",stack:\"t\",data:[..]},{type:\"bar\",stack:\"t\",data:[..]}]\nmixed (bar+line, dual axis): {\"xAxis\":{\"type\":\"category\",\"data\":[..]},\"yAxis\":[{\"type\":\"value\"},{\"type\":\"value\"}],\"series\":[{\"type\":\"bar\",\"yAxisIndex\":0,\"data\":[..]},{\"type\":\"line\",\"yAxisIndex\":1,\"data\":[..]}]}\npie:    {\"tooltip\":{\"trigger\":\"item\"},\"series\":[{\"type\":\"pie\",\"radius\":[\"40%\",\"70%\"],\"data\":[{\"name\":\"A\",\"value\":10},{\"name\":\"B\",\"value\":20}]}]}\nradar:  {\"tooltip\":{},\"radar\":{\"indicator\":[{\"name\":\"Speed\",\"max\":100},{\"name\":\"Cost\",\"max\":100},{\"name\":\"Quality\",\"max\":100}]},\"series\":[{\"type\":\"radar\",\"data\":[{\"name\":\"Model A\",\"value\":[80,40,70]},{\"name\":\"Model B\",\"value\":[60,70,85]}]}]}\nscatter:{\"xAxis\":{\"type\":\"value\"},\"yAxis\":{\"type\":\"value\"},\"series\":[{\"type\":\"scatter\",\"symbolSize\":8,\"data\":[[10,20],[15,25],[30,12]]}]}\nsankey: {\"tooltip\":{\"trigger\":\"item\"},\"series\":[{\"type\":\"sankey\",\"data\":[{\"name\":\"A\"},{\"name\":\"B\"},{\"name\":\"C\"}],\"links\":[{\"source\":\"A\",\"target\":\"B\",\"value\":5},{\"source\":\"B\",\"target\":\"C\",\"value\":3}]}]}\nfunnel: {\"tooltip\":{\"trigger\":\"item\"},\"series\":[{\"type\":\"funnel\",\"data\":[{\"name\":\"Visit\",\"value\":100},{\"name\":\"Signup\",\"value\":45},{\"name\":\"Buy\",\"value\":12}]}]}\ngauge:  {\"series\":[{\"type\":\"gauge\",\"min\":0,\"max\":100,\"data\":[{\"value\":72,\"name\":\"Score\"}]}]}\n\nSupported series types: line, bar, pie, radar, scatter, sankey, funnel, gauge. Any other type will not render.\nNotes: category x-axis needs \"data\": [...]; pie/radar/sankey/funnel/gauge need no xAxis/yAxis.\nKeep series[].data as a plain array; use objects only for pie/funnel/radar named items.\nDark theme, axis colors, legend and tooltip styling are auto-applied — omit styling unless needed."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the default-on click drill-down follow-up message, that unsupported series types will silently not render, and that JSON must be valid with no functions. It omits render limits or failure/error behavior, keeping it below a 5.

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

Conciseness4/5

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

Front-loaded with the core action, then supported types, usage rationale, inputs, and behavioral notes in a logical order. The sentence listing inputs partly repeats the schema but is short enough not to waste space.

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?

For a complex nested-parameter tool with no output schema, the description covers what goes in, how chart type is chosen, interactivity behavior, and output constraints ('valid JSON only'). Nothing an agent needs to call it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real value beyond the schema: it explains that chart type is selected via series[].type, that the option field holds copyable templates, and what enableInteractivity triggers. It still doesn't clarify locale or title/subtitle precedence beyond the schema.

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?

States a specific verb and resource — 'Render an interactive Apache ECharts chart from a standard ECharts option JSON object' — and enumerates supported chart types. It is clearly distinguishable from siblings like csv-chart, bit-visualizer, and function-grapher.

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

Usage Guidelines4/5

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

'Use this whenever a user would benefit from a chart or data visualization instead of raw numbers' gives a clear trigger condition. It does not explicitly exclude or route against the nearest alternative (csv-chart for CSV data), so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources