Skip to main content
Glama

alert

Read-onlyIdempotent

Build everything TradingView's create_alert(webhook, message, expiration, resolution) needs, in one call: fuses command (the message) and hooks (the webhook URL for hook_id), and fills in the expiration (default 1 year out -- TradingView itself defaults to only 30 days, which silently stops the alert) and resolution (default "1") TradingView also needs. The order is validated against the exchange(s) hook_id is actually linked to and rejected if it could never fire there. Returns warnings you should read, including never putting the hook's key in the message field and a fan-out warning when the hook links more than one exchange. Pass the alert field instead of the structured fields to use raw webhook command text with any key a webhook accepts. Dry-run by default like command; set live:true to build a command that trades for real once the alert fires. For any other sender, command + hooks give the same message and webhook URL; expiration and resolution are TradingView settings only. Requires your Autoview account token.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "hook_id": "<hook_id>"
    },
    "name": "alert"
  }
}

Input Schema

NameRequiredDescriptionDefault
liveNofalse (default) = build a dry-run preview command (appends d=1); true = build a command that places a real order when the alert fires
sideNoorder direction; required unless action is set, where it is an optional buy/sell filter for cancel/close (omit for flat)
typeNoorder type; defaults to limit at the ticker (t=limit with no price, same as a plain alert). An attached bracket needs type market explicitly.
unitNo"currency" treats quantity as a CURRENCY amount to convert to units at the resolved price (u=currency) — e.g. quantity:10 with unit:"currency" on BTC/USD buys $10 of BTC instead of 10 BTC. Only meaningful with a fixed (non-percent) quantity.
alertNothe raw command text a webhook body carries, e.g. s=BTCUSD b=buy q=0.01 fp=60000 ef=any tif=gtc; any key a webhook accepts works here, it is checked by the engine's parser and becomes the message as-is (with d=1 leading each line unless live is true). Do not combine with the structured order fields.
priceNoabsolute limit price; required for an explicit limit, post_only, ioc, fok, and stop_limit (omit type and price for a limit at the ticker)
tokenNoyour Autoview account token — an av_mcp_ personal access token, generate one at /account/tokens/ on the Autoview site. Omit this if your MCP client already sends it as an `Authorization: Bearer` header (Claude Code, Cursor, and most non-browser clients do this automatically once configured).
actionNomanage EXISTING orders/positions on symbol instead of placing a new one: cancel = cancel open orders, close = close open positions, flat = cancel every order AND close every position (Tradovate only). When set, side (if given) is an optional buy/sell filter (not applicable to flat), and quantity/type/price/trigger/brackets/unit are ignored.
symbolNothe instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD. Required unless alert is set
hook_idYesthe hook whose URL becomes the alert's webhook (see the `hooks` tool)
triggerNoabsolute trigger (stop) price; required for stop and stop_limit
exchangeNooptional — any exchange id known to Autoview (see `catalog`); a bracket is refused if that exchange lists its params as unsupported. Must be one of the exchanges hook_id is linked to (otherwise the alert is rejected); omit to validate against every exchange the hook is linked to
priceRefNoreference price for percent sizing and brackets
quantityNoorder size: a positive number (contracts/units), or a percent-of-balance string like "50%" (1-100%). Required unless action is set.
stopLossNoattached bracket stop-loss distance from the fill: points (10) or a percent string such as 3%; a sign, if given, must point the right way); pairs with takeProfit or a trail leg
trailStopNoauto-trail stop distance in points; requires trailActivate
expirationNoISO 8601 timestamp for TradingView's alert expiration; defaults to 1 year from now
resolutionNochart timeframe TradingView's create_alert needs; defaults to "1" (1 minute)
takeProfitNoattached bracket take-profit distance from the fill: points (20) or a percent string such as 5%; pairs with stopLoss or a trail leg
trailActivateNopoints of profit before the trail starts; required whenever trailStop is set
trailFrequencyNohow often the trailing stop re-checks price; defaults to 1 if omitted
sizeAgainstEquityNofor a percent quantity, size against equity instead of available balance (y=equity)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / alert
      Added value: +{
      +  "description": "the raw command text a webhook body carries, e.g. s=BTCUSD b=buy q=0.01 fp=60000 ef=any tif=gtc; any key a webhook accepts works here, it is checked by the engine's parser and becomes the message as-is (with d=1 leading each line unless live is true). Do not combine with the structured order fields.",
      +  "type": "string"
      +}
    • changedInput schema / properties / symbol / description
      Previous value: -"the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD"New value: +"the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD. Required unless alert is set"
    • changedInput schema / required
      Previous value: -[
      -  "hook_id",
      -  "symbol"
      -]New value: +[
      +  "hook_id"
      +]
  2. Changed10 schema fields changed
    • changedInput schema / properties / price / description
      Previous value: -"absolute limit price; required for limit, post_only, ioc, fok, and stop_limit"New value: +"absolute limit price; required for an explicit limit, post_only, ioc, fok, and stop_limit (omit type and price for a limit at the ticker)"
    • addedInput schema / properties / stopLoss / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / stopLoss / description
      Previous value: -"attached bracket stop-loss as a POINT distance from the fill; pairs with takeProfit or a trail leg"New value: +"attached bracket stop-loss distance from the fill: points (10) or a percent string such as 3%; a sign, if given, must point the right way); pairs with takeProfit or a trail leg"
    • removedInput schema / properties / stopLoss / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / stopLoss / type
      Removed value: -"number"
    • addedInput schema / properties / takeProfit / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / takeProfit / description
      Previous value: -"attached bracket take-profit as a POINT distance from the fill; pairs with stopLoss or a trail leg"New value: +"attached bracket take-profit distance from the fill: points (20) or a percent string such as 5%; pairs with stopLoss or a trail leg"
    • removedInput schema / properties / takeProfit / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / takeProfit / type
      Removed value: -"number"
    • changedInput schema / properties / type / description
      Previous value: -"order type; defaults to market"New value: +"order type; defaults to limit at the ticker (t=limit with no price, same as a plain alert). An attached bracket needs type market explicitly."
  3. Changed2 schema fields changed
    • changedInput schema / properties / exchange / description
      Previous value: -"optional — one of OANDAPRACTICE, KRAKEN, CRYPTO, CRYPTODEMO, BYBITTESTNET, BYBITSPOTTESTNET, TRADOVATESIM validates order-type and bracket support against that exchange's capabilities; any other exchange id known to Autoview (see `catalog`) is also accepted but skips that check. Must be one of the exchanges hook_id is linked to (otherwise the alert is rejected); omit to validate against every exchange the hook is linked to"New value: +"optional — any exchange id known to Autoview (see `catalog`); a bracket is refused if that exchange lists its params as unsupported. Must be one of the exchanges hook_id is linked to (otherwise the alert is rejected); omit to validate against every exchange the hook is linked to"
    • addedInput schema / properties / exchange / enum
      Added value: +[
      +  "ALPACA",
      +  "ALPACAPAPER",
      +  "BINANCE",
      +  "BINANCEDELIVERY",
      +  "BINANCEDELIVERYTESTNET",
      +  "BINANCEFUTURES",
      +  "BINANCEFUTURESTESTNET",
      +  "BINANCETEST",
      +  "BINANCEUS",
      +  "BITMEX",
      +  "BITMEXTESTNET",
      +  "BITFINEX",
      +  "BITGET",
      +  "BITGETDEMO",
      +  "BITGETMIX",
      +  "BITGETMIXCOPY",
      +  "BITGETMIXDEMO",
      +  "BYBIT",
      +  "BYBITCOPY",
      +  "BYBITCOPYTESTNET",
      +  "BYBITSPOT",
      +  "BYBITSPOTTESTNET",
      +  "BYBITTESTNET",
      +  "CAPITAL",
      +  "CAPITALDEMO",
      +  "CHARLESSCHWAB",
      +  "COINBASE",
      +  "CRYPTO",
      +  "CRYPTODEMO",
      +  "DERIBIT",
      +  "DERIBITTESTNET",
      +  "GATE",
      +  "GATEFUTURES",
      +  "GATEFUTURESTESTNET",
      +  "GEMINI",
      +  "GEMINISANDBOX",
      +  "HUOBI",
      +  "HUOBIFUTURES",
      +  "HUOBILINEAR",
      +  "HUOBISWAP",
      +  "HYPERLIQUID",
      +  "HYPERLIQUIDTESTNET",
      +  "KRAKEN",
      +  "KRAKENFUTURES",
      +  "KUCOIN",
      +  "KUCOINFUTURES",
      +  "KUCOINFUTURESCOPY",
      +  "OANDA",
      +  "OANDAPRACTICE",
      +  "OKX",
      +  "OKXDEMO",
      +  "OKXEEA",
      +  "OKXEEADEMO",
      +  "OKXUS",
      +  "OKXUSDEMO",
      +  "TRADESTATION",
      +  "TRADESTATIONSIM",
      +  "TRADOVATE",
      +  "TRADOVATESIM"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / exchange / description
      Previous value: -"optional — one of OANDAPRACTICE, KRAKEN, CRYPTO, CRYPTODEMO, BYBITTESTNET, BYBITSPOTTESTNET, TRADOVATESIM validates order-type and bracket support against that exchange's capabilities; any other exchange id known to Autoview (see `catalog`) is also accepted but skips that check; omit entirely to skip validation"New value: +"optional — one of OANDAPRACTICE, KRAKEN, CRYPTO, CRYPTODEMO, BYBITTESTNET, BYBITSPOTTESTNET, TRADOVATESIM validates order-type and bracket support against that exchange's capabilities; any other exchange id known to Autoview (see `catalog`) is also accepted but skips that check. Must be one of the exchanges hook_id is linked to (otherwise the alert is rejected); omit to validate against every exchange the hook is linked to"
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds real behavior: dry-run by default with `live:true` required to build a trading command, validation against the exchange(s) hook_id is linked to with outright rejection, and named warnings (never put the hook's key in the message, fan-out when a hook spans multiple exchanges). It also states the auth requirement (Autoview account token). It stops short of describing the exact shape of the returned command/preview, which keeps it below a 5.

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?

Purpose and the command+hooks fusion are front-loaded, and the alternative-sender caveat comes last where it belongs; nearly every sentence adds a distinct rule (defaults, validation, warnings, dry-run). It is dense and reads as one long block with nested asides, which costs it a point on structure rather than on wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 22-parameter tool with no output schema, the description covers the essentials an agent needs: the required mode choice, the dry-run versus live gate, default injection, exchange validation against the hook, and that warnings are returned and matter. The main residual gap is what exactly comes back (raw command string vs preview object), which matters for a build-only tool with no 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%, so the baseline is 3; the description earns above that by adding the rationale the schema lacks — TradingView's own 30-day expiration default silently stops the alert, hence the 1-year default here — and by framing `alert` versus the structured fields as a mode switch rather than a single flag. Most remaining parameter meaning is already in the schema, so it does not reach 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?

The opening clause names a concrete verb and artifact ('Build everything TradingView's create_alert needs') and immediately states the fusion of `command` (message) and `hooks` (webhook URL for hook_id), which distinguishes it from both siblings by name. An agent can tell this apart from `command` and `hooks` without opening a 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?

Explicit routing is given: use this for TradingView, and 'For any other sender, `command` + `hooks` give the same message and webhook URL; expiration and resolution are TradingView settings only.' It also states the raw-text alternative ('pass the alert field instead of the structured fields') and the dry-run default, so the when/when-not decisions are covered rather than inferred.

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.