Skip to main content
Glama

data_get_trades

Extract individual trade execution logs from TradingView Strategy Tester, including entry/exit times, prices, contracts, and P&L, to review backtested Pine strategies trade by trade.

Instructions

Extract individual trade execution log from Strategy Tester (entry/exit times, prices, contracts, P&L). WHEN TO USE: Call when conducting granular trade-by-trade review or streak analysis of a backtested Pine strategy. SIDE EFFECTS: None (Read-only). LIMITATIONS: Strategy Tester bottom panel must have trade list populated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_tradesNoMaximum trades to return

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a solid job: it declares the side effect profile (None, Read-only) and a real prerequisite (Strategy Tester bottom panel must be populated). It does not cover rate limits, pagination, or how max_trades truncation behaves, leaving a modest gap.

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?

Purpose is front-loaded, then WHEN TO USE, SIDE EFFECTS, and LIMITATIONS are cleanly labeled. Every line carries information and nothing is padded.

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 a simple read-only extraction tool with no annotations and no output schema, the description supplies purpose, usage trigger, safety profile, prerequisite, and returned fields. It falls just short of complete because truncation/pagination behavior of max_trades is unexplained.

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?

There is a single optional parameter with 100% schema coverage ('Maximum trades to return'), so the schema already documents it fully. The description adds no extra syntax or default behavior for max_trades, making the baseline 3 correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Extract) and resource (individual trade execution log from Strategy Tester) and enumerates the returned fields, which implicitly separates it from aggregate siblings like data_get_strategy_results and data_get_equity. It never names an alternative explicitly, so sibling differentiation is inferred rather than stated.

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?

'WHEN TO USE: Call when conducting granular trade-by-trade review or streak analysis of a backtested Pine strategy' gives a concrete triggering condition with a clear scope (backtested Pine strategy). It stops short of naming alternatives or stating when NOT to use it, so it lands at clear-context but no-exclusions.

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