Skip to main content
Glama

Preview what a request sends

preview_request
Read-only

Shows exactly what a chart generation would send on for these arguments - the measured shape of your data (column names, types, counts, ranges), the settings, and whether any sample rows travel - with the credentials removed. It sends nothing on and costs nothing. This hosted server receives your table, profiles it in memory and sends only the profile to generation; rows aren't stored or logged. Takes the same arguments as a generation.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preview_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoA pre-typed {columns, rows} table — the shape a Fabric DAX query / dataframe already has. Alternative to csv_path/csv_text; when columns carry isMeasure/format/description the shape matches PBI fidelity with no guessing.
wrapNoCode form: 'none' (default) = the raw render() function to merge; 'esm' = same code plus `export { render };` so the file can be `import`ed. Both forms are accepted everywhere - @bicharts/chart-host strips the export clause before compiling - so this is a convenience, never a compatibility choice.
modelNoModel code; empty = backend default.
widthNo
heightNo
promptNoFreeform guidance for the generation — the same 'user commentary' lane the Power BI visual uses. Steer encoding/axes/emphasis in plain language, e.g. 'put Year on the x-axis, color by Division', 'render citations as a chord diagram', 'log scale on revenue', 'annotate the peak'. A RegiaBI plan reads up to 1000 characters of it (an account that brings its own model has no limit); text past that isn't read, and the result names it.
cultureNoThe caller's language and region as a BCP 47 tag such as 'de-DE', 'fr' or 'ja-JP'. Default 'en-US'. It is the language the chart's own text is written in (titles, axis labels, legends, notes), and it breaks the tie when a CSV's numbers or dates are ambiguous: 12.500 as twelve thousand five hundred or twelve and a half, 05.03.2024 as 5 March or 3 May. Set it from the end user's locale when you know it; it does not translate the data.
formatsNoPer-column number/date FORMAT STRING (e.g. {"Revenue":"$#,##0","Margin":"0.0%"}). PBI supplies these from its model; a CSV can't, so provide them to steer number formatting.
out_dirNoNot accepted by this hosted server: this hosted server returns the chart inline; it can't write to your machine.
overlayNoThe analytical layer the person asks for: 'moving_avg' = moving average, 'trend_line' = trend / regression line, 'anomaly' = anomaly highlights, 'confidence_band' = confidence band, 'forecast' = forecast / projection, 'yoy' = year-over-year comparison. It is strongly preferred where it applies to the chosen chart and data (the engine adds the derived measures it needs); where it can't apply, this data can't honor it. Unset: the engine decides.
csv_pathNoNot accepted by this hosted server: this hosted server can't read files on your machine, so pass the table as data or csv_text.
csv_textNoInline CSV text (alternative to csv_path).
group_byNoColumns that are the PRIMARY series/breakdown (the PBI 'Group by' well); the backend leads the visualization with these.
industryNoThe industry the person names for the data, one of the listed values. A recognized metric name is used only when the columns are that industry's inputs for it. Unset: no industry context is added.
languageNoProject source language: with no concrete `renderer`, javascript/typescript generates D3 (the renderer @bicharts/chart-host draws) and python lets the backend auto-pick within Plotly/matplotlib. Omit to AUTO-DETECT from the working dir.
limit_toNoThe subset the person asks for, passed on as an authoritative instruction to limit to or focus on exactly it: 'latest', 'top' (top / greatest), 'bottom' (bottom / smallest), 'most_common' or 'outliers'. limit_count says how many are kept. Unset: the engine decides.
measuresNoColumns to treat as MEASURES (the PBI 'Values' well — fields the chart aggregates). Numeric non-identifier columns are measures by default.
rendererNoForce a specific renderer (overrides `language`). Omit to use `language`/auto-detection; 'VISUAL'/'' = let the backend choose.
chart_typeNoPreferred chart type by name (honored unless the data shape disqualifies it). A form the person described (a map, bars) counts as named: pass the listed type of that form.
date_grainNoThe time grain the person asks for on the time axis: day, week, month, quarter, year or decade. It is passed on as a strong request, and a different bucket the engine plans is rewritten to it when the dates give that grain 2 or more periods; data with no date column can't honor it. Unset: the engine chooses, from the number of periods the dates give at each grain.
dimensionsNoColumns to treat as DIMENSIONS (a PBI category/axis well — fields to group/break by). Use for numeric codes/years that should NOT be aggregated.
projectionNoThe grain to draw chart_type at, for a type that fits only once the rows are totalled: the projection key a what-fits list gave for that type on this same data, copied exactly (e.g. "AggregateOut|CountryCode|"). It selects one way of totalling the rows; unset, such a type is drawn at the first grain that admits it.
show_titleNoWhether the person wants a title inside the chart: true asks for a concise one, false asks for none. A yes or no, not the title's text. Unset: one narrower than 400 px or shorter than 300 px gets none; a larger one draws at random whether to have one, once per page.
chart_styleNoNarrows the charts considered to one family: 'traditional' = the familiar forms (bar, stacked and grouped bar, line, area, pie, donut, card, gauge), 'non_traditional' = every other chart type. A chart named in chart_type is still honored unless the data shape disqualifies it, and 'traditional' also turns chart_variety off. Unset considers both families.
compactnessNoHow roomy the person wants the chart: 'spacious' = roomier margins and more aggressive aggregation of a high-cardinality column, 'balanced' = standard margins and label density, 'compact' = tighter margins and denser axes, aggregating only when cardinality clearly exceeds what fits. Unset: a level is drawn at random for each generation.
data_labelsNoWhether the person wants the value printed on each mark: 'include' asks for the labels, 'exclude' for none. Per-mark labels are suppressed when more than 30 marks would carry one. Unset: the engine decides.
font_familyNoThe font family the person names for the chart's own text (titles, axis labels, tick labels, legends), or the one their house style says: a family such as 'Segoe UI' or a stack such as 'Segoe UI, Arial, sans-serif'. A font isn't a property of the data or the project. It applies to whichever renderer is chosen, and an unavailable family falls back to a web-safe stack rather than failing. Unset: the engine decides.
limit_countNoHow many groups or categories the person asks to keep, from 1 to 10000. The engine keeps exactly that many by the measure, and its own Top-N, 'Other'-cap and cardinality rules yield to it. Unset: no limit from the person (the engine's own Top-N rules still apply).
project_dirNoNot accepted by this hosted server: this hosted server can't see your project folder, so pass language or renderer instead.
rows_policyNo'auto' (default) = the engine decides how to summarize. 'all' = render EXACTLY one mark/row per source row, with no Top-N, no 'Other' rollup and no sampling. Use 'all' when your app depends on every row being present (a row-per-entity table, a point per location).
style_blockNoThe name of a style block saved on the account, as the person states it, or 'none' for no block. The chart follows that block's appearance notes and palette; a name the account doesn't have is reported back with the account's block names. Unset: the account's default block applies, if it has one.
descriptionsNoPer-column human DESCRIPTION — gives the model semantic context the bare column name lacks.
group_othersNoWhether the person allows the categories beyond a limit to be grouped into one 'Others' bucket. True is the same as unset: under a limit the rest is grouped and the total stays whole; with no limit the engine decides whether to group. False: the rest is dropped and nothing is grouped. Unset: grouping allowed. group_others true is not sent with rows_policy 'all', which draws every row.
include_codeNoInclude the full code in the response — governs BOTH the text block and structuredContent.code. Default: true, or FALSE when out_dir is given (the code is then already on disk, and a large chart's code can overflow a client's tool-output limit). Set it explicitly to override either default.
non_additiveNoMEASURE columns that must NOT be summed (a ratio/average/rate — use mean, never stack). Usually auto-detected; this is an authoritative override.
others_labelNoThe name the person gives the 'Others' bucket, at most 40 characters; quotes, backticks and control characters are removed and longer text is cut. Unset: 'Other'. Not sent when group_others is false.
palette_modeNoWhere the person wants the category colors from: 'host' = the app's options.palette, else the fallback palette; 'fallback' = one fixed palette in category-name order, the same in every chart; 'randomized' = a palette the engine proposes for this chart. The last two ignore options.palette. Unset: 'host'.
preview_htmlNoNot accepted by this hosted server: this hosted server returns the chart inline; it can't write to your machine.
chart_varietyNoHow much variety the person asks for: the probability, from 0 to 1, that the choice among the charts that fit this data is nudged toward a less conventional one, when the engine runs its planning pass. The nudge is among already-valid charts only: when only the obvious chart honestly fits, it is kept. It has no effect with an explicit chart_type, chart_style 'traditional' or reasoning_mode 1P or CP. Unset: the server's own default.
privacy_levelNoHow much detail to compute/share: 0 names only, 10 +counts, 20 +detailed stats (default), 30 +obfuscated sample rows.
reasoning_modeNoLLM pass structure; empty = backend heuristic.
level_of_detailNoThe user's own preference for how much of the data to see, as they've stated it; it isn't a property of the data. 'High' = every observation drawn as its own mark (scatter, beeswarm, strip). 'Medium' = every row used, but shown as a distribution (box, violin, histogram). 'Low' = one mark per category (bars, cards, pies). Unset when the user hasn't stated one; unset is a proven no-op and the engine decides. This is a strong nudge, not a filter: it reorders charts that already fit, and an explicit chart_type still wins.
derived_measuresNoWhether the person allows derived measures (ratios, z-scores, percent change, rank, index): 'discourage' keeps the chart to the raw columns (aggregations and sorts still apply); 'encourage' keeps them allowed and rules out the draw that would turn them off, without asking for more of them. Unset: a weighted draw for each generation. 'encourage' is not sent with forbid_derived_columns.
in_chart_captionNoWhether the person asks for a one-line subtitle under the chart title naming the chart type, any derived measure used and any non-default aggregation. Unset or false: none.
legend_placementNoWhere the person wants the legend: 'outside' = in the chart margin, 'inside' = within the plot area where it overlaps the data least, 'none' = no standalone legend (the chart's own labels carry the names). A single-series chart draws no legend whichever is chosen. Unset: outside on a chart at least 500 px wide, the renderer's default on a narrower one.
required_columnsNoFields that MUST be visible in the output, each as its own column/channel. AUTHORITATIVE and VERIFIED: if the generated code never references one, the server regenerates automatically rather than returning a chart that silently dropped it.
direction_of_goodNoWhich way is good for each measure the chart judges, by its column name as sent: { "Bookings": "higher", "Cost": "lower" }. The person's own answer; unset when they haven't given one, and the engine then infers a direction where it can and leaves the rest neutral.
forbid_derived_columnsNoTrue = show only fields present in the data (plus required_columns) — no per-capita, share-of-total, index, rank or z-score columns the engine would otherwise add. Use when your app owns the analytics and the chart is only the display.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / style_block
      Added value: +{
      +  "description": "The name of a style block saved on the account, as the person states it, or 'none' for no block. The chart follows that block's appearance notes and palette; a name the account doesn't have is reported back with the account's block names. Unset: the account's default block applies, if it has one.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / palette_mode
      Added value: +{
      +  "description": "Where the person wants the category colors from: 'host' = the app's options.palette, else the fallback palette; 'fallback' = one fixed palette in category-name order, the same in every chart; 'randomized' = a palette the engine proposes for this chart. The last two ignore options.palette. Unset: 'host'.",
      +  "enum": [
      +    "",
      +    "host",
      +    "fallback",
      +    "randomized"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / projection
      Added value: +{
      +  "description": "The grain to draw chart_type at, for a type that fits only once the rows are totalled: the projection key a what-fits list gave for that type on this same data, copied exactly (e.g. \"AggregateOut|CountryCode|\"). It selects one way of totalling the rows; unset, such a type is drawn at the first grain that admits it.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by disclosing the data-handling model — the hosted server receives the table, profiles it in memory, forwards only the profile, and rows are neither stored nor logged, with credentials stripped. For a tool handling user data that is exactly the behavioral context an agent needs.

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?

Four sentences, front-loaded with the payoff and with no filler. Minor redundancy between "sends nothing on and costs nothing" and the later "sends only the profile to generation," which could read as tension on a fast pass but resolves on careful reading.

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?

With 48 parameters and no output schema, the description does the necessary work by sketching the response (measured shape, settings, sample-row flag, credentials removed) and by tying the inputs to the generation call. It does not describe the response's concrete structure, but the schema's own per-parameter descriptions (including privacy_level's sample-row levels) cover the rest.

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?

Schema description coverage is 96% across 48 parameters, so the schema already carries nearly all parameter meaning and a 3 is the baseline. The description adds one genuinely useful fact — the argument set mirrors a generation call, so an existing generate_chart payload can be reused verbatim — but nothing about individual parameters.

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?

"Shows exactly what a chart generation would send on for these arguments" states a specific verb (shows) and resource (the outbound request payload), and enumerates what is revealed: measured shape (column names, types, counts, ranges), settings, and whether sample rows travel. That distinguishes it cleanly from generate_chart and check_request without opening either schema.

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 sends nothing on and costs nothing" plus "Takes the same arguments as a generation" gives a clear use context: dry-run before a real generation, reusing the same argument set. No sibling is named as an alternative and there is no explicit when-not guidance (e.g. versus check_request), so it stops short of a 5.

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