gammaledger-mcp
v0.1.1MCP server for GammaLedger — privacy-first, local-first options trading journal
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gammaledger_database_info
Return metadata about the loaded GammaLedger database. Includes file path, schema version, export date, trade count, whether the pre-computed `mcpContext` is present, and how fresh the data is: `dataAgeDays` (now minus the export date) and `isStale` (older than `staleAfterDays`, default 3). When `isStale` is true, positions, DTE and P&L describe the day of the export, not today - tell the user to re-save the database from the app. `warnings` lists anything else worth mentioning (failed refresh, unrecognised schema version).
gammaledger_portfolio_summary
Return the full portfolio snapshot — counts, P&L, performance ratios, risk metrics, fees, trading cadence, largest winner/loser. This is the headline dashboard view: total trades, win rate, profit factor, Sharpe/Sortino, max drawdown, expectancy, collateral at risk, realized vs unrealized P&L, current win/loss streak. `dataWarning` is set when the export is old or could not be refreshed.
gammaledger_pl_breakdown
Return time-windowed realised P&L: total, realized, unrealized, plus YTD, MTD, last 7d / 30d / 90d / 1y.
gammaledger_strategy_breakdown
Return per-strategy statistics: counts (total/open/closed/assigned), wins, losses, total P&L, win rate, average P&L. Sorted by P&L magnitude.
gammaledger_ticker_exposure
Return per-ticker performance: P&L, trade count, wins, losses, win rate, average P&L per trade. Sorted by absolute P&L. Args: top_n: Limit to top N tickers (default 15; the saved database holds at most 15).
| Parameter | Type | Description |
|---|---|---|
top_n | integer |
gammaledger_underlying_breakdown
Return breakdown by underlying instrument type (Stock / ETF / Index / Future): trade counts, total P&L, capital at risk.
gammaledger_watchlist
Return the user's Watchlist: followed tickers with rating (1-5), notes, date added, and optional target price / direction. Databases saved before the Watchlist feature (schema < 2.6 / pre-2026-08) return an empty list. Args: ticker: Optional exact ticker filter (case-insensitive).
| Parameter | Type | Description |
|---|---|---|
ticker | string |
gammaledger_open_positions
Return all currently open (active) positions, with optional filters. Each position is slimmed to the essentials by default (id, ticker, strategy, status, strike, quantity, expires, dte, pl, roi, capitalAtRisk) to save context. Pass `fields` to choose others, or `fields='all'` for the full record (adds entryPrice, daysHeld, cashFlow, fees, wheelCoverage, unrealizedPL, notes, ...). DTE and P&L are as of the export date; check `dataWarning` when present. Args: ticker: Filter by exact ticker (case-insensitive, e.g. 'SPY'). s…
| Parameter | Type | Description |
|---|---|---|
dte_max | ||
fields | string | |
strategy | string | |
ticker | string | |
underwater_only | boolean |
gammaledger_position
Return the full detail (including all legs) for a specific trade. The result has two parts: `trade` is the persisted record (legs, dates, notes) and `summary` is the computed view (P&L, ROI, DTE, capital at risk, Wheel/PMCC basis). `summary.plSource` says where the numbers came from: 'app' = embedded by the GammaLedger app (active positions, Wheel/PMCC positions, the 10 most recent closed trades); 'derived' = realized P&L recomputed from the legs of an older Closed/Expired trade (same rules as the app: credits minus debits minus fees; no…
| Parameter | Type | Description |
|---|---|---|
trade_id * | string |
gammaledger_wheel_pmcc_positions
Return Wheel and PMCC tracker positions with cost basis, premium history summary, and coverage status. Args: position_type: Filter by 'wheel' or 'pmcc'. Empty returns both.
| Parameter | Type | Description |
|---|---|---|
position_type | string |
gammaledger_recent_closed_trades
Return the most recently closed trades (sorted by close date). The GammaLedger app embeds only its 10 most recent closed trades in the saved database, so that is the most this can return. Use `gammaledger_search_trades` (status='Closed', optionally with `closed_after`) to list older ones - their P&L is derived from the legs. Args: limit: Maximum number of trades to return (default 10, max 10).
| Parameter | Type | Description |
|---|---|---|
limit | integer |
gammaledger_search_trades
Search across the full trade history with optional filters. Unlike `gammaledger_open_positions` (active only) or `gammaledger_recent_closed_trades` (the last 10 closed), this scans every trade - open, closed, expired, assigned. `pl` covers the whole history. `plSource` tells you where it came from: 'app' (computed by GammaLedger) or 'derived' (recomputed from the trade's legs for Closed/Expired trades the app did not embed - same arithmetic as the app). `pl` is null for open trades the app did not embed; those are left out whenever a…
| Parameter | Type | Description |
|---|---|---|
closed_after | string | |
closed_before | string | |
descending | boolean | |
fields | string | |
limit | integer | |
opened_after | string | |
opened_before | string | |
pl_max | ||
pl_min | ||
sort_by | string | |
status | string | |
strategy | string | |
ticker | string |
gammaledger_concentration_risk
Return the top concentrated active positions by capital at risk, with each position's share of total collateral as a percentage.
gammaledger_expiring_positions
Return active positions expiring within N days, sorted by DTE ascending. DTE is as of the export date; check `dataWarning` when present. Args: within_days: Look-ahead window in days (default 7, max 365).
| Parameter | Type | Description |
|---|---|---|
within_days | integer |
gammaledger_audit_risk
Comprehensive risk audit: drawdown, concentration, expiring, underwater positions, Wheel/PMCC coverage gaps. Returns structured findings grouped by severity (high / watch / healthy).
gammaledger_audit_wheel_pmcc
Audit Wheel and PMCC positions — flags coverage gaps, cost-basis awareness, and premium-collection effectiveness.