Skip to main content
Glama

Set usage alert

set_usage_alert
Idempotent

Optional usage alerts: set an alert webhook on your key (PUT /api/v1/usage/alert {"webhook_url"}, MCP set_usage_alert, or your human on /account) and Roster POSTs one signed usage.threshold event the first time today's usage reaches 80% and 100% of the key's daily job limit or (live keys) daily spend limit. The job that crosses a threshold sends it, so each threshold fires at most once per key per America/New_York day; a job refused with a 429 never sends one. Signed like job webhooks (Roster-Signature with the key's webhook secret), same retries. Sandbox keys get the same events for $0. Send {"webhook_url": null} to turn alerts off. GET /api/v1/usage shows the setting and today's alerts as alert. The same as PUT /api/v1/usage/alert. Returns the setting and today's alerts.

Input Schema

NameRequiredDescriptionDefault
api_keyNoYour Roster API key (rk_test_... or rk_live_...), if your client can't send it as the Authorization header. Get one with get_sandbox_key or request_access.
webhook_urlNohttps URL on a public host for signed usage.threshold events (80% and 100%), or null to turn alerts off.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: threshold-fires-once-per-key-per-America/New_York-day semantics, that a job refused with 429 never sends an event, signature scheme (Roster-Signature with the key's webhook secret) and retry behavior, sandbox key $0 events, and that the call returns the setting plus today's alerts. This is exactly the operational context annotations cannot carry.

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 action and effect, and nearly every sentence carries unique behavioral information. There is some redundancy — 'The same as PUT /api/v1/usage/alert' repeats the endpoint parenthetical from the opening line — and the single dense block is harder to scan than it needs to be.

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?

No output schema exists, and the description compensates by stating what is returned (the setting and today's alerts). With two fully documented optional parameters, an idempotent non-destructive mutation profile in the annotations, and explicit disable semantics, an agent has everything needed to call it correctly.

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 coverage is 100%, so both webhook_url and api_key are already documented in the schema, including null-to-disable and the api_key header fallback. The description restates the null behavior but adds no new syntax or constraint meaning, 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 specific verb and resource up front ('set an alert webhook on your key') and immediately scopes the effect: one signed usage.threshold event at 80% and 100% of the daily limit. It also names the read counterpart (GET /api/v1/usage) so the agent can distinguish mutating from reading tools in the sibling list.

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?

Frames the feature as optional and gives explicit operating instructions: 'Send {"webhook_url": null} to turn alerts off' and points at get_usage to inspect the current setting. It lacks an explicit statement of when to prefer set_webhook_events or test_webhook over this tool, so it stops short of full when/when-not guidance.

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