Skip to main content
Glama
LuxAlgo

LuxAlgo Library MCP

Official
by LuxAlgo

List journal trades

journal_list_trades
Read-only

Retrieve trade summaries with filters for account, symbol, direction, status, tag, and open date. Sort by opened/closed time, P&L, duration, quantity, symbol, or rating; paginate with cursor.

Instructions

Trade summaries — key, account, symbol, asset class, direction, status (open/win/loss/breakeven), open and close times, quantity and open quantity, average entry/exit, gross and net P&L, fees, fill count, duration, realized R, tags, rating, reviewed flag, hasNotes — newest-opened first by default. sort orders by any of openedAt, closedAt, netPnl, grossPnl, durationMs, quantity, symbol or rating (names match the response fields); order is desc unless set, except symbol which defaults to asc. Trades lacking the sort value (open trades for closedAt/durationMs, unrated for rating) come last in either order; netPnl is after fees, grossPnl before. Filter by account ids, open-day window (from/to are inclusive YYYY-MM-DD day keys in the journal timezone, applied to the trade's open day; open positions are always listed), symbol, direction, status or one exact tag. Keyset-paginated: pass nextCursor back as cursor with the same sort, order and filters. Examples: biggest winners this month = from/to + sort netPnl; worst by gross = sort grossPnl, order asc, status loss; longest holds = sort durationMs. Summaries carry no fills or note text: journal_get_trade with the key has those. Requires signing in with a LuxAlgo account (OAuth).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoInclusive end day (YYYY-MM-DD, journal timezone). Overrides `range`.
tagNoTrades carrying exactly this tag (see journal_list_tags).
fromNoInclusive start day (YYYY-MM-DD, journal timezone). Overrides `range`.
sortNoField to order by; default openedAt. Trades without a value for it come last in either order.
limitNoPage size, default 25.
orderNoDefault desc (largest / latest first); symbol defaults to asc (A→Z).
cursorNo`nextCursor` from the previous page; keep every other argument identical.
statusNo
symbolNoOne symbol, e.g. 'AAPL' (case-insensitive).
accountsNoJournal account ids to scope to (from journal_list_accounts). Omit for every account, archived ones included. Unknown ids are rejected.
directionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, it discloses non-obvious behavior: keyset pagination requiring identical sort/order/filters on the cursor call, trades lacking the sort value sorting last in either direction, netPnl being post-fee vs grossPnl pre-fee, and the OAuth LuxAlgo sign-in prerequisite. This is exactly the extra context annotations cannot carry.

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

Conciseness4/5

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

The scoping and sort/order defaults are front-loaded, and every clause carries real information. It is dense and unbroken as a single block, and the long field enumeration at the start is slightly heavy, but with no output schema that enumeration does earn 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?

For an 11-param list tool with no output schema, the description covers return fields, sort/order defaults and tie-breaking, pagination protocol, filter semantics and auth requirements. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is already 82%, but the description still adds meaning: sort names match response field names, order defaults to desc except symbol (asc), from/to are inclusive day keys in the journal timezone applied to the open day, open positions are always listed, and tag must match exactly one tag. These clarify ambiguous parameters rather than repeat the schema.

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?

Opens with a specific resource ('Trade summaries') and enumerates the exact fields returned, making the verb+resource unambiguous. It explicitly distinguishes itself from journal_get_trade (which has fills and note text) and from other journal list tools, so an agent can route correctly without opening a schema.

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?

Provides concrete when-to-use recipes ('biggest winners this month = from/to + sort netPnl', 'longest holds = sort durationMs') and an explicit redirect ('journal_get_trade with the key has those'). Filter and sort semantics are stated as rules, not hints.

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