Skip to main content
Glama

command

Read-onlyIdempotent

Build an Autoview alert command string from structured order fields (symbol, side, quantity, type, price, trigger), or from ONE line of the Autoview trade language (line, e.g. "buy(BTCUSD, 0.2, -0.5%)"; grammar in catalog's language card), without placing an order. A line reply also carries echo, one plain sentence stating the resolved order: confirm the sentence, not the string: the output is the alert body any webhook sender POSTs to a hook URL (for TradingView, the value create_alert's message field carries). Also builds cancel/close/flat management commands via action (see entry's description). Dry-run by default: a bare call returns a preview command (appends d=1); set live:true to build a command that trades for real once the alert fires. Pass the alert field instead to check and return raw webhook command text with any key a webhook accepts. Prefer the alert tool if you also need the destination webhook, expiration, and resolution in one call. Requires your Autoview account token; live:true requires a live-scoped token. exchange is optional: pass any exchange id configured on Autoview (see the catalog tool; a bracket is refused if that exchange lists sl/tp as unsupported); omit exchange entirely to build a generic command routed by whichever exchange(s) the destination hook is linked to.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "command"
  }
}

Input Schema

NameRequiredDescriptionDefault
lineNoone line of the Autoview trade language instead of the structured fields below, e.g. buy(BTCUSD, 0.2), buy(BTCUSD, 0.2, -0.5%), sell(BTCUSD, 0.2, stop(78000)), close(BTCUSD), link(buy(BTCUSD, 0.2, market), takeProfit(+500), stopLoss(-300)), link(buy(BTCUSD, 0.2, market), takeProfit(+5%), stopLoss(-3%)). Slots are symbol, size, price; a signed price is an offset from the ticker, an unsigned one is absolute; no type word = limit at the ticker; no key=value. Full card: catalog's language field. Do not combine with symbol/side/quantity/type/price/trigger/brackets.
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 returned as-is (with d=1 leading each line unless live is true). Do not combine with line or 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, or the exchange-native symbol a TradingView EXCHANGE:TICKER maps to. Required unless line or alert is set
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; omit entirely to skip that check
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
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. Changed1 schema field changed
    • changedInput schema / properties / exchange / enum
      Previous 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"
      -]New value: +[
      +  "ALPACA",
      +  "ALPACAPAPER",
      +  "BINANCE",
      +  "BINANCEDELIVERY",
      +  "BINANCEDELIVERYTESTNET",
      +  "BINANCEFUTURES",
      +  "BINANCEFUTURESTESTNET",
      +  "BINANCETEST",
      +  "BINANCEUS",
      +  "BITMEX",
      +  "BITMEXTESTNET",
      +  "BITFINEX",
      +  "BITGET",
      +  "BITGETDEMO",
      +  "BITGETMIX",
      +  "BITGETMIXCOPY",
      +  "BITGETMIXDEMO",
      +  "BYBIT",
      +  "BYBITCOPY",
      +  "BYBITCOPYTESTNET",
      +  "BYBITEU",
      +  "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"
      +]
  2. Changed2 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 returned as-is (with d=1 leading each line unless live is true). Do not combine with line or the structured order fields.",
      +  "type": "string"
      +}
    • changedInput schema / properties / symbol / description
      Previous value: -"the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD, or the exchange-native symbol a TradingView EXCHANGE:TICKER maps to. Required unless line is set"New value: +"the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD, or the exchange-native symbol a TradingView EXCHANGE:TICKER maps to. Required unless line or alert is set"
  3. Changed13 schema fields changed
    • addedInput schema / properties / line
      Added value: +{
      +  "description": "one line of the Autoview trade language instead of the structured fields below, e.g. buy(BTCUSD, 0.2), buy(BTCUSD, 0.2, -0.5%), sell(BTCUSD, 0.2, stop(78000)), close(BTCUSD), link(buy(BTCUSD, 0.2, market), takeProfit(+500), stopLoss(-300)), link(buy(BTCUSD, 0.2, market), takeProfit(+5%), stopLoss(-3%)). Slots are symbol, size, price; a signed price is an offset from the ticker, an unsigned one is absolute; no type word = limit at the ticker; no key=value. Full card: catalog's language field. Do not combine with symbol/side/quantity/type/price/trigger/brackets.",
      +  "type": "string"
      +}
    • 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"
    • changedInput schema / properties / symbol / description
      Previous value: -"the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD — or the exchange-native symbol a TradingView EXCHANGE:TICKER maps to"New value: +"the instrument symbol, e.g. EUR_USD, XBTUSD, BTC_USD, or the exchange-native symbol a TradingView EXCHANGE:TICKER maps to. Required unless line is set"
    • 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."
    • removedInput schema / required
      Removed value: -[
      -  "symbol"
      -]
  4. 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; omit entirely to skip validation"New value: +"optional — any exchange id known to Autoview (see `catalog`); a bracket is refused if that exchange lists its params as unsupported; omit entirely to skip that check"
    • 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"
      +]
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.