Skip to main content
Glama

Deploy Strategy (generate + backtest + go live)

one_shot
Destructive

End-to-end deploy: generate strategy → train → deploy live.

One of `prompt` (free-form NL), `preset` (curated winning strategy), or
`community_id` (copy a published community strategy) is required. If more
than one is passed, precedence is community_id > preset > prompt.

Args:
  prompt: Natural-language strategy description (e.g. "Buy when RSI < 30, sell > 70").
  symbol: Market to backtest on. One of: EURUSD, USDJPY, GBPUSD,
    USDCHF, USDCAD, AUDUSD, NZDUSD, XAUUSD, XAGUSD, BTCUSD. Default EURUSD.
  timeframe: Candle granularity. One of: 1min, 5min, 15min, 1h. Default 15min.
  claude_model: Which Claude variant writes the code: "sonnet" (default), "sonnet-haiku"
    (Sonnet writes the spec, Haiku the code) or "haiku" (faster, cheaper). Any case.
    Generation is billed from the account's credits. Ignored when `preset` is set
    (no generation needed).
  preset: Curated winning-strategy slug. Skips Claude generation entirely
    — deploys a pre-saved strategy known to backtest well on the chosen
    symbol. Available slugs: ema_cross_fast, momentum, scalper_stack,
    sma_only, trend_ema, volatility, bb_squeeze, all_mix, pivot_kid_ema.
    Not every slug exists for every symbol; list_models shows what deployed.
  community_id: Copy-trade a published community strategy. Pass the `id`
    of an entry from `browse_community`. Loads that exact strategy code,
    skips Claude generation, then trains + deploys it. `symbol`/`timeframe`
    still apply to the backtest+deploy.
  webhook_url: Optional webhook to receive live signals.
  telegram_chat_id: Optional Telegram chat ID for signal delivery.
  competition: Optional. A competition id from list_competitions. The model is then trained on
    that competition's market and only on bars up to its train end, so it can be entered with
    submit_competition_entry; a symbol or timeframe other than the competition's is refused.
    Without it the model trains up to today and cannot be entered.

Returns at once (the deploy runs in the background so the live card can
stream progress) with:
    - job_token (str): get_deploy_result(job_token) returns the final result.
    - poll_url (str): the progress URL the live card polls.
    - pending (bool): true; the deploy is still running.
    - symbol, timeframe (str).

Each call starts one deploy and one deploy card, and is billed from the
account's credits. The server routes the request: a vague `prompt` deploys
the best curated preset for the market, or a fresh build when there is none;
specific rules generate a fresh strategy. A community strategy deploys only
after the user has seen its author and code (get_strategy_code) and picked
it, through its `community_id`.

get_deploy_result(job_token) waits for the deploy and returns the
out-of-sample stats, `stem`, `live_url` and `source` as text; its
`source` says when a pre-existing community strategy was used, and a
`suggestion` is a matching community strategy that was not deployed.

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": "one_shot"
  }
}

Input Schema

NameRequiredDescriptionDefault
presetNoA curated strategy, deployed with no code generation: ema_cross_fast, momentum, scalper_stack, sma_only, trend_ema, volatility, bb_squeeze, all_mix or pivot_kid_ema. Where that slug has no saved strategy for the market, a strategy of its kind is generated instead.
promptNoThe strategy in plain English, e.g. "Buy when RSI < 30, sell when RSI > 70". At most 4,000 characters. Not needed when preset or community_id is given (community_id wins, then preset).
symbolNoMarket: EURUSD, USDJPY, GBPUSD, USDCHF, USDCAD, AUDUSD, NZDUSD, XAUUSD, XAGUSD or BTCUSD. Default EURUSD.
timeframeNoBar size: 1min, 5min, 15min or 1h. Default 15min.
competitionNoOptional competition id from list_competitions, e.g. eurusd-15m-2027-01. The model then trains on that competition's market and only on bars up to its train end, so submit_competition_entry can enter it; a symbol or timeframe other than the competition's is refused.
webhook_urlNoOptional URL that receives each live signal. Webhook delivery needs a paid plan.
claude_modelNoWhich Claude model writes the code: sonnet (default), sonnet-haiku (Sonnet writes the spec, Haiku the code) or haiku (faster, about a third of the credits). Any case. Billed from the account's credits; ignored with preset or community_id.
community_idNoThe id of a published community strategy (from browse_community or find_strategy), deployed unchanged with no generation. Pass it only after the user has seen its author and code (get_strategy_code) and picked it.
telegram_chat_idNoOptional Telegram chat id that receives each live signal.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / competition / description
      Previous value: -"Optional competition id from list_competitions, e.g. eurusd-15m-winter-cup-2026. The model then trains on that competition's market and only on bars up to its train end, so submit_competition_entry can enter it; a symbol or timeframe other than the competition's is refused."New value: +"Optional competition id from list_competitions, e.g. eurusd-15m-2027-01. The model then trains on that competition's market and only on bars up to its train end, so submit_competition_entry can enter it; a symbol or timeframe other than the competition's is refused."
  2. Changed9 schema fields changed
    • addedInput schema / properties / claude_model / description
      Added value: +"Which Claude model writes the code: sonnet (default), sonnet-haiku (Sonnet writes the spec, Haiku the code) or haiku (faster, about a third of the credits). Any case. Billed from the account's credits; ignored with preset or community_id."
    • addedInput schema / properties / community_id / description
      Added value: +"The id of a published community strategy (from browse_community or find_strategy), deployed unchanged with no generation. Pass it only after the user has seen its author and code (get_strategy_code) and picked it."
    • addedInput schema / properties / competition / description
      Added value: +"Optional competition id from list_competitions, e.g. eurusd-15m-winter-cup-2026. The model then trains on that competition's market and only on bars up to its train end, so submit_competition_entry can enter it; a symbol or timeframe other than the competition's is refused."
    • addedInput schema / properties / preset / description
      Added value: +"A curated strategy, deployed with no code generation: ema_cross_fast, momentum, scalper_stack, sma_only, trend_ema, volatility, bb_squeeze, all_mix or pivot_kid_ema. Where that slug has no saved strategy for the market, a strategy of its kind is generated instead."
    • addedInput schema / properties / prompt / description
      Added value: +"The strategy in plain English, e.g. \"Buy when RSI < 30, sell when RSI > 70\". At most 4,000 characters. Not needed when preset or community_id is given (community_id wins, then preset)."
    • addedInput schema / properties / symbol / description
      Added value: +"Market: EURUSD, USDJPY, GBPUSD, USDCHF, USDCAD, AUDUSD, NZDUSD, XAUUSD, XAGUSD or BTCUSD. Default EURUSD."
    • addedInput schema / properties / telegram_chat_id / description
      Added value: +"Optional Telegram chat id that receives each live signal."
    • addedInput schema / properties / timeframe / description
      Added value: +"Bar size: 1min, 5min, 15min or 1h. Default 15min."
    • addedInput schema / properties / webhook_url / description
      Added value: +"Optional URL that receives each live signal. Webhook delivery needs a paid plan."
  3. Changed1 schema field changed
    • addedInput schema / properties / competition
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Competition"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The annotations already declare destructive/openWorld/non-idempotent, and the description adds critical context beyond them: each call is billed from account credits, starts exactly one deploy card, runs asynchronously in the background, and returns a job_token/pending sentinel rather than final results. It further discloses the competition train-cutoff constraint and the refusal behavior for mismatched symbol/timeframe.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well structured and front-loaded with the one-line summary, the one-of rule, and a Returns section. But the long Args block largely duplicates parameter documentation that already has 100% schema coverage, and the Returns block restates fields from the output schema, so a meaningful portion of the text does not earn its place.

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, expensive, asynchronous, state-changing tool, the description covers the required input contract, precedence, cost, async lifecycle, follow-up call (get_deploy_result), and the competition constraint. Nothing an agent needs in order to call this safely and correctly is missing.

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%, so most of the Args block restates enum values and defaults. However, it contributes genuine semantics the schema alone does not surface clearly — the precedence rule, that claude_model is ignored with preset/community_id, that symbol/timeframe still apply when community_id is used, and the caveat that not every preset slug exists for every symbol.

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?

Opens with a specific verb chain and resource scope: 'End-to-end deploy: generate strategy → train → deploy live.' This cleanly distinguishes it from the granular siblings (generate_strategy, train_strategy, deploy_model) without requiring the agent to open any 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?

Explicitly states the one-of requirement across prompt/preset/community_id and the precedence order (community_id > preset > prompt). It also names the concrete prerequisites for each path — community_id only after get_strategy_code and user selection, preset slugs limited per symbol via list_models, competition ids from list_competitions — and explains the prompt routing (vague → curated preset, specific → fresh build).

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