Skip to main content
Glama
Aaditya2502

TradeMCP

by Aaditya2502

trade_get_backtest

Read-onlyIdempotent

Retrieve detailed backtest performance metrics by run ID, including returns, Sharpe ratio, drawdown, and win rate.

Instructions

Get full metrics for a single backtest run by its ID.

Use trade_list_backtests first to find a valid run_id, then call this for the detailed performance breakdown (returns, Sharpe/Sortino, drawdown, win rate, profit factor, capital curve endpoints).

Args: params (GetBacktestInput): Validated input containing: - run_id (str): Run identifier from trade_list_backtests - response_format (ResponseFormat): "markdown" (default) or "json"

Returns: str: Markdown summary, or JSON with this schema: { "run_id": str, "strategy": str, "symbol": str, "ran_at": str, "period": {"start": str, "end": str}, "metrics": { "total_return_pct": float, "annualized_return_pct": float, "sharpe_ratio": float, "sortino_ratio": float, "max_drawdown_pct": float, "win_rate_pct": float, "total_trades": int, "profit_factor": float }, "starting_capital": float, "ending_capital": float } On failure (including unknown run_id): "Error: "

Examples: - "How did bt_ema_crossover_reliance_0427 perform?" -> that run_id - Don't guess run IDs — list them first with trade_list_backtests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses key behavioral traits beyond annotations: it explains the output format (markdown or JSON based on response_format), returns a detailed JSON schema, and describes error behavior (returns 'Error: <actionable message>' for failure). Annotations already indicate read-only, non-destructive, idempotent, which is consistent. No contradictions.

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

Conciseness5/5

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

The description is well-structured and concise: it starts with the purpose, then provides usage steps, parameter details, return schema, and examples. Every sentence adds value without redundancy. It is front-loaded with the most important information.

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 the tool's complexity (single parameter with nested options), schema coverage of 0%, and presence of output schema in description, the description is complete. It covers what the tool does, how to use it, input parameters, output format and schema, error handling, and examples. No gaps for the agent to infer.

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

Parameters5/5

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

Despite the schema description coverage being listed as 0%, the description thoroughly explains both parameters: run_id ('Run identifier from trade_list_backtests') and response_format ('markdown' default) with context and examples. It adds meaning beyond the schema's property descriptions by showing usage and default behavior.

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 clearly states the tool's purpose: 'Get full metrics for a single backtest run by its ID.' It uses a specific verb ('Get') and resource ('backtest run by ID'), and distinguishes from sibling tools like trade_list_backtests by advising to use that tool first to obtain a valid run_id.

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?

Explicit usage guidance is provided: 'Use trade_list_backtests first to find a valid run_id, then call this for the detailed performance breakdown.' It also warns against guessing run IDs and tells when not to use (e.g., don't use for listing). This clearly differentiates from sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Aaditya2502/trade-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server