Skip to main content
Glama

create_chart_preview

Create a stored chart preview from an accessible dataset; may execute its data requests. Does not add it to a dashboard or set an expiry. Requires team-admin access to all projects. Use run_dataset to inspect fields first. Open result.chart.url in Chartbrew; result.chart.id identifies the preview. Use the Chartbrew UI to place it in a dashboard. Inspect result.completion_check before reporting success; it checks saved settings, not data accuracy. If status is partial, report unverified requirements; do not repeat the saved write.

Input Schema

NameRequiredDescriptionDefault
fillNoFill the area under a compatible series; defaults to false.
goalNoTarget value for supported metric displays.
modeNoDisplay mode; defaults to chart. kpichart adds the supported metric display to a chart.
nameYesName of the new chart preview.
sortNoSort compatible chart values ascending or descending before maxRecords is applied; omit for default ordering.
typeYesChartbrew chart type. Use horizontalBar for horizontal bars; xAxis stays the category and yAxis the numeric value.
xAxisNoCategory or time field path, for example root[].month. Required except for table, kpi, avg, and gauge. Table defaults to root[]; metric charts fall back to yAxis.
yAxisNoValue field path, for example root[].revenue. Required except for table. Values must be numeric or numeric strings unless using count/count_unique on a non-avg chart.
legendNoSeries label; defaults to the dataset name.
rangesNoGauge ranges, up to 20. Each min must be less than max; labels and colors are optional.
formulaNoChartbrew value formula: put the calculation inside one pair of braces and use lowercase val for the final aggregated value, never value. Divide by 100 with {val / 100}, not value / 100. Use spreadsheet functions such as {ROUND(val / 100, 0)}, not JavaScript or SQL. Text outside braces is a literal prefix or suffix: $ {val / 100} or {val / 100} USD. Preserve existing units unless asked to change them. Use an empty string to remove a formula.
stackedNoStack compatible chart series; defaults to false.
subTypeNoAddTimeseries applies a cumulative sum to compatible chart values. Omit for ordinary values.
maxValueNoUpper gauge bound; must be greater than minValue when both are supplied.
minValueNoLower gauge bound; must be less than maxValue when both are supplied.
datasetIdYesSaved dataset ID from search_workspace or explore_data save. Must be accessible to the caller.
dateFieldNoField path used for date filtering and time grouping. Set to xAxis for a time axis.
fillColorNoFill color as #RRGGBB; omit to use the chart default.
multiFillNoUse multiple colors for compatible chart values; defaults to false.
dataLabelsNoShow values on the chart; defaults to false.
dateFormatNoDate format saved with the dateField binding; omit to use the default.
horizontalNoRender bars horizontally; bar plus true selects horizontalBar. xAxis remains the category.
maxRecordsNoRecord limit for compatible charts after sorting, 1 to 10000. Does not limit the source request.
showGrowthNoShow the available growth comparison; defaults to false.
pointRadiusNoPoint radius in pixels, 0 to 50; defaults to 0.
xLabelTicksNoControl category label density; defaults to default. showAll displays every label.
columnsOrderNoTable field paths in the requested display order; omit for default ordering.
datasetColorNoSeries color as #RRGGBB; defaults to #4285F4.
includeImageNoRequest a PNG image content block, up to 1 MiB; defaults to false. Rendering failure sets result.imageUnavailable without undoing the preview.
includeZerosNoFill missing time intervals with zero values where supported; defaults to true.
invertGrowthNoInvert the sign of the growth comparison; defaults to false.
timeIntervalNoTime grouping interval for a time axis; omit to use the chart default.
displayLegendNoShow the series legend; defaults to true.
excludedFieldsNoTable field paths to hide; defaults to none.
yAxisOperationNoAggregation for yAxis; defaults to none. Formula is applied after aggregation.none
completionRequirementsNoCompletion requirements from the whole user request. Carry unfinished requirements into each write. Use empty arrays only when no such requirements exist.

Output Schema

NameRequiredDescriptionDefault
resultYesTool-specific result. Chart preview and filter write verification is returned in result.completion_check; completionRequirements is an input.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed38 schema fields changed
    • addedInput schema / properties / columnsOrder / description
      Added value: +"Table field paths in the requested display order; omit for default ordering."
    • addedInput schema / properties / dataLabels / description
      Added value: +"Show values on the chart; defaults to false."
    • addedInput schema / properties / datasetColor / description
      Added value: +"Series color as #RRGGBB; defaults to #4285F4."
    • addedInput schema / properties / datasetId / description
      Added value: +"Saved dataset ID from search_workspace or explore_data save. Must be accessible to the caller."
    • addedInput schema / properties / dateField / description
      Added value: +"Field path used for date filtering and time grouping. Set to xAxis for a time axis."
    • addedInput schema / properties / dateFormat / description
      Added value: +"Date format saved with the dateField binding; omit to use the default."
    • addedInput schema / properties / displayLegend / description
      Added value: +"Show the series legend; defaults to true."
    • addedInput schema / properties / excludedFields / description
      Added value: +"Table field paths to hide; defaults to none."
    • addedInput schema / properties / fill / description
      Added value: +"Fill the area under a compatible series; defaults to false."
    • addedInput schema / properties / fillColor / description
      Added value: +"Fill color as #RRGGBB; omit to use the chart default."
    • addedInput schema / properties / goal / description
      Added value: +"Target value for supported metric displays."
    • addedInput schema / properties / horizontal / description
      Added value: +"Render bars horizontally; bar plus true selects horizontalBar. xAxis remains the category."
    • addedInput schema / properties / includeImage / description
      Added value: +"Request a PNG image content block, up to 1 MiB; defaults to false. Rendering failure sets result.imageUnavailable without undoing the preview."
    • addedInput schema / properties / includeZeros / description
      Added value: +"Fill missing time intervals with zero values where supported; defaults to true."
    • addedInput schema / properties / invertGrowth / description
      Added value: +"Invert the sign of the growth comparison; defaults to false."
    • addedInput schema / properties / legend / description
      Added value: +"Series label; defaults to the dataset name."
    • addedInput schema / properties / maxRecords / description
      Added value: +"Record limit for compatible charts after sorting, 1 to 10000. Does not limit the source request."
    • addedInput schema / properties / maxValue / description
      Added value: +"Upper gauge bound; must be greater than minValue when both are supplied."
    • addedInput schema / properties / minValue / description
      Added value: +"Lower gauge bound; must be less than maxValue when both are supplied."
    • addedInput schema / properties / mode / description
      Added value: +"Display mode; defaults to chart. kpichart adds the supported metric display to a chart."
    • addedInput schema / properties / multiFill / description
      Added value: +"Use multiple colors for compatible chart values; defaults to false."
    • addedInput schema / properties / name / description
      Added value: +"Name of the new chart preview."
    • addedInput schema / properties / pointRadius / description
      Added value: +"Point radius in pixels, 0 to 50; defaults to 0."
    • addedInput schema / properties / ranges / description
      Added value: +"Gauge ranges, up to 20. Each min must be less than max; labels and colors are optional."
    • addedInput schema / properties / ranges / items / properties / color / description
      Added value: +"Range color as #RRGGBB."
    • addedInput schema / properties / ranges / items / properties / label / description
      Added value: +"Display label for this gauge range."
    • addedInput schema / properties / ranges / items / properties / max / description
      Added value: +"Upper range bound; must be greater than min."
    • addedInput schema / properties / ranges / items / properties / min / description
      Added value: +"Lower range bound; must be less than max."
    • addedInput schema / properties / showGrowth / description
      Added value: +"Show the available growth comparison; defaults to false."
    • addedInput schema / properties / sort / description
      Added value: +"Sort compatible chart values ascending or descending before maxRecords is applied; omit for default ordering."
    • addedInput schema / properties / stacked / description
      Added value: +"Stack compatible chart series; defaults to false."
    • addedInput schema / properties / subType / description
      Added value: +"AddTimeseries applies a cumulative sum to compatible chart values. Omit for ordinary values."
    • addedInput schema / properties / timeInterval / description
      Added value: +"Time grouping interval for a time axis; omit to use the chart default."
    • addedInput schema / properties / xAxis / description
      Added value: +"Category or time field path, for example root[].month. Required except for table, kpi, avg, and gauge. Table defaults to root[]; metric charts fall back to yAxis."
    • addedInput schema / properties / xLabelTicks / description
      Added value: +"Control category label density; defaults to default. showAll displays every label."
    • addedInput schema / properties / yAxis / description
      Added value: +"Value field path, for example root[].revenue. Required except for table. Values must be numeric or numeric strings unless using count/count_unique on a non-avg chart."
    • addedInput schema / properties / yAxisOperation / description
      Added value: +"Aggregation for yAxis; defaults to none. Formula is applied after aggregation."
    • addedOutput schema / properties / result / description
      Added value: +"Tool-specific result. Chart preview and filter write verification is returned in result.completion_check; completionRequirements is an input."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the tool may execute data requests, requires team-admin access to all projects, does not add the chart to a dashboard or set an expiry, and can return a partial completion status. It also explains that completion_check verifies saved settings rather than data accuracy, which is important behavioral context for a write tool.

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 front-loaded with the core action and scope, then adds only high-value operational constraints. Despite the tool's complexity, every sentence contributes useful context with no filler.

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 rich input schema, output schema, and annotations, the description supplies the missing operational context: permissions, side effects, non-goals, result handling, and partial-completion behavior. An agent has enough information to decide when to use this tool and how to interpret its result.

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?

The 36-parameter schema has full description coverage, so the schema already carries the detailed parameter semantics. The description adds operational context such as using run_dataset first, but it does not meaningfully elaborate on the individual chart configuration parameters beyond what the schema provides.

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 states a specific verb and resource: "Create a stored chart preview from an accessible dataset." It also distinguishes this from related capabilities by saying it does not add the chart to a dashboard or set an expiry, and it points to run_dataset for field inspection.

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?

It gives explicit usage guidance: inspect fields with run_dataset first, use Chartbrew UI to place the preview in a dashboard, and inspect result.completion_check before reporting success. It also defines what to do if status is partial: report unverified requirements and do not repeat the saved write.

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