Skip to main content
Glama

build_strategy_for_regime

Run the Strategy Engine route in one call. Use it FIRST whenever someone asks to build or make a strategy and names no signals -- 'build me a strategy', 'build me a BTC strategy on 1h', 'make me something for ETH'. Give the asset, and the candle size only when they named one. The server reads the 180-day regime, searches the engine's completed runs once with the agreed floors (more than 10 trades, Sharpe at least 1, IRR at least 10%, beats benchmarks) in that regime, keeps the runs whose entry the regime admits, picks one at random, saves it from its own run and backtests it on recent data ending today, over a window its candle size sets: 5m 1 month, 15m 2 months, 30m 3 months, 1h 4 months, 4h 12 months, 1d 12 months (a month is 30 days). Returns as soon as the backtest is submitted; when running, show the saved strategy and invite the person to check results shortly using get_backtest with the returned backtest_id. Do not submit another backtest. Do not pass filters, a regime or dates: they are fixed. When nothing fits it answers with outcome no_match and saves and spends nothing. A fresh build selects its market automatically; do not ask for a venue or quote. It does not search the marketplace.

[Access: pay 0.10 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

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": {
      "asset": "<asset>"
    },
    "name": "build_strategy_for_regime"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetYesAsset symbol, e.g. BTC or ETH.
candle_sizeNoDuration of one candle, e.g. 1h or 1d.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only say it is non-read-only, open-world and non-idempotent; the description goes far beyond by disclosing the full pipeline (regime read, single search of completed runs with stated floors, random pick among admitted entries, save, backtest over a candle-size-dependent window), that it returns as soon as the backtest is submitted rather than with results, that no_match saves and spends nothing, and the 0.10 USDC x402 payment. These are the mutation, async, cost, and side-effect facts an agent needs and that annotations cannot convey.

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?

Usage guidance is front-loaded and every sentence carries operational content, but the middle is a dense run-on packing the search floors, window mapping table, and payment note into long comma-chained clauses that are harder to parse than necessary. Nothing is truly wasted; the packing is the only flaw.

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?

There is no output schema, so the description must cover returns, and it does: a submitted backtest with backtest_id, or outcome no_match. It also covers the stopping condition (do not submit another backtest) and the payment path. For a tool with two parameters and a multi-stage server-side pipeline, this is complete enough to call correctly on the first attempt.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: asset is mandatory, candle_size should be supplied only when the person named one, and the candle size silently determines the backtest window (5m→1 month through 1d→12 months, month = 30 days). That mapping is behavioral semantics absent from the schema and changes how an agent should fill the parameter.

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?

"Run the Strategy Engine route in one call" pairs a specific verb with a specific resource, and the description immediately narrows it to the build-a-strategy-from-scratch case, which separates it from save_strategy, evaluate_strategy, and get_strategy. An agent can identify the tool without opening the 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?

It gives the exact trigger condition ("use it FIRST whenever someone asks to build or make a strategy and names no signals"), concrete example utterances, and explicit exclusions: don't pass filters/regime/dates, don't ask for venue, do not submit another backtest, then hand off to get_backtest with the returned backtest_id. Alternatives are named by tool name with the condition that selects them.

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.