Check a chart request against the data
check_requestChecks a chart request against this data before anything is generated. Takes the same arguments as a generation - the chart type and every setting (date grain, limit, overlay, required columns, rows policy, data labels and the rest) - and answers, in the server's own words, each ask this data can't honor and why: a channel the data doesn't have, too little of one for the ask, or a name the catalog doesn't know. When the chart type itself is denied, it also lists up to five chart types that fit this data, best fit first. An OK names the asks it checked. Pass the table as data ({columns, rows}) or csv_text. This hosted server receives your table, profiles it in memory and sends only the profile to generation; rows aren't stored or logged. No model runs and no generation credits are spent, but the call is METERED like the eligibility list: free within a generous hourly allowance, then usage credits per call. The reply carries a text block and a structured result: the verdict (OK or DENY), the asks checked, each finding with its kind and reason, and the alternatives.
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": "check_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | A 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. | |
| model | No | Model code; empty = backend default. | |
| width | No | ||
| height | No | ||
| prompt | No | Freeform 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. | |
| culture | No | The 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. | |
| formats | No | Per-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. | |
| overlay | No | The 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_path | No | Not 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_text | No | Inline CSV text (alternative to csv_path). | |
| group_by | No | Columns that are the PRIMARY series/breakdown (the PBI 'Group by' well); the backend leads the visualization with these. | |
| industry | No | The 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. | |
| language | No | Project source language: javascript/typescript checks the request as a D3 generation, python as a Plotly/matplotlib one. Omit for JavaScript (D3); `renderer`, when given, overrides it. | |
| limit_to | No | The 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. | |
| measures | No | Columns to treat as MEASURES (the PBI 'Values' well — fields the chart aggregates). Numeric non-identifier columns are measures by default. | |
| renderer | No | Force a specific renderer (overrides `language`). Omit to use `language`/auto-detection; 'VISUAL'/'' = let the backend choose. | |
| chart_type | No | Preferred 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_grain | No | The 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. | |
| dimensions | No | Columns to treat as DIMENSIONS (a PBI category/axis well — fields to group/break by). Use for numeric codes/years that should NOT be aggregated. | |
| projection | No | 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. | |
| show_title | No | Whether 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_style | No | Narrows 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. | |
| compactness | No | How 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_labels | No | Whether 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_family | No | The 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_count | No | How 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_dir | No | Not accepted by this hosted server: this hosted server can't see your project folder, so pass language or renderer instead. | |
| rows_policy | No | '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_block | No | 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. | |
| descriptions | No | Per-column human DESCRIPTION — gives the model semantic context the bare column name lacks. | |
| group_others | No | Whether 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. | |
| non_additive | No | MEASURE columns that must NOT be summed (a ratio/average/rate — use mean, never stack). Usually auto-detected; this is an authoritative override. | |
| others_label | No | The 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_mode | No | 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'. | |
| chart_variety | No | How 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_level | No | How much detail to compute/share: 0 names only, 10 +counts, 20 +detailed stats (default), 30 +obfuscated sample rows. | |
| reasoning_mode | No | LLM pass structure; empty = backend heuristic. | |
| level_of_detail | No | The 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_measures | No | Whether 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_caption | No | Whether 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_placement | No | Where 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_columns | No | Fields 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_good | No | Which 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_columns | No | True = 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | Yes | Whether the service ran the check. False: the check is off on this service, or the service has none, and nothing was checked (errorCode says which). | |
| verdict | No | OK = this data can honor every ask checked. DENY = at least one finding. Absent when nothing was checked. | |
| findings | Yes | What this data can't honor, absent findings first, then threshold, then unknown. | |
| metering | Yes | What this call cost, in the words the text block states it in. | |
| errorCode | No | REQUEST_CHECK_OFF (the check is off on this service), REQUEST_CHECK_UNAVAILABLE (the service has no check), or the service's code for a license, meter or sign-in refusal. | |
| checkedAsks | Yes | Every ask the request carried that the check evaluated, by argument name. | |
| alternatives | Yes | Up to five chart types that fit this data, best fit first; present only when the chart type itself was denied. | |
| errorMessage | No | The service's sentence for a refusal, or why nothing was checked. |