Skip to main content
Glama
tedorigawa001

TradingView-MCP

get_strategy_trade_ledger

Fetch a paginated, stable ledger of all trades from the active Strategy Tester report, including entry/exit, profit, and duration. Pass ledgerId to avoid mixed pages after recalculation.

Instructions

Read a stable, paginated ledger of every trade available in the active Strategy Tester report. Returns entry/exit, direction, profit, quantity, duration, and run-up/drawdown/commission when TradingView exposes them. Start with offset 0; pass the returned ledgerId as expected_ledger_id on later pages to fail closed if the strategy recalculates. Read-only and requires an active strategy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoTrades to return in this page. Default: 200, maximum: 500
offsetNoZero-based trade offset. Default: 0
expected_ledger_idNoledgerId from page 1; rejects mixed pages after recalculation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses that the ledger is stable and paginated, that pages fail closed if the strategy recalculates, that certain fields are returned only when TradingView exposes them, and that the operation is read-only with an active-strategy prerequisite.

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 compact and front-loaded, with the core purpose stated first, followed by pagination behavior and prerequisites. Every sentence earns its place without redundancy or irrelevant detail.

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?

For a paginated read tool with no output schema and no annotations, the description covers the essential context: what data is returned, how to paginate, consistency guarantees, and the active-strategy requirement. No critical information an agent would need to invoke it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful behavioral context beyond the schema: it explains the intended pagination flow of offset and expected_ledger_id, including the fail-closed behavior on recalculation. This goes beyond merely restating parameter names and types.

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 states a specific verb ('Read') and resource ('stable, paginated ledger of every trade available in the active Strategy Tester report'), making the tool's function immediately clear. It also distinguishes itself from related sibling tools like get_strategy_report and summarize_backtest_ledger by focusing on the trade-level ledger rather than summaries.

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?

The description gives explicit pagination guidance: start with offset 0 and pass the returned ledgerId as expected_ledger_id on later pages. It also states the prerequisite of an active strategy and confirms the operation is read-only, giving clear context for when to call it, though it does not explicitly name alternatives or exclusion conditions.

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