Skip to main content
Glama

Update data widget

update_data_widget

Update a DATA widget — its name, datasource, data view, metrics, dimensions, filters, advanced settings, chart type, date range, sort and row limit. Applies the report builder's rules: a new datasource or data view clears the selections below it and re-applies defaults, per-metric renames and formats are kept, the combination is validated, and the series is re-fetched with the new config. Discover ids with datasources → describe_datasource. The re-fetch runs in the background — call get_widget_data with this id to read the new numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWidget ID (from list_widgets).
nameNoDisplay name. Omit to use the generated one ("Clicks & Impressions by Date")
chartNoChart type: table, score (KPI), area, line, bar, column, pie, donut, funnel, or map. 'score' shows a single value, so it takes exactly one metric
filtersNoRow filters. Every row needs a field, an operator and a value
metricsNoMetrics to display, e.g. [{ value: "clicks" }] — ids from describe_datasource. Must belong to the chosen data view. Only `value` is required; the server fills the rest
sort_byNoMetric or dimension id to sort rows by. Defaults to the first dimension
advancedNoDatasource-specific settings (Meta attribution, SEM Rush region, Mailchimp audience…). Several datasources require keys here — describe_datasource lists them per data view. Merges with existing settings
currencyNoPer-widget currency code override; falls back to the client currency
data_viewNoDatasource data view (from describe_datasource), e.g. ACCOUNT. Changing it clears metrics and dimensions
row_limitNoRows to keep (default 'all')
date_rangeNoPer-widget date range (overrides the report range) — also set show_custom_date_range
dimensionsNoBreakdown dimensions, e.g. [{ value: "DATE" }] — ids from describe_datasource. A widget needs at least one; a dimension flagged `single` must be the only one
sort_orderNoSort direction (default 'asc')
datasource_idNoDatasource alias (from datasources), e.g. gadw. Changing it clears the data view, metrics, dimensions, filters and advanced settings, then applies that datasource's defaults. A datasource the client has not connected renders demo data until the connection is made — connected_datasources shows what is connected. The internal sources take no metrics/dimensions and are configured through `advanced` instead: 'CUSTOM_DATA' (Static Value — advanced.value), 'GOALS' (advanced.goal_id from list_goals), 'CUSTOM_IMPORT' (advanced.custom_data_id from list_custom_data), 'CALCULATION' (a calculated metric id as the single metric)
show_custom_date_rangeNoUse the widget date_range instead of the report range

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe data widget as saved, with the builder's rules applied — cleared selections, re-applied defaults and the regenerated name. When the selection changed the series is re-fetching in the background; read it with get_widget_data.
successYesTrue when the call succeeded. A failure comes back as an error result instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "description": "The data widget as saved, with the builder's rules applied — cleared selections, re-applied defaults and the regenerated name. When the selection changed the series is re-fetching in the background; read it with get_widget_data.",
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "True when the call succeeded. A failure comes back as an error result instead.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Discloses side effects beyond annotations: changing datasource/data_view clears dependent selections and re-applies defaults, validates the combination, and re-fetches the series in the background. Also tells the agent to call get_widget_data to read new numbers. No contradiction with readOnlyHint/destructiveHint.

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?

Four dense sentences, each earning its place: field scope, update semantics, id discovery, and post-update fetch. Front-loaded with the field list; 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?

For a 15-param mutation tool with nested objects, the description plus schema fully covers prerequisites, behavior, and how to observe results. Output schema exists, so return-value documentation isn't needed; nothing critical is missing.

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?

Though schema coverage is 100%, the description adds cross-parameter semantics: which changes cascade (datasource/data_view), which settings are preserved (per-metric renames/formats), and where to discover ids (datasources → describe_datasource). It also highlights that internal datasources are configured via advanced instead of metrics/dimensions.

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 (Update) + resource (DATA widget) and enumerates the configurable fields (datasource, data view, metrics, dimensions, filters, chart type, etc.). The capitalized 'DATA widget' distinguishes it from siblings like update_button_widget, update_custom_data_widget, and update_static_value_widget.

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?

Gives clear operational context: it's for updating an existing widget, with a discovery flow (datasources → describe_datasource) and a follow-up call (get_widget_data). It does not explicitly name alternatives like add_data_widget for creation, so it is clear context rather than explicit when-not guidance.

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