Skip to main content
Glama

Update calculated metric widget

update_calculated_metric_widget

Point a Calculated Metric widget at a saved formula. Ids come from list_calculated_metrics. The series is re-fetched in the background — call get_widget_data with this id to read the numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWidget ID (from list_widgets).
nameNoDisplay name.
chartNoChart type.
dimensionNoTime dimension to trend by. A formula is evaluated over the report's date range, so this is what makes it a series rather than a single number.
calculated_metric_idNoCalculated metric id (from list_calculated_metrics).
calculated_metric_nameNoThe metric's name (from the same list) — labels the series, and names the widget while the name is still auto-generated.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe widget as saved, now pointed at that formula. 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 widget as saved, now pointed at that formula. 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.2/5.0
Behavior4/5

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

Beyond the minimal annotations (readOnlyHint false, destructiveHint false), the description discloses that the series is re-fetched in the background and that you must call get_widget_data to see the results. This adds useful behavioral context about asynchrony and the need for a separate read call.

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?

Two sentences with no filler. The core purpose is front-loaded, and the behavioral note is concise. Every word earns its place.

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?

The description covers the essential steps: what the tool does, where to get the required IDs, and what to do afterward. An output schema exists, so return values don't need explanation. Minor gap: it doesn't explicitly note that this updates an existing widget (only the name implies it), but overall it's sufficiently complete.

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 100%, and the schema already explains each parameter (including that calculated_metric_id comes from list_calculated_metrics). The description adds little new parameter-level detail; it only reinforces the source of IDs, which is already in the schema.

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 states a specific verb ('point') and resource ('Calculated Metric widget') plus the target ('a saved formula'), clearly distinguishing it from sibling update_*_widget tools. It also names the ID source (list_calculated_metrics), leaving no ambiguity about what the tool does.

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 gives a clear context for using the tool: IDs come from list_calculated_metrics, and after the update you should call get_widget_data to read the refreshed numbers. It does not explicitly contrast with add_calculated_metric_widget or other alternatives, but the purpose is distinct enough that the guidance is adequate.

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