Skip to main content
Glama

Update Saved Algorithm

update_algo

Update a saved algorithm owned by the user (and sync any linked instances). Only supplied fields change. Accepts strategy updates via strategy_params OR flat top-level fields (indicators, buy_conditions, sell_conditions, buy_exit_conditions, sell_exit_conditions, stop_loss_percentage, take_profit_percentage, etc.).

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": {
      "algo_id": "<algo_id>"
    },
    "name": "update_algo"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional new algorithm name.
algo_idYesSaved algorithm ID from list_my_algos.
symbolsNoOptional replacement symbols.
timeframeNoOptional timeframe such as 1m, 5m, 15m, 30m, 1h, 4h, or 1d.
indicatorsNoOptional top-level indicators list or comma-separated shorthand string (e.g. 'EMA(9), EMA(21), EMA(50), RSI(14), ADX(14), VWAP, MACD(12,26,9), BB(20,2), STOCH(14,3), ATR(14), SUPERTREND(10,3)'). Also auto-extracted from buy_conditions / sell_conditions.
asset_classNoOptional asset class: Stocks | Stock Options | Futures | Futures Options | Forex | Crypto Spot | Crypto Futures.
descriptionNoOptional new description.
option_typeNoFor Stock Options / Futures Options: Call | Put | Both (Both buys Call on LONG signal, Put on SHORT signal).
max_drawdownNoOptional top-level max drawdown % (0.5 to 100.0).
strategy_typeNoOptional top-level strategy type (CUSTOM, MA_CROSSOVER, RSI_OVERSOLD_OVERBOUGHT, MACD, BOLLINGER_BANDS) if not inside strategy_params.
buy_conditionsNoOptional top-level LONG entry conditions (ANDed). Accepts condition dicts or shorthand strings such as ['Price > EMA(50)', 'EMA(9) crosses above EMA(21)', 'RSI(14) < 40', 'ADX(14) > 20'] or 'Price > EMA(50) AND EMA(9) crosses above EMA(21)'.
risk_percentageNoOptional top-level risk % per trade (0.1 to 100.0).
sell_conditionsNoOptional top-level SHORT entry conditions (ANDed; opens a short, does not close a long). Accepts condition dicts or shorthand strings such as ['Price < EMA(50)', 'EMA(9) crosses below EMA(21)'].
strategy_paramsNoFull strategy block (accepts nested object OR JSON string, or you can pass flat top-level fields on create_algo): { strategy_type: 'RSI_OVERSOLD_OVERBOUGHT' | 'MA_CROSSOVER' | 'MACD' | 'BOLLINGER_BANDS' | 'CUSTOM', indicators: [{type: 'SMA'|'EMA'|'WMA'|'LWMA'|'SMMA'|'VWMA'|'DEMA'|'TEMA'|'HMA'|'KAMA'|'RSI'|'MACD'|'Bollinger Bands'|'VWAP'|'ADX'|'STOCH'|'ATR'|'CCI'|'WILLR'|'MFI'|'OBV'|'ROC'|'KC'|'DC'|'ICHIMOKU'|'PSAR'|'SUPERTREND', period?: number}], entryConditions: { buyConditions: [{indicator1: {type, period, component?}, relationship: 'Crosses above'|'Crosses below'|'Is above'|'Is below'|'Is equal to', indicator2: {type, period, component?} OR {type: 'Value', value: 30}}], sellConditions: [...] }, exitConditions: {buyExitConditions: [...], sellExitConditions: [...]} (optional), risk: {stopLossPercentage, takeProfitPercentage, riskPercentage, maxDrawdown, trailingStopEnabled, trailingStopAmount, allowPyramiding, maxPyramidPositions}, closeOnBiasFlip: boolean (optional) }. buyConditions open a LONG; sellConditions open a SHORT (they do NOT close a long — use exitConditions.buyExitConditions to close longs). Entry conditions are ANDed; exit conditions are ORed. MACD operands take component 'line'|'signal'|'hist'; Bollinger/KC/DC operands take component 'upper'|'middle'|'lower'; ADX takes 'adx'|'plus_di'|'minus_di'; STOCH takes 'k'|'d'; Ichimoku takes 'tenkan'|'kijun'|'senkou_a'|'senkou_b'. Use {type: 'Price'} for the bar close (or priceType 'open'|'high'|'low'|'hl2'|'hlc3'|'ohlc4'). At least one of buyConditions or sellConditions must be non-empty. movingAverages is accepted as an alias for indicators. Shorthand strings like 'EMA(9) crosses above EMA(21)' or 'RSI(14) < 30' are also accepted. Example indicator sets (do not default to one): RSI period 14; SMA 50+200; EMA 12+26; MACD; Bollinger length 20; ADX 14; VWAP; Stochastic 14. Never invent EMA 9/21 when unspecified.
trade_directionNoOptional trade direction: Both | Long Only | Short Only.
allow_pyramidingNoOptional top-level pyramiding toggle.
option_moneynessNoFor Stock Options / Futures Options: ATM (default) | ITM | OTM.
close_on_bias_flipNoOptional top-level close-on-bias-flip toggle.
contract_selectionNoFor Futures: Front Month (default) | Next Month | Highest Volume | Specific Code.
days_to_expirationNoFor Stock Options / Futures Options: target DTE in days (default 30).
buy_exit_conditionsNoOptional top-level LONG exit conditions (ORed: any met condition closes an open LONG).
contracts_per_tradeNoFor Futures / Stock Options / Futures Options: whole number of contracts per trade (default 1).
sell_exit_conditionsNoOptional top-level SHORT exit conditions (ORed: any met condition closes an open SHORT).
stop_loss_percentageNoOptional top-level stop loss % (0.1 to 50.0).
trailing_stop_amountNoOptional top-level trailing stop % (0.1 to 50.0).
max_pyramid_positionsNoOptional top-level max pyramid positions.
trailing_stop_enabledNoOptional top-level trailing stop toggle.
max_price_per_contractNoFor Stock Options / Futures Options: max option premium per contract ($).
take_profit_percentageNoOptional top-level take profit % (0.1 to 100.0).
strike_selection_methodNoFor Stock Options / Futures Options: Closest ATM | Percentage ITM | Percentage OTM | Delta Based.

Output Schema

NameRequiredDescriptionDefault
errorNo
messageNo
successNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed30 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +true
    • addedInput schema / properties / allow_pyramiding
      Added value: +{
      +  "description": "Optional top-level pyramiding toggle.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / asset_class
      Added value: +{
      +  "description": "Optional asset class: Stocks | Stock Options | Futures | Futures Options | Forex | Crypto Spot | Crypto Futures.",
      +  "type": "string"
      +}
    • addedInput schema / properties / buy_conditions
      Added value: +{
      +  "description": "Optional top-level LONG entry conditions (ANDed). Accepts condition dicts or shorthand strings such as ['Price > EMA(50)', 'EMA(9) crosses above EMA(21)', 'RSI(14) < 40', 'ADX(14) > 20'] or 'Price > EMA(50) AND EMA(9) crosses above EMA(21)'.",
      +  "items": {
      +    "type": [
      +      "object",
      +      "string"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / buy_exit_conditions
      Added value: +{
      +  "description": "Optional top-level LONG exit conditions (ORed: any met condition closes an open LONG).",
      +  "items": {
      +    "type": [
      +      "object",
      +      "string"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / close_on_bias_flip
      Added value: +{
      +  "description": "Optional top-level close-on-bias-flip toggle.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / contract_selection
      Added value: +{
      +  "description": "For Futures: Front Month (default) | Next Month | Highest Volume | Specific Code.",
      +  "type": "string"
      +}
    • addedInput schema / properties / contracts_per_trade
      Added value: +{
      +  "description": "For Futures / Stock Options / Futures Options: whole number of contracts per trade (default 1).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / days_to_expiration
      Added value: +{
      +  "description": "For Stock Options / Futures Options: target DTE in days (default 30).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / indicators
      Added value: +{
      +  "description": "Optional top-level indicators list or comma-separated shorthand string (e.g. 'EMA(9), EMA(21), EMA(50), RSI(14), ADX(14), VWAP, MACD(12,26,9), BB(20,2), STOCH(14,3), ATR(14), SUPERTREND(10,3)'). Also auto-extracted from buy_conditions / sell_conditions.",
      +  "items": {
      +    "type": [
      +      "object",
      +      "string"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / max_drawdown
      Added value: +{
      +  "description": "Optional top-level max drawdown % (0.5 to 100.0).",
      +  "type": "number"
      +}
    • addedInput schema / properties / max_price_per_contract
      Added value: +{
      +  "description": "For Stock Options / Futures Options: max option premium per contract ($).",
      +  "type": "number"
      +}
    • addedInput schema / properties / max_pyramid_positions
      Added value: +{
      +  "description": "Optional top-level max pyramid positions.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / option_moneyness
      Added value: +{
      +  "description": "For Stock Options / Futures Options: ATM (default) | ITM | OTM.",
      +  "type": "string"
      +}
    • addedInput schema / properties / option_type
      Added value: +{
      +  "description": "For Stock Options / Futures Options: Call | Put | Both (Both buys Call on LONG signal, Put on SHORT signal).",
      +  "type": "string"
      +}
    • addedInput schema / properties / risk_percentage
      Added value: +{
      +  "description": "Optional top-level risk % per trade (0.1 to 100.0).",
      +  "type": "number"
      +}
    • addedInput schema / properties / sell_conditions
      Added value: +{
      +  "description": "Optional top-level SHORT entry conditions (ANDed; opens a short, does not close a long). Accepts condition dicts or shorthand strings such as ['Price < EMA(50)', 'EMA(9) crosses below EMA(21)'].",
      +  "items": {
      +    "type": [
      +      "object",
      +      "string"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / sell_exit_conditions
      Added value: +{
      +  "description": "Optional top-level SHORT exit conditions (ORed: any met condition closes an open SHORT).",
      +  "items": {
      +    "type": [
      +      "object",
      +      "string"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / stop_loss_percentage
      Added value: +{
      +  "description": "Optional top-level stop loss % (0.1 to 50.0).",
      +  "type": "number"
      +}
    • addedInput schema / properties / strategy_params / additionalProperties
      Added value: +true
    • changedInput schema / properties / strategy_params / description
      Previous value: -"Optional replacement strategy parameters."New value: +"Full strategy block (accepts nested object OR JSON string, or you can pass flat top-level fields on create_algo): { strategy_type: 'RSI_OVERSOLD_OVERBOUGHT' | 'MA_CROSSOVER' | 'MACD' | 'BOLLINGER_BANDS' | 'CUSTOM', indicators: [{type: 'SMA'|'EMA'|'WMA'|'LWMA'|'SMMA'|'VWMA'|'DEMA'|'TEMA'|'HMA'|'KAMA'|'RSI'|'MACD'|'Bollinger Bands'|'VWAP'|'ADX'|'STOCH'|'ATR'|'CCI'|'WILLR'|'MFI'|'OBV'|'ROC'|'KC'|'DC'|'ICHIMOKU'|'PSAR'|'SUPERTREND', period?: number}], entryConditions: { buyConditions: [{indicator1: {type, period, component?}, relationship: 'Crosses above'|'Crosses below'|'Is above'|'Is below'|'Is equal to', indicator2: {type, period, component?} OR {type: 'Value', value: 30}}], sellConditions: [...] }, exitConditions: {buyExitConditions: [...], sellExitConditions: [...]} (optional), risk: {stopLossPercentage, takeProfitPercentage, riskPercentage, maxDrawdown, trailingStopEnabled, trailingStopAmount, allowPyramiding, maxPyramidPositions}, closeOnBiasFlip: boolean (optional) }. buyConditions open a LONG; sellConditions open a SHORT (they do NOT close a long — use exitConditions.buyExitConditions to close longs). Entry conditions are ANDed; exit conditions are ORed. MACD operands take component 'line'|'signal'|'hist'; Bollinger/KC/DC operands take component 'upper'|'middle'|'lower'; ADX takes 'adx'|'plus_di'|'minus_di'; STOCH takes 'k'|'d'; Ichimoku takes 'tenkan'|'kijun'|'senkou_a'|'senkou_b'. Use {type: 'Price'} for the bar close (or priceType 'open'|'high'|'low'|'hl2'|'hlc3'|'ohlc4'). At least one of buyConditions or sellConditions must be non-empty. movingAverages is accepted as an alias for indicators. Shorthand strings like 'EMA(9) crosses above EMA(21)' or 'RSI(14) < 30' are also accepted. Example indicator sets (do not default to one): RSI period 14; SMA 50+200; EMA 12+26; MACD; Bollinger length 20; ADX 14; VWAP; Stochastic 14. Never invent EMA 9/21 when unspecified."
    • addedInput schema / properties / strategy_params / properties
      Added value: +{
      +  "allowedTradeDirections": {
      +    "description": "Both | Long Only | Short Only",
      +    "type": "string"
      +  },
      +  "closeOnBiasFlip": {
      +    "description": "Close open position when market bias flips to the opposite side.",
      +    "type": "boolean"
      +  },
      +  "entryConditions": {
      +    "additionalProperties": true,
      +    "description": "Nested object with buyConditions and sellConditions lists (each list is ANDed).",
      +    "properties": {
      +      "buyConditions": {
      +        "description": "Conditions that must ALL hold to open a LONG position. Accepts condition objects OR shorthand strings like 'EMA(9) crosses above EMA(21)', 'Price > EMA(50)', 'RSI(14) < 30', 'ADX(14) > 25'.",
      +        "items": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "indicator1": {
      +              "additionalProperties": true,
      +              "description": "Left-hand indicator or {type: 'Price'}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "indicator2": {
      +              "additionalProperties": true,
      +              "description": "Right-hand indicator, or {type: 'Value', value: N}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "relationship": {
      +              "description": "Crosses above | Crosses below | Is above | Is below | Is equal to",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "sellConditions": {
      +        "description": "Conditions that must ALL hold to open a SHORT position (not to close a long). Accepts condition objects OR shorthand strings like 'EMA(9) crosses above EMA(21)', 'Price > EMA(50)', 'RSI(14) < 30', 'ADX(14) > 25'.",
      +        "items": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "indicator1": {
      +              "additionalProperties": true,
      +              "description": "Left-hand indicator or {type: 'Price'}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "indicator2": {
      +              "additionalProperties": true,
      +              "description": "Right-hand indicator, or {type: 'Value', value: N}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "relationship": {
      +              "description": "Crosses above | Crosses below | Is above | Is below | Is equal to",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "exitConditions": {
      +    "additionalProperties": true,
      +    "description": "Optional indicator exits (each list is ORed: any met condition closes).",
      +    "properties": {
      +      "buyExitConditions": {
      +        "description": "Close an open LONG when ANY of these holds. Accepts condition objects OR shorthand strings like 'EMA(9) crosses above EMA(21)', 'Price > EMA(50)', 'RSI(14) < 30', 'ADX(14) > 25'.",
      +        "items": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "indicator1": {
      +              "additionalProperties": true,
      +              "description": "Left-hand indicator or {type: 'Price'}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "indicator2": {
      +              "additionalProperties": true,
      +              "description": "Right-hand indicator, or {type: 'Value', value: N}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "relationship": {
      +              "description": "Crosses above | Crosses below | Is above | Is below | Is equal to",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "sellExitConditions": {
      +        "description": "Close an open SHORT when ANY of these holds. Accepts condition objects OR shorthand strings like 'EMA(9) crosses above EMA(21)', 'Price > EMA(50)', 'RSI(14) < 30', 'ADX(14) > 25'.",
      +        "items": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "indicator1": {
      +              "additionalProperties": true,
      +              "description": "Left-hand indicator or {type: 'Price'}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "indicator2": {
      +              "additionalProperties": true,
      +              "description": "Right-hand indicator, or {type: 'Value', value: N}.",
      +              "properties": {
      +                "component": {
      +                  "description": "MACD: line|signal|hist. Bollinger/KC/DC: upper|middle|lower. RSI/STOCH: line|overbought|oversold (or k|d for STOCH). ADX: adx|plus_di|minus_di. Ichimoku: tenkan|kijun|senkou_a|senkou_b.",
      +                  "type": "string"
      +                },
      +                "fastPeriod": {
      +                  "description": "MACD fast period (default 12).",
      +                  "type": "integer"
      +                },
      +                "length": {
      +                  "description": "Alias for period.",
      +                  "type": "integer"
      +                },
      +                "multiplier": {
      +                  "description": "SuperTrend ATR multiplier (default 3.0).",
      +                  "type": "number"
      +                },
      +                "period": {
      +                  "description": "Indicator period/length (optional when default applies, e.g. RSI/ADX/ATR/STOCH=14, BB/CCI=20, MACD=12, VWAP=0).",
      +                  "type": "integer"
      +                },
      +                "priceType": {
      +                  "description": "close (default) | open | high | low | volume | hl2 | hlc3 | ohlc4",
      +                  "type": "string"
      +                },
      +                "shift": {
      +                  "description": "Bar offset/lookback (0 = current bar, 1 = previous bar).",
      +                  "type": "integer"
      +                },
      +                "signalPeriod": {
      +                  "description": "MACD signal period (default 9).",
      +                  "type": "integer"
      +                },
      +                "slowPeriod": {
      +                  "description": "MACD slow period (default 26).",
      +                  "type": "integer"
      +                },
      +                "smoothWindow": {
      +                  "description": "Stochastic %D smoothing window (default 3).",
      +                  "type": "integer"
      +                },
      +                "stdDev": {
      +                  "description": "Bollinger Bands stdDev (default 2.0).",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value",
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "description": "Fixed level when type is 'Value' (e.g. RSI below 30 -> 30).",
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "relationship": {
      +              "description": "Crosses above | Crosses below | Is above | Is below | Is equal to",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "indicators": {
      +    "description": "List of technical indicators. movingAverages accepted as alias; also auto-inferred from conditions if omitted. Supported types: SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value. Examples: RSI 14; SMA 50 and 200; EMA 12 and 26; MACD; Bollinger 20; ADX 14; VWAP; STOCH 14; ATR 14; SUPERTREND 10. Do not invent EMA 9/21.",
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "fastPeriod": {
      +          "description": "MACD fast period (default 12).",
      +          "type": "integer"
      +        },
      +        "length": {
      +          "description": "Alias for period.",
      +          "type": "integer"
      +        },
      +        "multiplier": {
      +          "description": "SuperTrend ATR multiplier (default 3.0).",
      +          "type": "number"
      +        },
      +        "overbought": {
      +          "description": "Optional overbought level (default 70 for RSI, 80 for STOCH).",
      +          "type": "number"
      +        },
      +        "oversold": {
      +          "description": "Optional oversold level (default 30 for RSI, 20 for STOCH).",
      +          "type": "number"
      +        },
      +        "period": {
      +          "description": "Period length (e.g., 14 for RSI/ADX/ATR/STOCH; 20 for BB/CCI; 50/200 SMA; 0 for session VWAP)",
      +          "type": "integer"
      +        },
      +        "priceType": {
      +          "description": "close (default) | open | high | low | hl2 | hlc3 | ohlc4",
      +          "type": "string"
      +        },
      +        "shift": {
      +          "description": "Optional bar shift (default 0).",
      +          "type": "integer"
      +        },
      +        "signalPeriod": {
      +          "description": "MACD signal period (default 9).",
      +          "type": "integer"
      +        },
      +        "slowPeriod": {
      +          "description": "MACD slow period (default 26).",
      +          "type": "integer"
      +        },
      +        "smoothWindow": {
      +          "description": "Stochastic %D smoothing period (default 3).",
      +          "type": "integer"
      +        },
      +        "stdDev": {
      +          "description": "Bollinger Bands standard deviation (default 2.0).",
      +          "type": "number"
      +        },
      +        "type": {
      +          "description": "Indicator type (SMA | EMA | WMA | LWMA | SMMA | VWMA | DEMA | TEMA | HMA | KAMA | RSI | MACD | Bollinger Bands | BB | VWAP | ADX | STOCH | ATR | CCI | WILLR | MFI | OBV | ROC | KC | DC | ICHIMOKU | PSAR | SUPERTREND | Price | Value)",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "risk": {
      +    "additionalProperties": true,
      +    "description": "Risk & position management settings.",
      +    "properties": {
      +      "allowPyramiding": {
      +        "description": "Allow multiple entries in the same direction.",
      +        "type": "boolean"
      +      },
      +      "capitalAllocation": {
      +        "description": "Default USD capital allocation.",
      +        "type": "number"
      +      },
      +      "maxDrawdown": {
      +        "description": "0.5 to 100.0",
      +        "type": "number"
      +      },
      +      "maxPyramidPositions": {
      +        "description": "Max pyramid positions (default 3).",
      +        "type": "integer"
      +      },
      +      "riskPercentage": {
      +        "description": "0.1 to 100.0",
      +        "type": "number"
      +      },
      +      "stopLossPercentage": {
      +        "description": "0.1 to 50.0",
      +        "type": "number"
      +      },
      +      "takeProfitPercentage": {
      +        "description": "0.1 to 100.0",
      +        "type": "number"
      +      },
      +      "trailingStopAmount": {
      +        "description": "Trailing stop percentage (0.1 to 50.0).",
      +        "type": "number"
      +      },
      +      "trailingStopEnabled": {
      +        "description": "Enable trailing stop.",
      +        "type": "boolean"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "strategy_type": {
      +    "description": "Strategy type matching the user's chosen indicators (RSI_OVERSOLD_OVERBOUGHT, MA_CROSSOVER, MACD, BOLLINGER_BANDS, CUSTOM). No default — set from the specified strategy; do not invent MA_CROSSOVER.",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / strategy_params / required
      Added value: +[
      +  "strategy_type",
      +  "indicators"
      +]
    • addedInput schema / properties / strategy_type
      Added value: +{
      +  "description": "Optional top-level strategy type (CUSTOM, MA_CROSSOVER, RSI_OVERSOLD_OVERBOUGHT, MACD, BOLLINGER_BANDS) if not inside strategy_params.",
      +  "type": "string"
      +}
    • addedInput schema / properties / strike_selection_method
      Added value: +{
      +  "description": "For Stock Options / Futures Options: Closest ATM | Percentage ITM | Percentage OTM | Delta Based.",
      +  "type": "string"
      +}
    • addedInput schema / properties / take_profit_percentage
      Added value: +{
      +  "description": "Optional top-level take profit % (0.1 to 100.0).",
      +  "type": "number"
      +}
    • changedInput schema / properties / timeframe / description
      Previous value: -"Optional timeframe such as 1m, 1h, or 1d."New value: +"Optional timeframe such as 1m, 5m, 15m, 30m, 1h, 4h, or 1d."
    • addedInput schema / properties / trade_direction
      Added value: +{
      +  "description": "Optional trade direction: Both | Long Only | Short Only.",
      +  "type": "string"
      +}
    • addedInput schema / properties / trailing_stop_amount
      Added value: +{
      +  "description": "Optional top-level trailing stop % (0.1 to 50.0).",
      +  "type": "number"
      +}
    • addedInput schema / properties / trailing_stop_enabled
      Added value: +{
      +  "description": "Optional top-level trailing stop toggle.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changed
    • changedOutput schema / description
      Previous value: -"Structured Gogi result. Error responses include error and message fields."New value: +"Structured result. Error responses include error and message."
    • addedOutput schema / properties
      Added value: +{
      +  "error": {
      +    "type": "string"
      +  },
      +  "message": {
      +    "type": "string"
      +  },
      +  "success": {
      +    "type": "boolean"
      +  }
      +}
  3. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-idempotent, non-destructive mutation, so the safety profile is covered. The description adds context that annotations cannot express: the update cascades to linked instances, and unspecified fields are left untouched. It still omits whether changing strategy fields affects running instances or open positions, and what failure modes occur.

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?

Three sentences, front-loaded with the action and the key partial-update constraint before the input-form detail. The parenthetical field list is a mild duplication of schema content but is short enough not to bloat the description.

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

Completeness3/5

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

With an output schema present and 100% schema coverage, return values and per-field detail need not be repeated, so the description covers the essentials. For a 30-parameter mutation tool with cascading side effects it is still thin on what the linked-instance sync actually does and on validation failure behavior.

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 per-field meaning is already handled, giving a baseline of 3. The description earns the extra point by stating the equivalence between the nested strategy_params object and the flat top-level fields (indicators, buy_conditions, sell_conditions, exit conditions, risk fields) — a cross-parameter relationship the schema cannot convey on its own.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Update a saved algorithm") and adds ownership scope ("owned by the user") plus a side effect ("sync any linked instances"). It does not explicitly distinguish itself from siblings like update_linked_algo, update_instance, or create_algo, but the resource and ownership qualifier are enough to select it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the partial-update contract ("Only supplied fields change") and explains that strategy data can be sent either via strategy_params or flat top-level fields, which is practical guidance for choosing an input form. However, it never states preconditions (the algo must already exist and be listed via list_my_algos) or when to prefer this over update_linked_algo/update_instance.

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