Skip to main content
Glama

Render chart

render_chart

Renders interactive charts inline in chat to visualize numeric data like trends, comparisons, and shares. Use it instead of writing chart HTML when numbers are clearer visually.

Instructions

PREFERRED for any numeric data. Renders a native interactive chart inline in the chat (do not write chart HTML yourself). Use whenever numbers are better understood visually (trends, comparisons, shares). Supports bar, horizontal bar, line, area, pie, doughnut, radar and scatter. Keep to at most 8 series (3 for pie/scatter); never mix two different units on one chart.

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": {
      "title": "<title>",
      "type": "<type>",
      "datasets": "<datasets>"
    },
    "name": "render_chart"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYes
unitNoUnit suffix for values, e.g. '%', 'ms', '万元'
titleYesChart title
labelsNoCategory / x-axis labels (not used for scatter)
xLabelNo
yLabelNo
stackedNoStack bar/area series
datasetsYes
subtitleNoOne-line takeaway or data source

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

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 full behavioral burden, and it does disclose meaningful traits: output is rendered inline and is interactive, chart types are fixed to a closed set, and there are hard limits on series count and unit mixing. It stops short of saying what happens on invalid input, whether the chart is persisted or addressable afterward, or how failures surface.

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?

Four tight sentences, front-loaded with the routing decision ('PREFERRED for any numeric data') before the mechanical details. The parenthetical is doing real work rather than padding, and every clause either routes the agent or constrains the call.

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

Completeness4/5

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

For a 9-parameter rendering tool with no output schema and no annotations, the description covers the decisions that matter most: which tool to use, which chart types exist, and the data-shape limits. The residual gaps are the mechanics of labels/datasets alignment and the secondary labeling parameters, which the schema partially covers at 56% coverage.

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

Parameters3/5

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

Schema description coverage is only 56%, so the description must add meaning, and it does for two things: the enumerated chart types and the 'never mix two different units' constraint that gives the unit parameter real semantics. It says nothing about labels-vs-datasets alignment, stacked, xLabel/yLabel, or subtitle, leaving roughly half the parameters documented only by terse schema entries.

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 ('Renders a native interactive chart inline in the chat') and immediately marks itself as the preferred path for numeric data. The parenthetical 'do not write chart HTML yourself' distinguishes it from the render_html sibling without naming it, so an agent can route correctly from 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 Guidelines5/5

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

Gives an explicit use condition ('whenever numbers are better understood visually (trends, comparisons, shares)') and an explicit anti-pattern ('do not write chart HTML yourself'), which points the agent away from hand-authored HTML toward this tool. The series-count ceilings (8, and 3 for pie/scatter) and the no-mixed-units rule further constrain when a call is valid.

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

Deploy Server

Other Tools