Skip to main content
Glama

Taiwan Stocks

Backtest a screening strategy

run_backtest

Saves a strategy to the user's CubeLV account and backtests it on Taiwan stocks over a date range, waiting up to about 90 seconds for the result. Returns total and annual return, max drawdown, win rate and trade count, or the backtest id when it is still running. The strategy stays in CubeLV (without notifications) and can be deleted there or with delete_alert.

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": {
      "strategy": "<strategy>",
      "from_date": "<from_date>"
    },
    "name": "run_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage for data labels (industries, statement items, categories) and links: en, ja, ko or vi; default en
sizingNoPosition sizing, default {"initial_cash": 1000000, "type": "amount", "value": 100000, "max_positions": 10} (TWD)
to_dateNoEnd date YYYYMMDD; default the latest trading day
strategyYesStrategy: {"name": "...", "side": "long", "universe": {...}, "entry_rule": {...}, "exit_rule": {"any": [{"indicator": "return_since_entry", "op": "<=", "value": -7}, {"indicator": "return_since_entry", "op": ">=", "value": 20}]}, "sort": {...}}; universe and rules are written as in screen_stocks
from_dateYesStart date YYYYMMDD

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the side effect (the strategy is persisted to the CubeLV account, without notifications), the latency contract (waits up to about 90 seconds), and the partial-result case (returns a backtest id when still running). It also explains how to undo the persistence, which is exactly the context an agent needs for a non-readOnly, non-idempotent call.

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 purpose, then return values, then persistence/cleanup; each sentence carries distinct information with no filler. Slightly dense with named metrics, but nothing is redundant.

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?

With no output schema, the description correctly takes on return-value explanation (total and annual return, max drawdown, win rate, trade count, or the backtest id) and covers the persistence side effect, which is substantial for a 5-parameter tool with nested strategy objects. The one gap is that it does not say how to retrieve results later when only a backtest id is returned.

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

Parameters3/5

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

Schema description coverage is 100%, including defaults for sizing, to_date and lang, so the schema already carries parameter meaning. The description only restates the date-range scope and adds no syntax or constraint detail beyond the schema, so the baseline 3 applies.

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 uses a concrete verb pair ("saves ... and backtests") on a named resource (a screening strategy) scoped to Taiwan stocks and a date range, so an agent knows exactly what the call does. It does not explicitly contrast itself with screen_stocks, which is the closest sibling and the format reference for the strategy rules, so sibling differentiation is only partial.

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?

Usage is implied rather than stated: an agent can infer this is the step after building a screening strategy, and the description names delete_alert as the cleanup path. There is no explicit "use this when X, use screen_stocks when Y" guidance and no statement of prerequisites, so selection still requires inference.

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