Skip to main content
Glama

Check a chart request against the data

check_request
Read-only

Checks 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

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.
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.
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: 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_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.
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'.
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.

Output Schema

NameRequiredDescriptionDefault
enabledYesWhether 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).
verdictNoOK = this data can honor every ask checked. DENY = at least one finding. Absent when nothing was checked.
findingsYesWhat this data can't honor, absent findings first, then threshold, then unknown.
meteringYesWhat this call cost, in the words the text block states it in.
errorCodeNoREQUEST_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.
checkedAsksYesEvery ask the request carried that the check evaluated, by argument name.
alternativesYesUp to five chart types that fit this data, best fit first; present only when the chart type itself was denied.
errorMessageNoThe service's sentence for a refusal, or why nothing was checked.

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. Changed1 schema field changed
    • changedOutput schema / properties / errorCode / description
      Previous value: -"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 licence, meter or sign-in refusal."New value: +"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."
  3. 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"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint=true and openWorldHint=true already set, the description still adds substantial non-obvious behavior: rows are profiled in memory and never stored or logged, only the profile reaches generation, no model runs occur, no generation credits are spent, yet each call is METERED against an hourly allowance then billed in usage credits. That cost and privacy disclosure is exactly what an agent needs before calling a hosted, external-facing endpoint.

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?

A single dense paragraph that front-loads what the tool does and why it is safe to call before generation. The sentence enumerating the reply's parts (verdict, asks checked, findings, alternatives) is largely redundant with the output schema and could be cut. Length is defensible for a metered tool with 44 parameters, but not every sentence earns its place.

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 44-parameter, nested-schema, output-schema-bearing hosted tool, the description covers the essentials an agent could not infer: transport constraints (no file paths), metering and its trigger, privacy handling of the table, absence of model spend, and what a DENY returns. Because an output schema exists, the brief restatement of reply contents is a bonus rather than a gap-filler.

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?

Schema coverage is 95% on 44 parameters, so the schema carries most of the semantic load and the baseline would be 3. The description earns above baseline by declaring the arguments are the same as a generation's (chart type plus every setting — date grain, limit, overlay, required columns, rows policy, data labels) and by resolving the csv_path trap: pass the table as data ({columns, rows}) or csv_text. That equivalence and transport rule are genuine value beyond field descriptions.

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 names a specific verb and object — it "checks a chart request against this data before anything is generated" — which makes it clearly a validation step rather than a generation step. The follow-on detail (denied chart types trigger up to five fitting alternatives, best fit first) pins down the exact output an agent gets, so it is distinguishable from generate_chart and list_eligible_charts 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase "before anything is generated" establishes the timing context clearly: this is the pre-flight gate. What is missing is any explicit routing — no statement of when to prefer check_request over preview_request or assess_data_shape, and no stated when-not case. The context is clear but the exclusions are absent.

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