Skip to main content
Glama

chart_add

Add a chart to the model, saved with it and shown in the Charts dock. Name the nodes to draw and the kind; line, area, column, bar and waterfall draw one series per node over the periods; pie, doughnut, radar, treemap, sunburst and funnel take one number per node (reduce, default last); scatter, bubble and candlestick read their series by role in order; histogram, pareto and boxplot treat the window as a distribution; costcurve is a supply curve — each producer a bar as wide as its volume and as tall as its unit cost, cheapest first — read from pairs of series (volume, unit cost), one number each by atPeriod or reduce, with a role value series drawn across it as a price and an x series with no cost (total demand) drawn upright where demand cuts it. Give it a title and, when it is about one section, that section. A chart in the dock alone is on no page: card: true also puts it on the model's card, in the same change; for a document, add a chart block with document_set.

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": {
      "model": "<model>",
      "kind": "<kind>",
      "series": "<series>"
    },
    "name": "chart_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast period drawn: a label or an anchor
axesNo
binsNoBuckets for histogram and pareto
cardNoAlso show the chart on the model's card — after its last chart, else after its headline figures. Refused where the model has no card yet (model_card_set makes one).
fromNoFirst period drawn: a period label, or an anchor actuals_end / forecast_start / fill_until
gridNo
kindYes
modelYesModel uid (`model_…`), from model_list.
titleNo
legendNo
reduceNoFor a chart whose categories are the nodes: how the number is taken when atPeriod does not name one. Default last, never sum for a stock
seriesYesThe nodes drawn, by name. A scatter reads its first two as x and y, a bubble adds size, a candlestick reads open, high, low, close in that order; a costcurve reads them in pairs, each producer's volume then its unit cost, unless you give roles; every other kind draws each as a value.
sectionNoThe section this chart is about (a path); absent means the whole model
stackedNoAdd the series together rather than drawing them side by side: one bar (or band) per period, split into the parts that make it up. `stacked` is the stacked column chart, `percent` the 100% stacked one where every bar fills the axis and each series shows its share. Only for a chart over the periods — column, bar, area or line — and not for one drawn on a calendar, which places its marks by date and has no bucket to add up. A stack is one value axis and one kind of mark: series on different axes are never added to each other, nor a line to a column, so drawing a series as a line or moving it to the secondary axis is how to keep it out of the stack. Within that, series naming the same `stack` go together, so one chart can hold revenue components beside cost components.
atPeriodNoFor a chart whose categories are the nodes (pie, radar…): which period supplies the number
timeAxisNo
periodicityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The annotations declare a non-read-only, non-idempotent, non-destructive write, and the description adds real context beyond them: the chart is persisted with the model and appears in the Charts dock, the card insertion happens 'in the same change', and the call is refused when the model has no card yet. It does not describe the response or what happens on name collisions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in one clean sentence, but the costcurve passage is an enormous semicolon-chained run-on that is hard to parse, and the kind-by-kind taxonomy crowds out the operational essentials. Little of the text is wasteful, but the structure works against comprehension.

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?

For a 17-parameter tool with nested objects and no output schema, the description covers the hard parts: what each kind draws, how stacking composes with axes and series kinds, and the card/document persistence paths. Gaps are minor (axis configuration, periodicity, return value), and those are documented in the schema.

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?

With 59% schema coverage, the description carries meaningful extra weight: it explains the per-kind role ordering of `series` (scatter x/y, bubble size, candlestick open/high/low/close, costcurve volume/cost pairs), the `reduce` default of 'last', and the axis/kind/stack interaction rules. `from`/`to`, `axes`, `bins`, `grid`, `legend`, `timeAxis` and `periodicity` are left entirely to the schema, so it does not fully compensate.

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 names a specific verb and resource plus its persistence behavior: 'Add a chart to the model, saved with it and shown in the Charts dock.' The remainder tells the agent exactly what each of the 18 `kind` values draws from the named nodes, which is far beyond restating the name.

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?

It routes the agent between sibling tools: `card: true` also places the chart on the model card (and names `model_card_set` for models with no card), and directs document charts to `document_set` with a `chart` block. It also advises leaving `scenario` unset by default. It does not give explicit when-not-to-use guidance versus e.g. `add_nodes` for non-chart content.

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