Tools and Workflows
Algo Trade Analytics MCP exposes a research toolpack, not a single chat command. The client owns the reasoning loop. Algo Trade Analytics owns the trading-specific state, tools, gates, and evidence records.
Tool Families
Section titled “Tool Families”| Family | Main tools | Use for |
|---|---|---|
| Context and status | ata_health, ata_context, ata_mcp_usage_status | Confirm server health, bound actor, entitlement, market-data readiness, and usage status. |
| Guidance resources | ata_list_resources, ata_read_resource, ata_list_prompts, ata_get_prompt | Load the Algo Trade Analytics Quant Research Driver skill, prompt templates, and tool manifest. |
| Case Studies | ata_list_case_studies, ata_load_case_study, load_case_study, create_research_run | Find the user’s research ledger and bind tool calls to the correct investigation. |
| Notebook and plan | ata_get_research_notebook, ata_get_research_evidence_index, ata_get_research_plan, ata_plan_case_study_hardening | Inspect evidence maturity, missing gates, and recommended next methodology tasks. The evidence index pages through a run’s profiles, discovery screens, trials and lessons by ID, producer, measured scope and caveats. |
| Research contract | ata_start_research_run, ata_get_research_contract, ata_research_workflow_status | Keep the external agent aligned with the current allowed tools, blockers, and handoff state. |
| Light analysis | inspect_market_context, analyze_losing_trades, analyze_trade_features, analyze_market_coverage, analyze_signal_audit, propose_strategy_candidate, analyze_parameter_robustness | Explore market context, failures, features, signals, and candidate ideas before expensive validation. |
| Heavy evidence | profile_baseline, evaluate_candidate, verify_candidate, stress_test_candidate, walk_forward_candidate, run_parameter_sweep, analyze_bootstrap_confidence, analyze_overfit_probability, analyze_cost_sensitivity, analyze_risk_management, analyze_cross_scope | Run paid evidence checks, validation, sweeps, stress tests, robustness analysis, and cross-scope checks. |
| Background jobs and tasks | ata_start_research_job, ata_get_research_job_status, ata_cancel_research_job, ata_get_research_task, ata_get_research_task_result, ata_cancel_research_task, ata_list_research_tasks | Run heavy work durably instead of keeping one client call open. |
| Platform workflows | ata_start_research_workflow, ata_get_research_workflow_status, ata_cancel_research_workflow, ata_resume_research_workflow | Start and manage a platform-managed research workflow from a higher-level objective. |
| Write tools | create_research_hypothesis, define_experiment_protocol, close_research_experiment, stage_candidate_for_editor, commit_research_lesson, ata_record_research_task_progress | Mutate the research ledger, stage candidates, or save lessons when write scopes are granted. |
Recommended Call Order
Section titled “Recommended Call Order”-
Call
ata_contextfirst. Confirm the Algo Trade Analytics account, MCP status, market-data readiness, and client guidance. -
Load guidance. If the client did not load MCP resources automatically, call
ata_read_resourceforskill://ata-quant-research-driver/SKILL.mdor callata_get_promptwithata_quant_research_driver. -
Choose the Case Study. Use
ata_list_case_studiesandata_load_case_study. -
Check the contract. Use
ata_get_research_contractorata_research_workflow_statusbefore paid or write tools. WithsummaryLevel: "full", the contract also returns the study’s declared terms (decisionFoundation); re-read it after a restart or context loss, or whenmeta.researchState.foundation.revisionchanges. To recover what has already been observed, page throughata_get_research_evidence_index, one kind per call, followingpage.nextCursoruntilpage.hasMoreis false. -
Run cheap context tools before heavy validation. Inspect failures, market context, and candidate ideas before spending credits on sweeps or verification.
-
Use jobs for heavy tools. Start a background job, poll status, and read the final result when complete.
-
Write only after evidence exists. Record progress, define protocols, stage candidates, or commit lessons only when the tool result supports it.
Comparing Saved Trials
Section titled “Comparing Saved Trials”Use compare_trials with the Case Study version hashes returned by
load_case_study or ata_load_case_study. These differ from the full source
hashes returned for research candidates.
Check comparison.rankingEligible and comparison.checks before interpreting
the order as a performance ranking. A saved trial with an explicit, verified
link to its MCP evaluation can recover that evaluation’s recorded provenance.
Missing, conflicting, or incompatible runtime, data, and benchmark identities
keep the comparison unranked. The tool does not rerun a trial to fill gaps.
For full-range runs, a request’s date boundaries can differ from the first and
last available bars. Without an exact saved interval match, data provenance
remains unknown rather than being inferred from a nearby date range.
Each value in metricProvenance identifies the trial that produced it. The
best profit, win rate, and drawdown may come from different trials; do not
combine them into a single observed result. A comparable result is also not
proof of statistical superiority or readiness for trading.
Recovering a Closed Experiment
Section titled “Recovering a Closed Experiment”Use ata_get_research_notebook with an explicit subject containing its
protocolId and candidateId. Summary recovery keeps the experiment’s status
separate from the status of its parent research run. A run can remain open
after an individual experiment has closed.
The closure reason and time come from the experiment’s recorded closure audit. Repeating a close with the same requested statuses preserves that original audit rather than replacing its reason or timestamp. A valid status correction passes the existing closure checks and records a new audit. Older experiments without that audit report those details as unavailable; the original hypothesis rationale and the parent run’s completion time are not substitutes. Missing closure details do not reopen a closed experiment or change its measured results, evidence requirements, or qualification.
Durable Background Jobs
Section titled “Durable Background Jobs”Use background jobs when a tool may run multiple trials, consume a budget, or take long enough that a single MCP request could time out.
Typical job-backed work:
- parameter sweeps,
- walk-forward checks,
- bootstrap confidence checks,
- overfit probability checks,
- cross-scope validation,
- risk-management analysis,
- platform-managed research workflows.
Queued jobs can be cancelled before work starts. Running jobs stop at the next safe trial checkpoint and settle based on completed work.
Forward-testing setup and webhook diagnostics
Section titled “Forward-testing setup and webhook diagnostics”When exposed by the connected server, these tools connect a saved study to the existing forward-testing workflow. Check the server’s tool catalog and returned capability errors; an implemented tool is not necessarily enabled for your account or environment.
| Task | Tools | Boundary |
|---|---|---|
| Inspect setup | ata_get_forward_testing_setup | Returns the owned study’s saved connection and revision, without credentials |
| Prepare a Pine webhook script | ata_prepare_webhook_script, ata_validate_webhook_script | Uses an exact owned saved version or candidate and its source hash; returns an artifact for review, not an activated TradingView alert |
| Inspect delivery | ata_list_webhook_events, ata_get_webhook_event | Bounded operational metadata; economic contents require separate observation-time admission |
| Compare alerts with fills | ata_compare_alerts_to_fills | Explicit owned account, symbol, window and connection revision; heuristic order matching with completeness and freshness limits, not a verified execution ledger |
| Test a connection | ata_prepare_webhook_diagnostic, ata_cleanup_webhook_diagnostic | Separate diagnostic permissions; a transport check, not strategy or broker-execution validation |
You still create or update the alert in TradingView. Static script validation is not compilation or measured behavioral equivalence. Changing saved source requires reading its current hash and preparing the artifact again.
A diagnostic binding expires after 15 minutes. Its one-shot indicator needs a realtime market update to fire. After expiry, create a new operation and recreate the alert from its new source. Cleanup first previews exact owned diagnostic records; execution requires that unchanged set and its preview hash. It does not cancel orders at the broker or delete unrelated webhook records.
Candidate Handoff
Section titled “Candidate Handoff”MCP can stage a candidate for review, but it does not silently replace your active strategy.
- The external agent proposes or verifies a candidate.
- A write-scoped tool stages the candidate into Algo Trade Analytics.
- Algo Lab shows the staged diff or candidate state.
- You review, accept, reject, or load the source in the app.
This keeps local-agent autonomy separate from final source changes.
Candidate and baseline sources must be Pine Script v6 (//@version=6). The
research tools do not support earlier versions, so migrate an older script to
v6 before an agent works on it.