Skip to main content
Glama

Visualize data

visualize_data

Draws any chart, graph or plot from data right in the chat as a consulting-grade, editable ChartKit chart: bar, stacked, 100%, line, waterfall, Mekko, scatter, bubble, donut, Harvey balls or Gantt. Each chart comes in the user's own brand colours from their ChartKit palette, with value labels, one number format and a CAGR or change callout, and it can be placed on the user's selected Google Slides slide, where it stays editable. Built with the same model and D3 engine as the ChartKit extension. Takes chart_type, a table of categories and series (plain numbers, no currency or percent signs), unit, and optionally annotations, highlight, sort, title, subtitle and footnote. Colors come from the user's saved ChartKit palette. unit sets the number format. highlight keeps one series or category in brand colour and greys the rest; on line and scatter charts only highlight.series applies, a category highlight is refused in the result notes. With no annotations, ChartKit adds one callout: CAGR across years, or the change from first to last quarter or month; annotations: [] gives a chart with none. For chart_type "gantt" the project plan goes in gantt in place of table, and annotations, highlight, sort, unit and orientation have no effect. Returns the chart id, the hosted SVG and PNG URLs and the chart model. The chart appears in the chat with Insert into Slides, Download, Copy, Edit and Make live buttons under it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chart_type": "<chart_type>"
    },
    "name": "visualize_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoThe box the image will fill on the slide, in points (a 16:9 Google Slides page is 720 x 405). ChartKit lays the chart out for it and returns sizePt, the exact size to insert the image at, which fits inside the box. Only when you insert the image yourself; not for custom charts.
sortNo"none" keeps the given order — use it for funnels, process steps and any sequence. Default sorts single-series bars and donuts largest-first, except when the categories already look like an ordered sequence (arrows, "Step"/"Stage"/day/week labels, weekdays, or numbers). "value" forces the sort even then.
unitNoUnit of every value, e.g. "EUR m", "%", "k units". "%" becomes a label suffix.
ganttNoThe project plan for chart_type "gantt": one entry per activity, each with an optional bar (start + end) and/or a milestone date. Dates are ISO ("2026-01-05") or natural language ("5 Jan 2026", "Q1 2026").
labelNochart_type "custom" only: short name of the chart kind, e.g. "Dumbbell".
tableNovalues is row-major: values[seriesIndex][categoryIndex]. In stacked charts (stackedBar, stackedBar100, mekko, waterfall) the first series is the top segment of each stack and the last sits on the axis, as in think-cell. Prefer plain numbers; strings like "1,234" or "12%" are parsed as 1234 and 12. Example: {"categories":["2023","2024"],"series":[{"name":"Revenue"}],"values":[[10,12]]}. For chart_type "waterfall" only, a cell may instead be the string "total" (think-cell's "e" is accepted too) to mark that category as a computed subtotal/ending bar that stands on the axis (e.g. "Subtotal", "Total", "Sum" or "End") — its bar height is the cumulative sum of every category before it, not a value you supply, and ChartKit renders it in the distinct total color automatically. Never mark the first category "total": with nothing before it to sum, it renders as a zero-height bar — give the opening category its real starting number instead. For chart_type "harveyBall", every value is a 0-100 fill percentage for that row x column ball (e.g. 75 fills three-quarters of the circle) — series are the rows, categories are the columns. For chart_type "scatter", categories are the numeric x values written as strings (e.g. "20", "45") and each series is one set of y values, one per x. For chart_type "bubble", categories are the bubble names and there are exactly three series in this order: x, y, size. For chart_type "mekko", categories are the columns and series the segments stacked to 100% in each; a column's width is the sum of its values, so values are real sizes, not percentages. For chart_type "gantt", prefer the `gantt` input instead — `table` is only a fallback, shaped as one series per activity and exactly these categories (any order): "Start", "End", "Milestone" — date cells as ISO or natural language, or a blank string when not applicable.
titleNoChart title. Only when the user asks for one.
colorsNoColour overrides by name: a series name, or in a one-series bar chart or donut a category name, to a hex or rgb() colour, e.g. {"Revenue": "#1F4E79"}. Omit to keep the brand palette.
legendNoLegend position, or "none" to hide it. Omit for the default (right for multi-series charts and donuts).
x_unitNoUnit of a scatter/bubble chart's x values, e.g. "%". "%" becomes a label suffix on the x axis.
recordsNochart_type "custom" only: record-shaped data, instead of `table`. One row per category; the Vega-Lite spec reads each field by its id. Every field may be a number or text. Precompute any derived column (difference, rank, ratio) into the rows, since the spec cannot calculate.
footnoteNoLine under the chart, e.g. a data source. Only when the user asks for one.
subtitleNoLine under the title. Only when the user asks for one.
gridlinesNoLight gridlines behind the marks. Defaults to true; false hides them (same chart types as value_axis).
highlightNoSeries and/or category names to keep in brand colour; all others are greyed.
size_unitNoUnit of a bubble chart's size series, e.g. "EUR m". Bubble size has no axis of its own.
vega_liteNochart_type "custom" only: a Vega-Lite v5 spec, as a JSON string or object. Data is always { "name": "table" } (never inline values or a url). Without `records` the table is read in long form: fields category, series, value. No width, height or title (use title/subtitle/footnote). Transforms: aggregate, fold, bin, timeUnit, window, joinaggregate, stack, density, regression, loess, quantile, pivot, filter as a predicate object. No calculate and no expressions. Colours only as scale { "scheme": "chartkit" } or tokens ck:1..ck:8, ck:muted, ck:ink, ck:pos, ck:neg. Small multiples: facet plus top-level columns. A rejected spec returns its errors: fix them and call again.
chart_typeYesUse a native type whenever one fits: native charts stay click-editable and keep annotations and label control. "custom" only for what no native type draws (dumbbell, slope, bump, heatmap, small multiples, ridgeline ...); it needs `vega_lite`.
value_axisNoValue axis with numbers. Defaults to true; false hides it (bar, waterfall, line, scatter and bubble charts only).
annotationsNoChartKit's signature callouts, strongly encouraged wherever they clarify the story: delta between two key bars, cagr across a time series, refLine for a target/average, band for a value range, level for a bracketed range, axisBreak when one bar dwarfs the others.
line_seriesNoCombo chart: names of table series drawn as a line over the bars (stackedBar, stackedBar100, clusteredBar only), e.g. a rate or an average beside volumes. Put them last in the table; at least one series stays a bar.
orientationNo"horizontal" only applies to stackedBar, stackedBar100, clusteredBar, waterfall.
center_labelNoDonut only: a headline number in the hole with a small caption under it, e.g. {"value": "33", "caption": "N = 128"}.
value_labelsNofalse hides the value labels on bars, slices and points; true shows them. Omit for the default.
x_axis_titleNoTitle under the x axis. Do not repeat the unit already in `x_unit`.
y_axis_titleNoTitle beside the value axis. Do not repeat the unit already in `unit`.
secondary_axisNoWith line_series: the lines get their own value axis on the right (default true). false plots them on the bars' axis.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say it is a non-destructive, non-open-world write; the description adds substantial behaviour beyond that: charts are editable, optional API-saved, placed on the selected slide, and return chart id plus hosted SVG/PNG URLs and the chart model. It also discloses edge cases an agent would otherwise hit — a category highlight being refused on line/scatter, gantt ignoring annotations/highlight/sort/unit/orientation, `annotations: []` suppressing the default CAGR/change callout, and a rejected Vega-Lite spec returning errors to fix.

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

Conciseness3/5

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

Well front-loaded — purpose and chart types come first, then inputs, then return value — but it is long and carries filler: 'Built with the same model and D3 engine as the ChartKit extension' adds nothing actionable, and the saved palette is stated twice ('user's own brand colours from their ChartKit palette' then 'Colors come from the user's saved ChartKit palette'). The trailing sentence about chat buttons is UI trivia rather than invocation guidance.

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 27-parameter tool with no output schema, the description covers return values explicitly (chart id, SVG/PNG URLs, chart model), the custom-Vega-Lite path, the Gantt path, and the notable parameter interactions. An agent has everything needed to call it correctly and to know what comes back.

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 already 100%, so the baseline is 3; the description goes beyond it by explaining cross-parameter interactions and defaults (unit drives number format, highlight greys non-selected series, table cells must be plain numbers, custom requires vega_lite). It does not document the majority of the 27 parameters individually, so it stops short of 5.

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?

Opens with a specific verb and resource ('Draws any chart, graph or plot from data right in the chat') and immediately enumerates the concrete chart types produced, plus the ChartKit styling, palette and Slides placement. An agent can distinguish this from create_chart or insert_chart_into_slides on the strength of the description alone.

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?

Gives clear routing rules inside the tool: prefer a native chart_type and use "custom" only for what no native type draws, use the `gantt` input rather than the `table` fallback for Gantt, and add annotations 'wherever they clarify the story'. No explicit exclusion or hand-off to sibling tools such as create_chart, 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