Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

Start a strategy parameter experiment

start_parameter_experiment
Destructive

Start 2-30 parameter variants against the same saved revision, same date window, and same current BotSpot Auto routing policy. BotSpot creates or resolves one immutable strategy parameter set per variant and starts the runs in parallel with bounded concurrency through the normal backtest entitlement and runtime path. Use this when the user asks to compare parameter values; do not edit strategy code between variants. Sweep size: when the person gives a range without saying the step (for example "everything from 150 to 250", even with a few example values), choose a step so the first batch is about 10 runs or fewer (150 to 250 means every 10, 11 runs), say the step in one line, and offer the finer sweep in between next. Follow a step the person names exactly, and when they ask for every value or a count such as all 50, start all of them (two calls of up to 30). Otherwise, with two or more settings use a small grid, about 12 to 20 runs in total (for example 5 values by 3 values), in one call; never use separate start_backtest calls for a sweep. When a grid the person did not size would pass 20 runs, say the grid and its run count first and pick the most informative combinations, or run in rounds: start round one, compare, then propose round two from what it showed. A person may have at most 60 backtests queued or running when a sweep starts; a bigger request is refused. Read the saved strategy first and use the exact parameter key from the saved strategy code, including its casing; never rename, uppercase, or infer a different environment-variable-style key. The result returns an experiment id, exact revision id, parameter-set ids, routing-policy snapshot, every successfully started backtest id, and any start failures. This tool does not return an externalWaitId: do not invent one or call record_external_wait_in_plan for the experiment id. In a BotSpot chat you are woken once, when the last run ends, with every run in parameterExperiment.runs (or once early if a run fails while others are still running so you can fix shared code bugs automatically): end your turn after starting and compare then, unprompted. Elsewhere, read backtest_status until every run is terminal. Report failures or missing artifacts and compare the complete set on the same window. On a plan with a backtest minute limit, runs that do not fit in the minutes left are not started and are listed in notStartedForMinutes. Do not blindly recommend the highest in-sample return; include drawdown, risk-adjusted metrics, trade count, parameters, and observed data provenance, then recommend out-of-sample or walk-forward validation. This always uses the conversation data provider; no dataProvider or raw botConfig input is accepted.

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": {
      "startDate": "<startDate>",
      "endDate": "<endDate>",
      "variants": "<variants>"
    },
    "name": "start_parameter_experiment"
  }
}

Input Schema

NameRequiredDescriptionDefault
budgetNoStarting cash for the backtest, in quote-currency units unless budgetConversion explicitly declares another input currency. Sets BACKTESTING_BUDGET in the backtest environment.
endDateYesThe last calendar day to simulate, inclusive. Preserve the requested last date; do not add a day as though this were an exclusive upper bound.
variantsYes
startDateYesThe first calendar day to simulate, inclusive. Preserve the user-requested date, normally YYYY-MM-DD.
revisionIdNo
envVarSetIdsNoSaved BotSpot environment variable IDs to inject into the backtest runner. The MCP server never reads or exposes the saved values; BotSpot issues a short-lived runtime secret for the backtest.
budgetConversionNoOptional caller-declared starting-capital conversion: budget_currency, quote_currency and positive finite quote_per_budget, as a number or decimal string (quote-wallet units per input-budget unit). The amount may be budget here or an explicit amount already in the saved code/environment; no extra MCP budget is required. Optional as_of, source, note and other JSON metadata preserve provenance, including approximate or missing dates. No exchange rate is fetched or independently verified. Without this record, numeric budget retains its existing quote-currency meaning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / budget / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / budget / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / budget / type
      Removed value: -"number"
    • removedInput schema / properties / budgetConversion / additionalProperties
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "boolean"
      -    },
      -    {
      -      "type": "null"
      -    },
      -    {
      -      "items": {
      -        "$ref": "#/properties/budgetConversion/additionalProperties"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "additionalProperties": {
      -        "$ref": "#/properties/budgetConversion/additionalProperties"
      -      },
      -      "type": "object"
      -    }
      -  ]
      -}
    • addedInput schema / properties / budgetConversion / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        },
      +        {
      +          "items": {
      +            "$ref": "#/properties/budgetConversion/anyOf/0/additionalProperties"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "additionalProperties": {
      +            "$ref": "#/properties/budgetConversion/anyOf/0/additionalProperties"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "properties": {
      +      "budget_currency": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "quote_currency": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "quote_per_budget": {
      +        "anyOf": [
      +          {
      +            "exclusiveMinimum": 0,
      +            "type": "number"
      +          },
      +          {
      +            "type": "string"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "budget_currency",
      +      "quote_currency",
      +      "quote_per_budget"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / budgetConversion / properties
      Removed value: -{
      -  "budget_currency": {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "quote_currency": {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "quote_per_budget": {
      -    "anyOf": [
      -      {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      {
      -        "type": "string"
      -      }
      -    ]
      -  }
      -}
    • removedInput schema / properties / budgetConversion / required
      Removed value: -[
      -  "budget_currency",
      -  "quote_currency",
      -  "quote_per_budget"
      -]
    • removedInput schema / properties / budgetConversion / type
      Removed value: -"object"
    • addedInput schema / properties / envVarSetIds / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "format": "uuid",
      +      "type": "string"
      +    },
      +    "maxItems": 10,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / envVarSetIds / items
      Removed value: -{
      -  "format": "uuid",
      -  "type": "string"
      -}
    • removedInput schema / properties / envVarSetIds / maxItems
      Removed value: -10
    • removedInput schema / properties / envVarSetIds / type
      Removed value: -"array"
  2. Changed1 schema field changed
    • changedInput schema / properties / variants / maxItems
      Previous value: -10New value: +30
  3. Changed2 schema fields changed
    • changedInput schema / properties / budget / description
      Previous value: -"Starting cash for the backtest (in the quote currency, typically USD). Sets BACKTESTING_BUDGET in the backtest environment."New value: +"Starting cash for the backtest, in quote-currency units unless budgetConversion explicitly declares another input currency. Sets BACKTESTING_BUDGET in the backtest environment."
    • addedInput schema / properties / budgetConversion
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "boolean"
      +      },
      +      {
      +        "type": "null"
      +      },
      +      {
      +        "items": {
      +          "$ref": "#/properties/budgetConversion/additionalProperties"
      +        },
      +        "type": "array"
      +      },
      +      {
      +        "additionalProperties": {
      +          "$ref": "#/properties/budgetConversion/additionalProperties"
      +        },
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  "description": "Optional caller-declared starting-capital conversion: budget_currency, quote_currency and positive finite quote_per_budget, as a number or decimal string (quote-wallet units per input-budget unit). The amount may be budget here or an explicit amount already in the saved code/environment; no extra MCP budget is required. Optional as_of, source, note and other JSON metadata preserve provenance, including approximate or missing dates. No exchange rate is fetched or independently verified. Without this record, numeric budget retains its existing quote-currency meaning.",
      +  "properties": {
      +    "budget_currency": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "quote_currency": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "quote_per_budget": {
      +      "anyOf": [
      +        {
      +          "exclusiveMinimum": 0,
      +          "type": "number"
      +        },
      +        {
      +          "type": "string"
      +        }
      +      ]
      +    }
      +  },
      +  "required": [
      +    "budget_currency",
      +    "quote_currency",
      +    "quote_per_budget"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • addedInput schema / properties / endDate / description
      Added value: +"The last calendar day to simulate, inclusive. Preserve the requested last date; do not add a day as though this were an exclusive upper bound."
    • addedInput schema / properties / startDate / description
      Added value: +"The first calendar day to simulate, inclusive. Preserve the user-requested date, normally YYYY-MM-DD."
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses bounded parallel execution, entitlement/runtime path, a 60-run queued-or-running limit, notStartedForMinutes behavior, failure reporting, and wake/comparison behavior. It also clarifies the immutable parameter-set resolution and that the tool always uses the conversation data provider, which materially informs invocation.

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 description is long but front-loads the core action and then proceeds through operational rules in a logical order. Most sentences carry specific, non-redundant guidance, though the density and length make it heavier than ideal.

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 complex, non-idempotent, destructive mutation tool with no output schema, the description is unusually complete. It covers return contents, runtime limits, failure cases, wake behavior, comparison expectations, and validation guidance.

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 71%, so the schema already documents most parameters. The description adds useful meaning for variants, exact parameter-key casing, inclusive date preservation, sweep sizing, and the absence of dataProvider/botConfig inputs, though it does not elaborate on every schema field such as envVarSetIds or budgetConversion.

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?

The description names a specific verb and resource: start parameter variants against a saved revision, same date window, and routing policy. It clearly distinguishes this from start_backtest by saying never to use separate start_backtest calls for a sweep, and from record_external_wait_in_plan by explicitly saying no externalWaitId is returned.

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 explicit when-to-use guidance for parameter comparison and when-not-to-use guidance such as not editing strategy code between variants. It also specifies detailed decision rules for step selection, grid sizing, run counts, and alternatives to separate start_backtest calls.

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.