Skip to main content
Glama

Change a widget

update_widget
DestructiveIdempotent

Change a widget's title, query (its visualization included: number is a single value) or position; what you omit stays. A new query replaces the old one whole, measure, measure_property and series included (left out, the widget counts events): test it with run_insights_query first. Pass run_id from start_setup_run so this undoes together with the rest of the setup; leave it out (never "") to start a new chat run, whose run_id is returned and should go on every later change.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dashboard_id": "<dashboard_id>",
      "widget_id": "<widget_id>"
    },
    "name": "update_widget"
  }
}

Input Schema

NameRequiredDescriptionDefault
hNoNew height.
wNoNew width 1-12.
xNoNew column 0-11.
yNoNew row.
queryNoNew query, replacing the whole current one. Omit to keep it.
titleNoNew title. Omit to keep it.
run_idNoThe setup run this change belongs to, from start_setup_run. Omit to start a new chat run (its id is returned).
projectNoProject ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project).
widget_idYesWidget ID, from get_dashboard.
dashboard_idYesDashboard ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedInput schema / properties / query / properties / filters / items / properties / operator / description
      Previous value: -"A plain filter's operator: equals, contains, starts_with, matches (a whole-value pattern where * stands for any text, e.g. *://t.co/* on referrer; a pattern of only * is refused, use exists) or exists (trait and automated: equals only), case-sensitive except on query.utm_source, query.utm_medium and query.ref."New value: +"A plain filter's operator: equals, contains, starts_with, matches (a whole-value pattern where * stands for any text, e.g. *://t.co/* on referrer; a pattern of only * is refused, use exists) or exists (trait and automated: equals only), case-sensitive except on query.utm_source, query.utm_medium and query.ref. scroll_depth and time_on_page_seconds take equals, greater_than, less_than (both strict, > and <: scroll_depth greater_than 74 is 75 or more) or exists (has a value), with a whole number in range as the value, digits only. attrs.KEY also takes greater_than and less_than (strict), comparing the detail as a number: attrs.order_value greater_than 100, with a plain decimal number as the value (100, 34.5, -3; no exponent or separators); an event without the detail or whose detail is not a number matches neither. greater_than and less_than work on nothing else."
    • changedInput schema / properties / query / properties / filters / items / properties / property / description
      Previous value: -"A plain filter's property: a standard property (page_origin, page_path, page_fragment, referrer, data_track, element_tag, element_selector, element_selector_generalized, element_text), attrs.KEY, query.PARAM, trait, or automated (true for automated visits: headless or program-driven browsers and AI agents browsing for a person; equals 'true' or 'false' only, e.g. automated equals false to count people only). Leave out in an any group."New value: +"A plain filter's property: a standard property (page_origin, page_path, page_fragment, referrer, data_track, element_tag, element_selector, element_selector_generalized, element_text), attrs.KEY, query.PARAM, trait, automated (true for automated visits: headless or program-driven browsers and AI agents browsing for a person; equals 'true' or 'false' only, e.g. automated equals false to count people only), or a page view's numbers: scroll_depth (how far down the page the visitor got, whole percent 0-100: 0 never scrolled, 100 the bottom) and time_on_page_seconds (active seconds on the page, 0-1800), null where no value arrived (an older tracker, a lost send), which no comparison matches. Leave out in an any group."
    • changedInput schema / properties / query / properties / filters / items / properties / value / description
      Previous value: -"A plain filter's value (for matches, the pattern); required except for exists."New value: +"A plain filter's value (for matches, the pattern; for scroll_depth and time_on_page_seconds a whole number such as 75; for greater_than or less_than on attrs.KEY a plain decimal number such as 100 or 34.5); required except for exists."
    • changedInput schema / properties / query / properties / measure / description
      Previous value: -"events (default), sum or average, as for run_insights_query: sum and average read the numeric event detail measure_property, per event, leave out values that are not numbers, and an average bucket with no numbers is empty, not 0."New value: +"events (default), sum or average, as for run_insights_query: sum and average read measure_property (a numeric event detail, or scroll_depth or time_on_page_seconds), per event, leave out values that are not numbers, and an average bucket with no numbers is empty, not 0."
    • changedInput schema / properties / query / properties / measure_property / description
      Previous value: -"For sum and average only, and then required: the event detail, attrs.KEY, as for run_insights_query."New value: +"For sum and average only, and then required: the event detail, attrs.KEY, or scroll_depth (average only) or time_on_page_seconds, as for run_insights_query."
    • changedInput schema / properties / query / properties / series / items / properties / filters / items / properties / operator / description
      Previous value: -"A plain filter's operator: equals, contains, starts_with, matches (a whole-value pattern where * stands for any text, e.g. *://t.co/* on referrer; a pattern of only * is refused, use exists) or exists (trait and automated: equals only), case-sensitive except on query.utm_source, query.utm_medium and query.ref."New value: +"A plain filter's operator: equals, contains, starts_with, matches (a whole-value pattern where * stands for any text, e.g. *://t.co/* on referrer; a pattern of only * is refused, use exists) or exists (trait and automated: equals only), case-sensitive except on query.utm_source, query.utm_medium and query.ref. scroll_depth and time_on_page_seconds take equals, greater_than, less_than (both strict, > and <: scroll_depth greater_than 74 is 75 or more) or exists (has a value), with a whole number in range as the value, digits only. attrs.KEY also takes greater_than and less_than (strict), comparing the detail as a number: attrs.order_value greater_than 100, with a plain decimal number as the value (100, 34.5, -3; no exponent or separators); an event without the detail or whose detail is not a number matches neither. greater_than and less_than work on nothing else."
    • changedInput schema / properties / query / properties / series / items / properties / filters / items / properties / property / description
      Previous value: -"A plain filter's property: a standard property (page_origin, page_path, page_fragment, referrer, data_track, element_tag, element_selector, element_selector_generalized, element_text), attrs.KEY, query.PARAM, trait, or automated (true for automated visits: headless or program-driven browsers and AI agents browsing for a person; equals 'true' or 'false' only, e.g. automated equals false to count people only). Leave out in an any group."New value: +"A plain filter's property: a standard property (page_origin, page_path, page_fragment, referrer, data_track, element_tag, element_selector, element_selector_generalized, element_text), attrs.KEY, query.PARAM, trait, automated (true for automated visits: headless or program-driven browsers and AI agents browsing for a person; equals 'true' or 'false' only, e.g. automated equals false to count people only), or a page view's numbers: scroll_depth (how far down the page the visitor got, whole percent 0-100: 0 never scrolled, 100 the bottom) and time_on_page_seconds (active seconds on the page, 0-1800), null where no value arrived (an older tracker, a lost send), which no comparison matches. Leave out in an any group."
    • changedInput schema / properties / query / properties / series / items / properties / filters / items / properties / value / description
      Previous value: -"A plain filter's value (for matches, the pattern); required except for exists."New value: +"A plain filter's value (for matches, the pattern; for scroll_depth and time_on_page_seconds a whole number such as 75; for greater_than or less_than on attrs.KEY a plain decimal number such as 100 or 34.5); required except for exists."
    • changedInput schema / properties / query / properties / series / items / properties / measure_property / description
      Previous value: -"For sum and average only, and then required: the event detail, attrs.KEY."New value: +"For sum and average only, and then required: the event detail, attrs.KEY, or scroll_depth (average only) or time_on_page_seconds, as the query's measure_property."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true), the description explains exactly what is destroyed: a new query replaces the old one whole, measure, measure_property and series included, with the default of counting events. It also discloses the empty-string pitfall and the returned run_id, which the annotations cannot convey.

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?

The main action and the omit-keeps semantics are front-loaded, and every clause carries information. It is dense and parenthetical-heavy, which slightly impedes scanning, but nothing is 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 10-parameter mutation with no output schema, the definition covers the partial-update contract, query replacement risk, run_id lifecycle including its return value, and the test-first workflow. Nothing an agent needs to call it correctly 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?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning on top by clarifying that visualization is part of the query replacement and that 'number' means a single value, and that omitting run_id is not the same as passing an empty string.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource plus the exact mutable facets: title, query (with visualization), and position. The clause 'what you omit stays' distinguishes it as a partial update, so it reads clearly against add_widget/remove_widget even though those siblings are not named outright.

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 concrete when-to guidance: test a new query with run_insights_query first, and pass run_id from start_setup_run to make the change undoable, or omit it (never "") to start a new chat run. It does not say when to prefer this over add_widget or remove_widget, so it falls short of fully explicit alternative routing.

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