Skip to main content
Glama
LuxAlgo

LuxAlgo Library MCP

Official
by LuxAlgo

Portfolio performance stats

broker_stats

Compute portfolio performance metrics including total equity, per-broker equity, top positions, and FIFO-matched trade statistics such as win rate, average win/loss, realized PnL, and per-symbol breakdown.

Instructions

Computed performance across the whole portfolio: total equity, equity by broker, top positions, and FIFO-matched trade stats — win rate, average win/loss, realized PnL, per-symbol breakdown. Amounts stay in each account's native currency, so mixed-currency totals are approximate. For prop-firm challenge odds from these stats, feed winRate plus avgWin/avgLoss converted to R-multiples (divide by the average amount risked per trade) into propfirms_simulate; for odds that respect the real trade sequence, use broker_trades with propfirms_simulate_trades instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses important non-obvious behavior: amounts remain in each account's native currency, mixed-currency totals are approximate, and trade stats are FIFO-matched. These are genuinely useful behavioral details beyond a simple 'get stats' statement.

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 front-loaded with the core purpose and then expands into a structured list of outputs and a caveat. The second sentence, while dense, provides actionable routing to sibling tools without wasted words. Every clause earns its place.

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?

With no output schema, the description adequately covers the return contents, including per-symbol breakdown and realized PnL. It also communicates the mixed-currency approximation caveat and provides alternative tooling for sequence-accurate simulations. For a zero-parameter analytics tool, nothing essential 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?

The input schema has zero parameters, so there is nothing for the description to clarify. The baseline of 4 applies: no parameter ambiguity exists, and the description focuses on output and usage rather than parameters.

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 specific verb and resource: 'Computed performance across the whole portfolio', and enumerates the exact outputs (total equity, equity by broker, top positions, FIFO-matched trade stats). This clearly differentiates broker_stats from siblings like broker_positions and broker_trades, which return raw data.

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 routing guidance for prop-firm odds: use propfirms_simulate from these stats, or broker_trades with propfirms_simulate_trades for sequence-respecting odds. However, it does not explicitly contrast broker_stats with broker_positions or broker_trades outside that odds context, though the aggregate-vs-raw distinction is strongly implied.

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