Skip to main content
Glama

EA Trade Tester by TrueTest

Test trading-strategy code (EA, indicator, Python bot, written rules)

test_strategy_code

Reads trading-strategy code - an MT5/MT4 Expert Advisor or indicator (.mq5/.mq4/.mqh/.set), a Python trading bot (.py), a TradingView Pine Script (.pine), a cTrader cBot or NinjaTrader strategy in C# (.cs) or rules written in plain words (.txt) - and reports code faults: wrong server clock, modules never called, settings never used, missing include files, unchecked orders, martingale or grid sizing. Without an email it returns this free first read only and stores nothing. With the user's email it also opens a private Strategy Lab and returns its link: TrueTest rebuilds the strategy as plain-English rules, the user checks them on the lab page, then TrueTest backtests its own rebuilt copy on up to 16 years of prices with real costs, runs a luck check and keeps a forward watch. It never runs the uploaded code as given and never places trades. For a finished trade record use check_trading_record; compiled .ex5/.ex4 files cannot be read (test their Strategy Tester report instead). Files are kept up to 90 days; the lab 12 months after the user's last visit (https://truetest.uk/security).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "test_strategy_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoOne file's text, if you are not using files
nameNoOptional name of the strategy
emailNoThe user's email address, only if the user wants the full backtest: it identifies the user's tests for the luck bar and the 3-free-labs-a-day limit. TrueTest sends no email to it for a request made through an assistant; the lab link comes back in this answer. Leave empty for the free first read alone
filesNoAll the strategy's files together, e.g. the .mq5 plus its .mqh includes and .set settings; at most 20 files and about 1 MB in total through this connector (larger: upload on https://truetest.uk/strategy, up to 5 MB)
symbolsNoOptional symbols to test, e.g. EURUSD, GBPUSD, XAUUSD
ai_draftNoTrue only if the user agreed that our AI service may read the code text to draft the rule card. It is run by an outside AI provider, on servers in a country the UK has not approved for data protection, so UK data protection rules may not protect the code the same way there. Emails, links, author lines and secret-looking values are removed first. False: a person writes it, within 2 working days.
filenameNoThat one file's name with its extension, e.g. MyEA.mq5. Give it whenever you have it; without it the language is guessed from the text.
timeframeNoOptional timeframe, e.g. M15 or H1

Output Schema

NameRequiredDescriptionDefault
noteYes
filesNofree first read: the files read
storedNofree first read: always false (nothing is stored)
lab_urlNowith an email: the private Strategy Lab link
summaryYes
compiledNofree first read: true if a compiled file was sent
findingsYes
languageNofree first read: the language read
referenceNowith an email: the submission reference
rule_cardNowith an email: who writes the plain-English rule card
read_as_from_textNotrue when a file had no name with a known extension, so its language was guessed from its text (the summary says which)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / ai_draft / description
      Previous value: -"True only if the user agreed that an outside AI service (servers outside the UK) may read the code text to draft the rule card; emails, links, author lines and secret-looking values are removed first. False: a person writes it, within 2 working days"New value: +"True only if the user agreed that our AI service may read the code text to draft the rule card. It is run by an outside AI provider, on servers in a country the UK has not approved for data protection, so UK data protection rules may not protect the code the same way there. Emails, links, author lines and secret-looking values are removed first. False: a person writes it, within 2 working days."
  2. Changed2 schema fields changed
    • changedInput schema / properties / filename / description
      Previous value: -"That one file's name with its extension, e.g. MyEA.mq5"New value: +"That one file's name with its extension, e.g. MyEA.mq5. Give it whenever you have it; without it the language is guessed from the text."
    • addedOutput schema / properties / read_as_from_text
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "true when a file had no name with a known extension, so its language was guessed from its text (the summary says which)",
      +  "title": "Read As From Text"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations mark this non-read-only, non-idempotent and non-destructive but say nothing about upload persistence or privacy, which the description fills in: files kept 90 days, lab 12 months after last visit, the code is never executed as given and no trades are placed, plus a data-protection caveat for the optional outside AI provider. It stops short of describing throttling behavior beyond mentioning the 3-labs-a-day limit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability and the email branch are front-loaded, but the single dense paragraph sprawls across capability, gating, lab mechanics, execution safety, sibling routing, retention windows and a security URL. Several clauses duplicate the title's format list, and the parenthetical retention/privacy tail could be trimmed.

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?

Given eight optional parameters, nested file objects and an existing output schema, the definition covers everything an agent needs: accepted inputs, the free-vs-lab decision, upload size ceiling, retention, and what the answer returns (a lab link). Nothing material is left unspecified.

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%, so the parameters' meaning is already documented in structured fields; the description largely restates the email gating and the file-size/retention limits that the schema also carries. It adds framing — 'without an email it returns this free first read only' — but little syntax or format guidance beyond the schema.

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 opens with a concrete verb+resource pair — 'Reads trading-strategy code' — and enumerates the exact accepted formats (.mq5/.mq4/.mqh/.set, .py, .pine, .cs, .txt) alongside the concrete output ('reports code faults: wrong server clock, modules never called...'). It also explicitly separates itself from the sibling check_trading_record for finished trade records.

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 an explicit branching rule: no email yields the free first read and stores nothing; an email opens a private Strategy Lab and returns its link. It also states a negative case — compiled .ex5/.ex4 files cannot be read, use a Strategy Tester report instead — and names the sibling to use for finished trade records.

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.