Skip to main content
Glama

create_chart

Renders Chart.js data as a PNG or SVG image, saves it to disk, and returns it for display. Supports bar, line, pie, scatter, radar, and other chart types.

Instructions

Create a chart visualization. Renders a Chart.js chart as PNG or SVG, saves to disk, and returns the image. Supports: bar, line, pie, doughnut, scatter, area, radar, bubble, polarArea, histogram.

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

Input Schema

NameRequiredDescriptionDefault
typeYesChart type
labelsNoLabels for data points (x-axis for bar/line, segments for pie)
optionsNoChart display options
autoOpenNoOpen chart in default viewer (default true)
datasetsYesOne or more data series
outputPathNoCustom file path to save the chart
outputFormatNoOutput format: png (default) or svg

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It does disclose meaningful behavior: rendering happens via Chart.js, output is written to disk, and the image is returned, and output formats are named. It stops short of saying whether existing files are overwritten, where the default save location is, or how errors are surfaced for a write-side-effect tool.

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?

Three short sentences, front-loaded with the core action, then the mechanics, then the supported types. Every sentence carries information and nothing is wasted.

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

Completeness3/5

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

For a tool with nested parameters and a filesystem side effect, the description covers the essential mechanics and indirectly covers the return value by saying the image is returned. It leaves out default destination behavior and sibling differentiation, which matter for calling it correctly.

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 100%, so every parameter including the nested options and datasets objects is already documented in the schema. The description merely restates the chart-type enum and adds no syntax, constraints, or semantics beyond it; the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ('Create a chart visualization') and adds concrete detail about the rendering engine (Chart.js), output formats (PNG/SVG), and the side effect of saving to disk. It does not, however, distinguish itself from the sibling create_vega_chart.

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

Usage Guidelines2/5

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

The description only implies usage by describing what the tool produces. It never says when to choose this over create_vega_chart, nor does it state any prerequisites, exclusions, or conditions under which another tool is preferred.

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