Skip to main content
Glama

Render a chart to SVG

render_microchart

Render a chart to a self-contained SVG with embedded styles and generated alt text, suitable for inline display in model replies or table cells.

Instructions

Render a chart to a finished, self-contained SVG (styles embedded) plus its generated alt text — for surfaces that can't run React. Pass the series as data; put other props (value, target, curve, color, width) in props. Each chart takes its own data shape — get_microchart returns a valid sample to adapt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoPrimary series (array), or a keyed object for charts that take one; omit for scalar charts.
typeYesChart slug, e.g. "sparkline".
propsNoOther props (value, target, color, …).
formatNo`svg` (default) or `bare`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
svgYes
widthYes
heightYes
libraryYes
summaryYesThe chart's generated accessible name — its alt text.
mimeTypeYes
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that the output is a self-contained SVG with styles embedded and includes alt text. No mention of authorization or rate limits, but since it's a non-destructive rendering operation, the transparency is adequate.

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?

Two sentences: first states purpose, second gives input guidance. No unnecessary words. Highly concise and well-structured.

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?

Given 4 parameters, 100% schema coverage, and presence of output schema, the description provides sufficient context: input structure, use case, and reference to sibling tool for data shapes. Complete for a rendering tool.

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 100%, baseline 3. Description adds value by explaining that 'data' holds the series, 'props' holds other configuration like value, target, etc., going beyond schema definitions.

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 description clearly states it renders a chart to a self-contained SVG plus alt text for environments that can't run React, and distinguishes from sibling get_microchart which returns a sample.

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?

Explicitly says when to use ('for surfaces that can't run React'), how to structure input ('Pass the series as data; put other props...'), and advises consulting get_microchart for valid data shapes.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ganapativs/microcharts'

If you have feedback or need assistance with the MCP directory API, please join our Discord server