Skip to main content
Glama
graphgrow
by graphgrow

chart_spec

Idempotent

Create Vega-Lite charts and get a rendered PNG with automatic diagnostics for layout defects such as label collisions, zero baselines, and excessive series.

Instructions

Write a Vega-Lite chart as a SOURCE DOCUMENT: .vl.json + a rendered .png land in out_dir (use the artifact scratch when the user asked to SEE it — the workspace opens it beside the conversation, live and editable). Pass data= to inline a frame (capped at max_rows — aggregate big data in the kernel first); a handle reads from the store, so it charts even after the kernel that made it died. THE RENDER COMES BACK ATTACHED TO THIS RESULT — look at it directly, no second read — alongside diagnostics, deterministic layout checks (label collisions, a zero baseline flattening the data, too many series) that name defects the image alone makes you squint for. Rendering is local (vl-convert, Vega-Lite v6).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
nameYes
specYes
out_dirYes
max_rowsNo
Behavior5/5

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

Beyond the annotations (idempotentHint, readOnlyHint false), the description discloses several important behaviors: the render comes back attached to the result, diagnostics include deterministic layout checks, rendering is local with Vega-Lite v6, and handles can chart even after the originating kernel dies. This adds significant value over the structured metadata.

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?

The description is dense with every sentence providing actionable information. It's structured logically: purpose, data handling, output behavior, and rendering details. The use of capitalization and dashes improves readability without wasting words.

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 the tool has 5 parameters, no output schema, and only three annotations, the description covers the essential behavior and outputs thoroughly. It explains the return includes the render and diagnostics, local rendering specifics, and data persistence semantics, making it adequate for an agent to select and invoke the tool confidently.

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 0%, but the description compensates well by explaining data (kernel frame name or handle, max_rows cap), name and out_dir (via output file naming/location), and the spec as a Vega-Lite chart. It doesn't explicitly describe the spec parameter but it's reasonably implied from the tool's purpose. This is strong but not exhaustive.

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?

The description clearly states the tool writes a Vega-Lite chart as a source document and renders it to PNG in out_dir. It is specific about the action and the generated artifacts, but it doesn't explicitly differentiate from sibling tools like chart_export or viz_recipes, so it falls just short of a 5.

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?

The description provides clear context on when to use the artifact scratch (when the user wants to see the chart) and how to handle data (inline vs handle, with a max_rows cap and guidance to aggregate large data first). However, it doesn't explicitly state when not to use this tool or mention alternative tools for different charting scenarios.

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/graphgrow/root-ext-viz'

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