Skip to main content
Glama

Create an alert recipe (writes to your account)

create_alert_recipe

Saves an alert recipe that fires when all specified crypto metric conditions cross thresholds, delivering via Telegram first with email fallback and waiting cooldown before repeating.

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 connection (sign-in or key) and each one is recorded on the account.

Input 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. Changed1 schema field changedv1.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv0.31.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare a non-readonly, non-idempotent write, and the description adds meaningful extra context: default delivery (Telegram first, email fallback), cooldown_hours suppressing repeat fires per symbol, per-plan recipe caps returning a limit response, and per-connection write rate limiting with each write recorded on the account.

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 'Call this when...' routing sentence and dense with useful facts, but the entire body is a single run-on paragraph mixing field enum, units, conditions, scope, plan limits, and rate limits. A little structure would make the enum list and the write-constraints easier to scan.

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-param mutation tool with no output schema, the description covers what is created, how it fires, default channels, cooldown, scope defaults, plan caps, and rate limiting. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3), but the description goes well beyond it: it enumerates all 17 valid field values that the schema only hints at with 'e.g. funding_rate_pct', and it disambiguates percent units ('0.05 means 0.05%'). It also clarifies the field/op/threshold vs conditions (max 6) alternative and the symbols-implies-scope-symbols relationship.

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 ('Saves an alert recipe on the account') and immediately frames the trigger semantics (fires when every condition holds). It is clearly separable from list_alert_recipes, delete_alert_recipe, and parse_alert_text by naming the prep-step relationship.

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 call it: the user asks to be alerted on a metric threshold AND has agreed to the exact condition, and it names parse_alert_text as the tool that produces that condition. Also states the plan-limit failure behavior, which is actionable guidance.

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