Skip to main content
Glama

Set Widget Metric Value

set_widget_metric_value

Record the latest value of a Lock Screen Widget metric, identified by its key. Use it whenever the tracked number or text changes, such as new revenue, signups, or uptime. The value replaces the previous one. Widgets on the user's Lock Screen pick it up on their next refresh, about every 15 minutes, so it is not instant; for an immediate alert, use send_push_notification. The metric must already exist (see list_widget_metrics and create_widget_metric). Each successful call counts as a billable metric update and returns a billing error when the account's trial or plan does not allow more. Returns the metric with its new latest value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey of an existing metric, as shown by list_widget_metrics. Example: mrr.
valueYesNew value. For number, currency, percent, and unit metrics, send a number; formatted text such as "$1,234.50", "99.9%", or "120ms" is also parsed. For string metrics, send text up to 64 characters.
timestampNoOptional ISO 8601 time the value was measured, such as 2026-10-18T09:00:00Z. Defaults to now.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricYes
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: replacement semantics ('the value replaces the previous one'), ~15-minute propagation latency, explicit non-instant behavior, billing semantics ('counts as a billable metric update' with a billing error path), and the returned payload. This is exactly the operational detail an agent needs for a write tool.

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?

Front-loaded with purpose and tightly organized: purpose, trigger, replacement/latency, alternative, prerequisites, billing, return. It runs long for a single paragraph, but nearly every sentence carries actionable information, so almost nothing is wasted.

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?

Given a write tool with an output schema, the description covers everything else an agent needs: prerequisites, latency expectations, an alternative for the urgency case, billing failure behavior, and confirmation that the updated metric is returned. No meaningful gap remains.

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%, so key, value, and timestamp are already well documented in the schema, including the number-vs-string value rules and the timestamp default. The description reinforces the key identification but adds no parsing or format detail beyond the schema, so baseline 3 applies.

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 precise verb and resource: 'Record the latest value of a Lock Screen Widget metric, identified by its key.' The framing (set/record a value, not create or update the metric itself) clearly distinguishes it from create_widget_metric and update_widget_metric.

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 says when to use it ('whenever the tracked number or text changes'), names the alternative for the immediate case ('for an immediate alert, use send_push_notification'), and points to prerequisites (list_widget_metrics, create_widget_metric). Both the trigger condition and the sibling routing are spelled out.

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