Skip to main content
Glama

Update Widget Metric

update_widget_metric
DestructiveIdempotent

Change an existing Lock Screen Widget metric's definition: key, label, format, currency, or unit. All definition fields are replaced, so send the current values (from list_widget_metrics) for anything you want to keep. To record a new value, use set_widget_metric_value instead. Side effects: a new key breaks scripts, SDK calls, and agents that still send values with the old key, and switching between the string format and a numeric format clears the latest value. Widgets show the change on their next refresh, about every 15 minutes. Fails if another metric already uses the key. Returns the updated metric.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesStable identifier that set_widget_metric_value, the REST API, and the SDKs use to send values. 1-64 lowercase letters, numbers, dots, underscores, or dashes, starting with a letter or number (uppercase is lowercased). Examples: mrr, deploy.success_rate.
unitNoUnit suffix for the unit format, up to 16 characters, such as ms, users, or GB. Ignored for other formats.
labelYesName shown on the widget, up to 80 characters. Examples: MRR, Deploy success.
formatYesHow the widget displays the value: number (1,234), currency (requires currency_code, shows $1,234), percent (send 99.9 to show 99.9%), unit (a number with a unit suffix, such as 120 ms), or string (text up to 64 characters).
public_idYesThe metric's public_id, from list_widget_metrics or create_widget_metric.
unit_spacingNoFor the unit format only: none shows 120ms, space shows 120 ms. Ignored for other formats.none
currency_codeNo3-letter ISO 4217 currency code, such as USD or EUR. Required when format is currency, ignored otherwise.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructive and idempotent, but the description goes well beyond them: full-replace semantics, the concrete breakage caused by a new key (scripts, SDK calls, agents), the latest-value purge when switching string/numeric formats, the ~15-minute refresh delay, and the duplicate-key failure. This is exactly the destructive-behavior context 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the operation, then the destructive mechanics, then routing, then side effects and failure modes. Every sentence carries distinct information with no padding.

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 destructive, multi-param mutation tool this is complete: it covers replace semantics, recovery via list_widget_metrics, sibling routing, side effects, timing, and failure conditions, and an output schema plus the closing 'Returns the updated metric' handles the return value.

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, but the description adds cross-field semantics the schema does not: that required fields must carry current values or they are silently dropped, and that key changes break downstream consumers. It does not restate format/currency_code interlock details, which the schema already covers.

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+resource ('Change an existing Lock Screen Widget metric's definition') and enumerates the mutable fields (key, label, format, currency, unit). It explicitly names the sibling it is not (set_widget_metric_value) and distinguishes recording a value from editing the definition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly routes the agent: use set_widget_metric_value to record a value, and pull current values from list_widget_metrics before saving. It also states the pre-condition (all fields replaced) that determines whether the agent must first fetch existing state.

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