Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PAPERTRADE_DBNoSQLite portfolio path~/.papertrade.db
PAPERTRADE_API_TOKENNoLoopback API bearer token
PAPERTRADE_PRICE_FILENoDeterministic local JSON price map
PAPERTRADE_MCP_PROFILENoMCP catalog: core, advanced, fullcore
PAPERTRADE_STATIC_PRICESNoInline JSON price map{}
PAPERTRADE_MARKET_TIMEOUTNoHistorical request timeout15
PAPERTRADE_PRICE_CACHE_TTLNoCross-process price cache life15
PAPERTRADE_PRICE_PROVIDERSNoOrdered file, static, yahoo provider chainstatic,yahoo
PAPERTRADE_NOTIFICATION_FILENoAlert notification JSONL inbox~/.papertrade_notifications.jsonl
PAPERTRADE_ENCRYPTION_PASSWORDNoPassword used for encrypted copies
PAPERTRADE_MCP_RESPONSE_FORMATNoOverride a profile's response format: json|legacy

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
account_createC

Create an account. Reuse idempotency_key safely when retrying the same mutation.

account_listA

List all paper accounts and their cash balances.

tickA

Check all pending limit orders against current prices and fill any that crossed.

positionsA

List open positions (symbol, side, qty, avg cost, asset class) for an account.

ordersB

List paginated order history, including source agent and idempotency key.

pnlA

Mark-to-market P&L report for an account: positions, unrealized P&L, cash, total equity.

rename_accountA

Rename a paper portfolio. Updates positions, orders, history, and the default pointer.

summaryA

One-line-per-portfolio snapshot for all accounts: cash, equity, unrealized P&L, position count. Fast overview for deciding which account to act on.

performanceB

Portfolio performance since inception: return, CAGR, Sharpe, Sortino, volatility, max drawdown. Reconstructs a daily equity curve from the trade/cashflow ledger and real historical prices.

portfolio_backtestA

Backtest the account's current open positions and cash with backtesting.py.

The universe is read from this account's SQLite positions, options without reliable continuous history are reported as skipped, and results include the equity curve, return, CAGR, volatility, Sharpe, Sortino, and drawdown. The default window is five years; request up to 36500 calendar days. This is a current-holdings retrospective, not an out-of-sample strategy test.

buy_optionA

Buy an option. expiry is YYYY-MM-DD, kind is 'C' or 'P', contracts x100 shares. Market order unless limit (premium) is given. Use option_chain to find valid expiries/strikes.

sell_optionB

Sell/write an option (opens a short if not covering). Same params as buy_option.

option_chainA

List option expiries for an underlying, or near-the-money strikes for one expiry (YYYY-MM-DD).

futures_symbolsA

List supported futures symbols with their contract multiplier and initial margin.

set_default_accountA

Set the default portfolio used by the CLI and dashboard when no account is specified.

market_statusA

Holiday/early-close-aware NYSE status and next open/close time.

order_cancelB

Cancel one pending order by id; canonical counterpart to order_cancel_all.

depositB

Add cash to a paper account.

withdrawB

Remove cash from a paper account (fails if it would go negative).

get_default_accountA

Return the account used when CLI/TUI calls omit an explicit account.

account_detailsC

Account balances, configured risk limits, and open-position count.

preview_orderA

Dry-run an order against cash, margin, short, naked-option, and leverage limits.

risk_getA

Show the account's shorting, naked-option, leverage, and order-size limits.

risk_setB

Change selected account risk limits; omitted fields retain their current values.

asset_searchB

Search Yahoo Finance for matching symbols, asset types, and exchanges.

validate_symbolC

Validate a symbol and return its live price, class, multiplier, and margin.

bulk_quotesA

Fetch up to 50 comma-separated live symbols concurrently.

healthcheckA

Check SQLite integrity, WAL mode, schema version, and core record counts.

database_backupA

Create a consistent online backup under ~/.papertrade_backups.

config_listA

List all config keys.

config_getC

Get a config value.

config_setC

Set a config value.

config_deleteC

Delete a config key.

eventsA

Poll unified audit/order events since an id. For agents to replace polling with incremental sync.

quotes_streamA

Poll live quotes N times at an interval; returns list of snapshots for a simple stream without WebSocket.

audit_logA

Paginated mutation audit trail with agent and idempotency attribution.

order_submitC

Submit market, limit, stop, stop-limit, trailing, bracket, OCO, or OTO orders.

order_getA

Get one order by numeric id or by account plus client order id.

order_replaceA

Replace selected fields on a pending order and return the new order id.

order_cancel_allA

Cancel every pending/held order, optionally restricted to one account.

position_getA

Get one live-marked position with market value and unrealized P&L.

position_closeB

Close all or part of one position by quantity or percentage.

position_close_allB

Liquidate every open position in an account at current market prices.

option_contractA

Parse and quote one OCC option contract.

watchlist_createB

Create a persistent named watchlist with comma-separated symbols.

watchlist_listB

List an account's persistent watchlists.

watchlist_getC

Get one named watchlist or numeric watchlist id.

watchlist_addB

Add a symbol to a persistent watchlist.

watchlist_removeB

Remove a symbol from a persistent watchlist.

watchlist_deleteC

Delete a persistent watchlist.

watchlist_quotesA

Return live quotes for every symbol saved in a watchlist.

trading_calendarB

List NYSE sessions, including holidays and early closes.

account_activityC

Unified account fills, orders, transfers, dividends, splits, and option events.

market_barsC

Historical OHLCV bars from Yahoo Finance.

market_latest_quoteC

Latest bid, ask, and last indication.

market_snapshotC

Combined latest quote, daily bar, previous close, and change.

market_newsC

Recent symbol news headlines and links.

market_most_activesD

Current most-active equity screener.

market_moversC

Current day gainers and losers.

mcp_catalogA

Describe the active catalog, response contract, profiles, and legacy aliases.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.8/5.0

Scored across 60 tools

Disambiguation3/5

Most tools are grouped by resource with specific descriptions, but there is overlap between order_submit and buy_option/sell_option for option trades, and events/audit_log/account_activity all present similar history/log data. Helpful descriptions mitigate the ambiguity, but selection is not always obvious.

Naming Consistency3/5

Naming is readable due to consistent resource prefixes like order_, watchlist_, market_, and config_, but the convention is mixed: order_submit is object_verb, validate_symbol is verb_object, and summary/positions/pnl/healthcheck are noun-only. The lack of a uniform pattern prevents a higher score.

Tool Count1/5

At 60 tools, this server far exceeds the 3-15 well-scoped range and crosses the 50+ extreme mismatch threshold. Even for a trading CLI, the tool surface is overwhelming; it should be consolidated or split into focused sub-servers to keep agent selection tractable.

Completeness5/5

The tool surface covers account management, order lifecycle, positions, watchlists, market data, options and futures, risk management, performance/backtest, audit/events, config, and backup/admin. Common trading workflows have no obvious dead ends, making this a very complete server for its domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues