Skip to main content
Glama

Record a setup backtest result

record_backtest_result

Save one backtest result (e.g. from TradingView run-pine-backtest) for step 1 of the user's routine. Pass winRate as a FRACTION 0..1 (TradingView's percent_profitable as-is), profitFactor as a ratio, and netProfitPct / maxDrawdownPct as fractions too. A pair passes when it has >= 20 trades, win rate >= 38% and profit factor >= 1.3. Only record numbers a real backtest returned — never estimates. Requires a personal SocialForex API token. Create one at /mt5 (section "Connect an AI assistant (MCP)") and add it to the MCP client as header Authorization: Bearer sfmcp_....

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": {
      "symbol": "<symbol>",
      "timeframe": "<timeframe>",
      "strategyName": "<strategyName>",
      "totalTrades": "<totalTrades>",
      "winRate": "<winRate>"
    },
    "name": "record_backtest_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNo
symbolYese.g. GBPAUD or OANDA:GBPAUD
rangeToNo
winRateYes
rangeFromNo
timeframeYese.g. 1h, 4h, 1D
totalTradesYes
netProfitPctNo
profitFactorNo
strategyNameYes
maxDrawdownPctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare a non-readOnly, non-destructive, closed-world write; the description adds behavior the annotations cannot: an authentication requirement (personal SocialForex API token), where to create it (/mt5, "Connect an AI assistant (MCP)"), and the exact header format. It adds validation semantics (pass thresholds) but does not say what happens on duplicate/overwrite or on validation failure, which keeps it below 5.

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?

Front-loaded with the core action, then unit conventions, then acceptance criteria, then auth — a sensible order with no filler. The auth sentence is the longest block but carries non-obvious setup value. Slightly dense as a single run-on paragraph, but each sentence earns its place.

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 an 11-parameter mutation tool with no output schema, the description covers the pieces an agent would most likely get wrong: units for the four numeric metrics, the source of truth for values, acceptance thresholds, and auth setup. Gaps remain around the date-range parameters, the notes field, and the success/response shape, which an agent must infer from schema constraints alone.

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 description coverage is only 18%, so the description must carry the burden — and it does for the highest-risk fields: winRate as a fraction 0..1 mapped to TradingView's percent_profitable, profitFactor as a ratio, and netProfitPct/maxDrawdownPct as fractions. totalTrades is partially illuminated by the ">= 20 trades" rule. rangeFrom/rangeTo, notes, and strategyName still get no semantic explanation.

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?

States a specific verb and resource ("Save one backtest result") plus the originating source (TradingView run-pine-backtest) and where it fits in the user's routine. None of the sibling tools record backtests, so an agent can immediately tell this apart from placement, sizing, or routine-retrieval siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear situational context ("step 1 of the user's routine", data from run-pine-backtest) and an explicit data-quality rule: "Only record numbers a real backtest returned — never estimates." It also supplies the acceptance thresholds (>=20 trades, >=38% win rate, >=1.3 profit factor). It stops short of naming a sibling or stating what to do instead when criteria fail, so not a full 5.

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