MCP developer reference

Four renderers. One optional guide.

Tool inputs are declarative and validated. Raw ECharts options, arbitrary JavaScript, external assets, and unrestricted HTML are intentionally not part of V1.

One quantitative visual → render_chart. One structured explanation → render_diagram. One exploratory network → render_network. Several coordinated pieces of evidence → render_infographic.

Explore eight composition examples with full JSON and prompts. Composition blocks retain the existing child specs. Use unique id values and kind for each block; connectors reference those IDs.

get_visual_guidance

Use this read-only helper when the model needs current deployment capabilities, selection guidance, or valid example inputs. Pass task as chart, diagram, network, infographic, or all. It does not render or fetch evidence. Clear requests can go directly to a renderer.

The same deployment-aware guide is available as the MCP resource vslz://guidance/visual-tools. Connection instructions explain when a visual helps, how to preserve evidence, and how to repair validation errors. Examples contain synthetic data and must be adapted to the user's evidence.

render_chart

Use for quantitative stories: ranking, comparison, trends, composition, contribution, before/after, ranges, and relationships. Include dataContext.unit and dataContext.period when known; use options.percent, options.currency, and options.compactNumbers so axes, labels, and hover values stay interpretable.

{
  "type": "bar",
  "insight": "Enterprise is the growth engine",
  "title": "Net retention by segment",
  "data": [
    { "segment": "Enterprise", "retention": 1.18 },
    { "segment": "SMB", "retention": 0.96 }
  ],
  "encoding": { "category": "segment", "value": "retention" },
  "dataContext": { "unit": "percent", "period": "FY2025" },
  "options": { "percent": true, "showValues": true }
}

Chart selection and input guide

Choose the reader job first, then provide the encoding and context that make the measurement unambiguous. Values must be expressed in the declared unit. For scatter and bubble charts, use dataContext.units when x, y, size, start, or end do not share one unit.

TypeUse it forRequired shapeImportant rule
barcompare or rank categoriescategory + valueUse one measure and sort ranked results. For signed values, send the real negative numbers; the renderer preserves both sides of zero and positions negative labels outside the bar.
grouped_barcompare multiple series for each categorycategory + series + valueKeep all series in the same unit and use only a few series. Signed values are supported; do not replace negatives with absolute values.
stacked_barshow composition and total changecategory + series + valueParts must share a unit; signed segments are allowed only when a zero-centered composition is meaningful.
stacked_100compare composition as sharescategory + series + valueEach category must sum to 1 or 100 and every segment must be non-negative; use a signed variance chart for negative deltas.
linetrack a measure over ordered timex + y, optional seriesProvide dataContext.period and the y-measure unit; keep x values ordered and comparable. Negative measures remain below a visible zero baseline.
areashow cumulative movement or a filled trendx + y, optional seriesUse when the filled magnitude adds meaning; do not use area to imply composition unless the stack is explicit. Signed values are rendered around zero.
slopeshow movement between exactly two periodscategory + series(period) + valueProvide two named periods, one value per category-period pair, and one shared unit; negative endpoints are valid and stay on the correct side of zero.
waterfallexplain change drivers from a start to an endcategory + value, with explicit start/end totalsSend explicit first and last totals; driver values must reconcile arithmetically and use one unit. Do not send only a headline total.
varianceshow positive and negative deltas around a baselinecategory + valueUse signed deltas, declare whether they are percent or percentage points, and preserve the negative side of the axis.
dumbbellcompare two points for each categorycategory + start + endStart and end must share a unit; label the two endpoints in the title, subtitle, or note.
rangeshow an interval or planning spreadcategory + start + endStart must be less than or equal to end and both endpoints must share a unit.
scattershow a relationship between two measuresx + y + categoryDeclare x and y units separately when they differ; explain the reader decision and avoid implying causation.
bubbleshow a relationship with a third size measurex + y + size + categoryDeclare x, y, and size units separately; state that bubble area encodes size and do not compare area without that context.
heatmapinspect a dense matrix of two dimensionsx + y + valueDeclare the cell-value unit. Signed cells use a diverging negative-to-positive color scale centered at zero; use the heatmap for patterns rather than exact ranking.
treemapshow part-to-whole concentrationcategory + valueUse non-negative values, declare the size unit, and keep labels short enough to fit inside tiles.
radar_comparecompare a small number of entities across shared criteriacategory(criterion) + value(score) + series(entity)Use three to eight comparable criteria and no more than five entities; normalize heterogeneous measures first.

Editorial chart templates · enabled by default

Basic charts remain the default. Enabled deployments accept an optional template alongside the matching chart type. The four templates add small-multiple lines, histograms, connected observations and radar comparisons. Disabled deployments return a clear error for template requests.

TemplateBasic typeReader jobRow limit
small_multiples_linelinetrend600
histogram_distributionbardistribution2000
connected_scatterscatterrelationship500
radar_comparelinecompare50

Keep the existing encodings and context. Supply numeric measurements as numbers. Small multiples require at least two panel series. Histograms count observations in equal-width bins; connected scatter follows supplied row order. Use note for context. Exact values remain available in the data table.

Icons, glyphs and inline raster images

Add optional visualAssets to chart, diagram or network specs, including nested infographic blocks. get_visual_guidance lists curated icon/glyph keys, placements and limits. Charts show a separate identity key; networks reserve badge space beside labels; compact diagrams use the key when a badge would crowd text.

{
  "visualAssets": {
    "version": 1,
    "definitions": [
      {
        "id": "enterprise",
        "kind": "icon",
        "key": "building"
      }
    ],
    "bindings": [
      {
        "target": {
          "type": "category",
          "field": "segment",
          "value": "Enterprise"
        },
        "assetRef": "enterprise",
        "placement": "label"
      }
    ]
  }
}

Bindings target an existing encoded category/series value, or an entity with field: "id" and an existing node ID. Mermaid identity keys require explicit nodes. Use kind: "glyph" with circle, square, diamond, triangle or star for font-independent identity. Glyphs do not encode quantitative size.

For a supplied image, use kind: "image", src containing an inline PNG/JPEG/static WebP data URL, required alt text, and optional fit: "contain" | "cover". No server-side photo storage, upload registration, remote URL or proxy is supported. Each image is limited to 512 KiB and four megapixels; see all limits. Do not invent image bytes or replace data marks with photos. Browse the identity fixtures for live examples.

render_diagram

Use for explicit structure: processes, systems, sequences, state transitions, entity relationships, timelines, and conceptual maps. Mermaid runs with strict security settings.

{
  "insight": "The decision path has three gates",
  "mermaid": "flowchart LR\n A[Input] --> B[Decision] --> C[Outcome]"
}

For an authored editorial diagram, provide a structured template, nodes, and edges. Mermaid and a structured template cannot be mixed. Editorial diagrams are independently feature-flagged, so Mermaid remains the basic path.

{
  "template": "process_flow",
  "insight": "Every handoff has an owner",
  "nodes": [{ "id": "a", "label": "Intake" }, { "id": "b", "label": "Review" }],
  "edges": [{ "source": "a", "target": "b", "label": "qualify" }]
}

render_network

Use for relationships that are too dense or exploratory for a hand-authored diagram. Layout, pan, zoom, fit, selection, and highlight behavior are client-side.

{
  "title": "Service dependencies",
  "nodes": [{ "id": "api", "label": "API" }, { "id": "db", "label": "Database" }],
  "edges": [{ "source": "api", "target": "db" }],
  "layout": "dagre"
}

Composition templates

Choose evidence_network, hero_metric_support, evidence_board, charticle, small_multiples_story, timeline_with_evidence, comparison_story, or cause_effect_story. Maximum 12 blocks, six visual blocks, one network and 12 connectors. Sources remain visible. Comparison and small-multiple charts with matching units share a numeric domain by default.

Declare scaleGroups to coordinate specific chart blocks, or set independent to true to label separate scales explicitly. Optional linking uses a group and an entityField or timeField; tapping persists selection until cleared. Compact layouts stack evidence and retain connector meanings as text.

render_infographic

Use for a compact authored story that combines metrics, text, diagrams, networks, and up to six visual blocks. Infographics require an explicit template and are enabled by default unless disabled by deployment configuration.

{
  "template": "hero_metric_story",
  "insight": "Retention improved while acquisition held steady",
  "blocks": [
    { "kind": "metric", "label": "Retention", "value": 84, "unit": "%", "change": 6, "changeUnit": "pp" },
    { "kind": "text", "text": "The improvement is concentrated in returning customers." }
  ]
}