Skip to main content
Glama

Chart Rendering (Chart.js)

chart_render
Read-only

Render a chart to PNG from JSON: bar, line, pie, doughnut, scatter, radar, polarArea or bubble. Pass a full Chart.js config (config) or the shortcut type + labels + datasets [{label, data}] + title. Rendered with Chart.js in headless Chromium, no external requests. Params: config or type/labels/datasets, title, width and height (100 to 2000 px, default 800x500), background (CSS color, default white). Returns image_base64 (PNG). Price: $0.009 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"type":"bar","labels":["Q1","Q2","Q3","Q4"],"datasets":[{"label":"Revenue","data":[12,19,14,23]}],"title":"Revenue 2026 (kUSD)"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
titleNo
widthNo
configNoFull Chart.js configuration {type, data, options}
heightNo
labelsNo
datasetsNo
backgroundNowhite

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld/destructive annotations by disclosing that rendering runs in headless Chromium, makes no external requests, returns image_base64 (PNG), and — critically — that it costs $0.009 USDC per call paid via x402 across specific chains. A paid operation with automatic client-side payment is exactly the kind of behavioral trait an agent must know before invoking.

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?

Dense but well front-loaded, leading with the verb/resource and supported types before parameters and payment. The parameter enumeration partly repeats schema data, but given the low schema coverage that repetition earns its place; the payment and sample sentences are pure value.

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?

With no output schema, the description correctly states the return value (image_base64 PNG), and it covers the nested datasets structure, dimension constraints, background color, rendering environment, and cost model. For a nested-object, parameter-rich, paid tool this is complete enough to call correctly.

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 description coverage is only 13%, so the description carries most of the burden and largely succeeds: it clarifies the mutually-exclusive config-vs-shortcut inputs, gives the datasets shape [{label, data}], states the width/height range and defaults, and notes background takes a CSS color (a detail absent from the schema). It doesn't fully document every field, but it compensates substantially for the coverage gap.

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 (Render) and resource (chart to PNG from JSON) and enumerates the exact chart types supported (bar, line, pie, doughnut, scatter, radar, polarArea, bubble), which distinguishes it from siblings like diagram_render. An agent immediately knows what it produces and can compare against the sibling set without opening the schema.

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?

Explains the two invocation modes clearly (full Chart.js config vs. the type + labels + datasets shortcut) and gives a concrete free-sample invocation. It does not, however, explicitly state when to prefer this over diagram_render or screenshot, so sibling routing is left to inference.

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