Skip to main content
Glama

Create or Refresh Chart Image

notion_create_chart

Render bar, line, pie, and 20+ chart types as PNG or SVG and insert them into Notion pages or refresh existing charts in place.

Instructions

Render a chart image (PNG, or SVG) and put it on a page, or refresh an existing chart image in place. Types: bar, column, stacked_bar, stacked_column, grouped_column, line, area, stacked_area, pie, donut, scatter, and histogram (one row per observation; y is the value (x is ignored). bins sets the number of bins.); heatmap (x = column, series = row, y = the cell's value.); boxplot (one row per observation; x = group, y = value.); waterfall (rows in order; y = change. A row with series "total" shows the running total instead.); funnel (rows in stage order; y = how many reached the stage.); bullet (per x: a row with series "actual" (or none) and a row with series "target".); small_multiples (x and y as for a line chart; one small panel per series.); dual_axis (exactly two series: the first as columns (left axis), the second as a line (right axis).); treemap (x = item, y = size; optional series groups items (one color per group).); sankey (one row per flow: x = from, series = to, y = amount. Flows must only go forward (no loops).); network (one row per link: x = one end, series = the other, y = weight (line thickness).). Data is inline data ([{x, y, series?}]) or a source query that groups a database (x, y like "count" or "sum:Estimate", optional series). annotations add labeled reference lines; palette picks colors (default is a validated colorblind-safe order). data_table adds a toggle under the chart with a description and the numbers, for readers who can't see the image. For anything the types don't cover, pass a full Vega-Lite spec as vega_lite (data inline only; nothing is fetched). The recipe is remembered, so refresh_block_id re-renders it from current data. Prefer notion_views chart views when a live Notion chart is enough. Reversible with notion_undo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
chartNoRequired for a new chart; optional on refresh (keeps the stored one).
formatNopng (default) or svg (sharp at any zoom).png
parentNoNew chart: page or block to insert into.
sourceNo
captionNo
positionNoend
vega_liteNoAdvanced: a complete Vega-Lite spec (data in data.values) instead of chart + data. Not refreshable.
data_tableNoAdd a toggle under the chart with a description and the data, as a text alternative.
after_block_idNo
vega_lite_themeNovega_lite only: light (default), dark, or transparent, applied where the spec sets no colors of its own.
refresh_block_idNoAn image block made by this tool: re-render it in place.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.0.0
    • addedInput schema / properties / chart / properties / annotations
      Added value: +{
      +  "description": "Reference lines with labels: {at: \"Q2\", label: \"Launch\"} marks a category; {value: 100, label: \"Target\"} marks a level",
      +  "items": {
      +    "properties": {
      +      "at": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "label": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "label"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • addedInput schema / properties / chart / properties / bins
      Added value: +{
      +  "description": "histogram: number of bins (default 20)",
      +  "maximum": 100,
      +  "minimum": 2,
      +  "type": "integer"
      +}
    • addedInput schema / properties / chart / properties / palette
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "default",
      +        "cool",
      +        "warm",
      +        "mono"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "pattern": "^#[0-9a-fA-F]{6}$",
      +        "type": "string"
      +      },
      +      "maxItems": 12,
      +      "minItems": 2,
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Colors: default (validated colorblind-safe order), cool, warm, mono, or your brand's hex colors in slot order"
      +}
    • changedInput schema / properties / chart / properties / type / enum
      Previous value: -[
      -  "bar",
      -  "column",
      -  "stacked_bar",
      -  "stacked_column",
      -  "grouped_column",
      -  "line",
      -  "area",
      -  "stacked_area",
      -  "pie",
      -  "donut",
      -  "scatter"
      -]New value: +[
      +  "bar",
      +  "column",
      +  "stacked_bar",
      +  "stacked_column",
      +  "grouped_column",
      +  "line",
      +  "area",
      +  "stacked_area",
      +  "pie",
      +  "donut",
      +  "scatter",
      +  "histogram",
      +  "heatmap",
      +  "boxplot",
      +  "waterfall",
      +  "funnel",
      +  "bullet",
      +  "small_multiples",
      +  "dual_axis",
      +  "treemap",
      +  "sankey",
      +  "network"
      +]
    • addedInput schema / properties / data_table
      Added value: +{
      +  "default": false,
      +  "description": "Add a toggle under the chart with a description and the data, as a text alternative.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "default": "png",
      +  "description": "png (default) or svg (sharp at any zoom).",
      +  "enum": [
      +    "png",
      +    "svg"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / vega_lite
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Advanced: a complete Vega-Lite spec (data in data.values) instead of chart + data. Not refreshable.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / vega_lite_theme
      Added value: +{
      +  "description": "vega_lite only: light (default), dark, or transparent, applied where the spec sets no colors of its own.",
      +  "enum": [
      +    "light",
      +    "dark",
      +    "transparent"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.10.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations disclose mutation (readOnlyHint=false, destructiveHint=false, openWorldHint=true), but the description adds genuinely behavioral facts beyond them: the recipe is remembered so refresh re-renders from current data, vega_lite does no fetching ('nothing is fetched'), and operations are reversible via notion_undo. It also discloses that vega_lite is 'Not refreshable', a real limitation.

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?

Front-loads purpose, create/refresh, and the notion_views alternative in the first sentence, but the long run-on enumeration of 22 chart types and data-shape rules makes the body dense. The content mostly earns its place, though a bulleted chart-type reference would read better.

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?

For a 12-parameter, nested-object tool with no output schema, the description covers data sourcing (inline vs `source` query), chart-type semantics, placement, refresh behavior, the escape hatch (vega_lite), and reversibility. Nothing an agent needs to call it correctly appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 58% schema coverage, the description supplies the missing semantics: per-chart-type meaning of x, y and series (heatmap x=column/series=row, waterfall ordering, dual_axis two-series rule, sankey forward-only flows), plus `bins`, `annotations`, `palette`, and `data_table` behavior. This is meaning well beyond the schema.

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+resource ('Render a chart image... and put it on a page, or refresh an existing chart image in place'), covering both create and refresh modes. It explicitly distinguishes itself from the sibling notion_views ('Prefer notion_views chart views when a live Notion chart is enough'), so an agent can route without opening a schema.

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?

Names the primary alternative (notion_views chart views) with the condition that selects it, and explains the refresh path via `refresh_block_id` plus the fallback to `vega_lite` 'for anything the types don't cover'. Both when-to-use and when-to-prefer-something-else are present.

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