Skip to main content
Glama

find_sweep_runs

Read-onlyIdempotent

Runs from one sweep, or from every sweep this person has, filtered and sorted by the engine. LEAVE experiment_id OUT to search them all, which is how a person asking whether they have already found something like this gets an answer without spending a new search on a question that already has one. A SWEEP HAS NO WINNER: which run matters depends entirely on what was being asked, so you choose sort_by for the question in front of you -- return, risk-adjusted return, drawdown, trade count -- and say which one you sorted by whenever you report an order. Never call the top row 'the best strategy'; it is the top row by the measure you picked. Filter before you sort: a run with a handful of trades has metrics that mean nothing, so min_trades is usually the first thing to set. Every numeric filter has BOTH bounds, so a band is one question: a delta against the benchmark between 3 and 8 is min and max together, not a page fetched and thinned by hand. Readable while the sweep is still running. At most 50 runs per call (default 20); pass offset to read on.

[Access: pay 0.005 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": {
      "sort_by": "<sort_by>"
    },
    "name": "find_sweep_runs"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetNoAsset symbol, e.g. BTC or ETH.
limitNoMaximum results.
orderNodesc for best-first on that metric, asc for worst-first.desc
trendNoOnly runs from windows of this trend character, e.g. clean or choppy; several comma-separated, any of them counts.
offsetNoPagination offset in the result units documented by the tool; zero starts the first page.
max_irrNoOnly runs at or below this annualised IRR.
min_irrNoOnly runs at or above this annualised IRR.
sort_byYesThe metric to order by, e.g. sharpe_ratio, sortino_ratio, irr_annualized, total_return, max_drawdown, total_trades. Required, because the choice IS the question being asked.
coveringNoOnly runs over windows covering this single date, as YYYY-MM-DD. A different question from a span.
run_indexNoWhich run, as find_sweep_runs reported it.
atr_periodNoOnly runs that used this ATR period. Needs experiment_id.
generationNoOnly runs from this engine generation, so runs made under different engine behaviour are not compared as though alike.
max_returnNoOnly runs at or below this total return.
max_sharpeNoOnly runs at or below this Sharpe ratio.
max_tradesNoOnly runs at or below this trade count. Pairs with min_trades to ask for a band rather than a floor.
min_returnNoOnly runs at or above this total return.
min_sharpeNoOnly runs at or above this Sharpe ratio.
min_tradesNoDrop runs with fewer trades than this. Metrics from a handful of trades are noise.
run_statusNoOnly runs with this outcome, e.g. no_trades for the ones that never opened a position.
volatilityNoOnly runs from windows of this volatility band, e.g. low; several comma-separated, any of them counts.
candle_sizeNoDuration of one candle, e.g. 1h or 1d.
covering_toNoOnly runs whose window overlaps up to this date.
max_win_rateNoOnly runs at or below this win rate.
min_win_rateNoOnly runs at or above this win rate.
trigger_nameNoOnly runs whose entry trigger is this signal.
cooldown_barsNoOnly runs that used this cooldown. Needs experiment_id.
covering_fromNoOnly runs whose window OVERLAPS this date onwards. A run is relevant to 2024 if any of it happened in 2024.
experiment_idNoThe sweep, as create_sweep returned it.
reward_factorNoOnly runs that used this reward-to-risk setting. Execution filters need experiment_id; the cross-sweep surface does not serve them.
beats_benchmarksNoOnly runs that beat all three benchmarks over the same
market_directionNoOnly runs from windows of this market character, e.g. bear or mega_bull. Several are one comma-separated string, e.g. "bull,super_bull", and a run matching any of them counts. What a run did in one kind of market says little about another.
regime_compositeNoOnly runs from windows with this full regime label, e.g. mega_bull_high_clean, when the three parts together matter; several comma-separated, any of them counts. Across different regime filters every one must hold.
regime_directionNoThe direction band from get_market_regime, e.g. bear. The signal searches filter by it and find_sweep_runs marks each row's regime_fit with it; save_strategy and update_strategy read the current band themselves, so their check runs without it.
max_delta_vs_assetNoOnly runs beating their own asset by at most this much.
max_risk_per_tradeNoOnly runs that risked this fraction per trade. Needs experiment_id.
min_delta_vs_assetNoOnly runs beating buy-and-hold on their own asset by at least this much.
max_delta_vs_benchmarkNoOnly runs beating their benchmark by at most this much, so "between 3 and 8" is one question rather than a page fetched and thrown away.
min_delta_vs_benchmarkNoOnly runs that beat their benchmark by at least this much. A return in a rising market is not skill.
beats_crypto_benchmarksNoOnly runs that beat the crypto benchmarks rather than only their own asset.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds real context beyond them: results are readable while a sweep is still running, the cap is 50 per call (default 20) with offset pagination, and access costs 0.005 USDC via x402 or is free with an API key. It also warns that the ordering is a chosen measure rather than an intrinsic ranking, which no annotation conveys.

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?

The core scope and the experiment_id-omission rule are front-loaded, and the payment note is bracketed separately rather than buried. It is dense but long, and the band-vs-page guidance repeats what the schema already says for max_delta_vs_benchmark, so a small amount of trimming is possible.

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 39-parameter, no-output-schema tool it covers selection, filtering, ordering, pagination, and concurrency well. What it does not convey is the shape of a returned row or that run_index from a row feeds get_sweep_run for detail, which would help an agent plan a two-step workflow.

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 100% with unusually rich per-parameter text, so the baseline is 3; the description earns the bump by adding prioritization ('min_trades is usually the first thing to set'), the both-bounds band framing, and the rule that sort_by is required because the choice is the question. Some of this overlaps the schema (max_delta_vs_benchmark already spells out the 3-to-8 band), limiting it to a 4.

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 precise verb+resource+scope: runs from one sweep or from every sweep a person has, filtered and sorted by the engine. That distinguishes it cleanly from get_sweep (the sweep definition), get_sweep_run (one run's detail), and list_sweeps (the sweep inventory) without needing to name them.

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?

Gives explicit when-to guidance: omit experiment_id to answer 'have I already found something like this' without spending a new search, and filter by min_trades before sorting because thin-trade metrics are noise. It also states when-not to page-and-thin by hand, since every numeric filter has both bounds so a band is a single call.

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.