Skip to main content
Glama

Create an alert recipe (writes to your account)

create_alert_recipe

Saves an alert recipe that fires when specified metric conditions hold, delivering via Telegram or email and enforcing a cooldown before repeat alerts.

Instructions

Call this when the user asks to be alerted when a metric crosses a threshold and has agreed to the exact condition (parse_alert_text turns their words into one). Saves an alert recipe on the account: it fires when every condition holds, delivers by Telegram first with email as fallback unless channels says otherwise, and waits cooldown_hours before it fires again for the same symbol. field is one of: mark_price, pressure_score, funding_rate_pct, oi24h_pct, basis_pct, price_change_24h_pct, liq_cluster_distance_pct, usdt_peg_min_usd, usdc_peg_min_usd, liq_1h_usd, rsi_4h, ls_ratio_global, book_imbalance_2pct_pct, withdrawal_paused_venues, max_leverage_min, borrow_apr_pct, hl_whale_long_share_pct; op is one of >= > <= < ==; percent fields take percent values (0.05 means 0.05%). Pass field, op and threshold for one condition, or conditions for up to 6. scope: watchlist (default), any, or symbols with symbols. The plan sets how many recipes an account keeps; past it the tool answers with the limit. Writes are rate limited per key and each one is recorded on the account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opNostring, one condition's comparison: >= | > | <= | < | ==
nameNostring, optional name; default describes the condition
fieldNostring, one condition's metric, e.g. funding_rate_pct
scopeNostring, optional: watchlist (default), any, symbols
symbolsNoarray, optional up to 20 symbols, e.g. ["BTCUSDT", "ETH"]; implies scope symbols
channelsNoarray, optional delivery channels: telegram | email | push | webhook; empty means Telegram first, email as fallback
thresholdNonumber, one condition's threshold, e.g. 0.05
conditionsNoarray, optional up to 6 conditions {field, op, value}, all must hold (instead of field, op, threshold)
cooldown_hoursNonumber, optional 1..168 hours before it fires again (default 24)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.31.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover safety flags (not read-only, not destructive, not idempotent); the description adds genuinely new behavior — all-conditions-must-hold semantics, Telegram-first with email fallback, cooldown_hours gating per symbol, account plan recipe limits and the limit response, plus per-key write rate limiting and account auditing.

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 trigger condition, and each sentence carries information (units, limits, fallback, enums). It is dense and the long inline field enumeration makes it heavy, but nothing is 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 9-parameter, zero-required mutation tool with no output schema, the description covers trigger, condition model, delivery, cooldown, scoping, unit conventions and quota/error behavior — an agent needs nothing else to call it correctly.

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 already 100%, but the description still adds value the schema lacks: the full enumerated field list (schema only gives 'e.g. funding_rate_pct'), the op set, the percent-unit convention ('0.05 means 0.05%'), the either/or of field+op+threshold vs conditions (max 6), and the channels-empty fallback. Slight overlap with the schema's own enum docs keeps it from a perfect 5.

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?

Specific verb+resource ('Saves an alert recipe on the account') plus the exact trigger semantics — fires when every condition holds. It is clearly distinguishable from parse_alert_text, list_alert_recipes and delete_alert_recipe among the siblings.

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?

States the precondition precisely: call when the user asks to be alerted on a threshold AND has agreed to the exact condition, and explicitly routes text parsing to parse_alert_text. That is a when-to-use plus an alternative, which is the top of the range.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.