Skip to main content
Glama

Chart-Output

Render chart

render_chart
Read-onlyIdempotent

Render a chart image from a Chart-Output JSON spec and return it as a PNG, with a link to edit it in the Chart-Output playground. Use it whenever the user asks for a chart, graph or plot of data. Without an API key renders are PNG, at most 1200px per side, with no custom logos or saved brand kits. Show the user the edit link so they can tweak the 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": {
      "spec": "<spec>"
    },
    "name": "render_chart"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYesA Chart-Output chart spec (JSON object), the same body POST /api/v1/render takes. Required: "type" (one of line, bar, pie, doughnut, radar, polarArea) and "data": { "labels": string[], "datasets": [{ "label": string, "data": number[] }] }. Optional: "width"/"height" in px (default 800x400), "header": { "eyebrow", "title", "subtitle" }, "kpiStrip": [{ "label", "value" }] (up to 12), "footer": { "left", "right" } (e.g. source line), "brandKitId": one of obsidian, linen, polar, studio, ember, harbor for a preset look, "theme": { "mode": "light"|"dark", "palette": ["#hex", ...] }, "dataLabels": true, "options" (Chart.js options). Adding a header, kpiStrip or footer renders a full branded card. Example: {"type":"bar","header":{"title":"Revenue by quarter"},"data":{"labels":["Q1","Q2","Q3","Q4"],"datasets":[{"label":"Revenue ($k)","data":[120,145,132,178]}]},"footer":{"left":"Source: finance"}}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and a closed-world scope, so the safety profile is covered. The description adds genuinely non-structured behavior: unauthenticated renders are capped at 1200px per side and exclude custom logos and saved brand kits. It does not explain how an API key is supplied, but that is a configuration concern rather than a per-call behavior.

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?

Four short sentences, front-loaded with the core action and output, then usage trigger, then tier limits. The final sentence slightly repeats the edit link already mentioned in sentence one, a minor redundancy, but nothing else is wasted.

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?

With no output schema, the description correctly carries the return-value burden by naming the PNG plus edit link, and it flags the free-tier constraints. For a single-parameter, deeply documented tool this is nearly complete; only the auth/API-key mechanism is left implicit.

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% and the nested 'spec' parameter already documents required fields, optional fields, presets, and a full example. The description only labels it as the same body POST /api/v1/render accepts, which adds a useful cross-reference but no per-parameter meaning beyond the schema. Baseline 3 applies.

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?

The first sentence states a specific verb and resource ('Render a chart image from a Chart-Output JSON spec'), names the output format (PNG), and adds a secondary return value (playground edit link). An agent knows exactly what it gets back 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?

'Use it whenever the user asks for a chart, graph or plot of data' gives a clear triggering condition, and the closing line instructs the agent to surface the edit link. There are no siblings to disambiguate against, so no exclusions are needed, but the guidance stops short of saying when not to use it (e.g., non-data visualizations).

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.