Skip to main content
Glama

Create Widget Metric

create_widget_metric

Create a Lock Screen Widget metric: a named value, such as monthly revenue or deploy success rate, that the user can show in an ActivitySmith widget on their iPhone or iPad Lock Screen. Create each metric once, then send values with set_widget_metric_value using the same key. To change the label or format later, use update_widget_metric. The new metric has no value yet, and nothing changes on the Lock Screen until the user adds a widget for it. Fails if the key already exists in the account. Returns the created metric, including its public_id.

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.
formatNoHow 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).number
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.8/5.0
Behavior5/5

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

Annotations only establish that this is a non-read-only, non-destructive, closed-world write. The description adds what the annotations cannot: the duplicate-key failure mode, the postcondition that the new metric has no value and nothing appears on the Lock Screen until a widget is added, and that the response includes public_id. That is meaningful behavioral context beyond structured fields.

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 the purpose, then routing, then semantics, then failure mode and return value in descending priority. Five sentences where none is filler, though 'Create each metric once' partially duplicates the later 'Fails if the key already exists,' a small overlap.

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 6-parameter create tool with full enum/default coverage, an output schema, and sibling routing, the description covers what the schema cannot: lifecycle, idempotency failure, and side-effect timing. Nothing needed to invoke it correctly is missing, and return values are additionally summarized despite the output schema.

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 description coverage is 100% with enums and defaults, so the baseline is 3; the description earns an extra point by tying the key parameter to its cross-tool contract ('using the same key' shared with set_widget_metric_value) and by identifying label/format as the mutable fields via update_widget_metric.

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 ('Create a Lock Screen Widget metric') and then defines the concept concretely ('a named value ... shown in an ActivitySmith widget on their iPhone or iPad Lock Screen'). It explicitly distinguishes itself from the two closest siblings, set_widget_metric_value and update_widget_metric, so an agent can pick correctly without opening the schema.

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?

Gives explicit routing: create each metric once, then use set_widget_metric_value with the same key to send values, and use update_widget_metric to change label or format. It also states the creation precondition (fails if the key already exists), which is the when-not condition.

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