Skip to main content
Glama

Profit and loss, daily value history, results per pair

get_performance
Read-onlyIdempotent

Measure how the portfolio performed, in one of three views. pnl: TRUE profit and loss over period with the user's own deposits and withdrawals stripped out: realized vs unrealized, net flows, income, fees, top gainers and losers, and a plain-English explanation. history: the daily series over period, oldest first: total value, net capital in, cost basis and cash in and out per UTC day. realized_by_pair: all-time realized FIFO profit ranked by trading pair, best first. Arguments apply per view, and a call that sets one its view does not take is refused: period (pnl, history; omit for all time); slim (history: true drops the per-asset breakdown, recommended unless composition is needed); limit and quote (realized_by_pair: the limit best AND limit worst pairs quoted in quote, defaults 20 and USDT, never summed across quote currencies). All values are USD end-of-day marks, not live quotes: never report pnl.endValue as the current value (get_portfolio has it). A history longer than 200 days is sampled evenly, always keeping the first and the latest day, and says so in truncated; pick a shorter period for every day. For buy and sell totals use get_trading_activity; for single trades use get_movements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slimNohistory only. true returns the daily totals alone; false or omitted adds a USD value and a quantity for every asset on every day.
viewYesWhich view to read: pnl (true profit and loss over period); history (daily value series over period); realized_by_pair (all-time realized profit per trading pair). Each view takes only the arguments the description lists for it.
limitNorealized_by_pair only. How many best AND how many worst pairs to return, 1-100; up to twice this many rows come back. Defaults to 20.
quoteNorealized_by_pair only. Quote currency whose pairs to rank, e.g. "USDT" for BTCUSDT. Defaults to USDT.
periodNoTime window ending now: last_24h, last_7d, last_30d, last_90d, ytd (since 1 January UTC) or all. Omit for all time.
profileNoWhich portfolio to read, for accounts with more than one: its id, or its name (exact, case-insensitive, e.g. "Trading"). Omit to read this connection's default portfolio; every answer names the portfolio it read in `profile`. An unknown or shared name returns profile_not_found or profile_ambiguous listing the real ones, and list_profiles shows them up front.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pnlNoPresent when view = "pnl".
viewNoWhich view answered; its data is under the key of the same name.
errorNoPresent ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted. No data fields come with it; read `message` to the user rather than retrying the same call.
historyNoPresent when view = "history".
messageNoPlain-language explanation that accompanies `error` or a proposed change.
profileNoThe portfolio these figures belong to (absent on list_profiles).
source_urlNoLink to the page in the WhereItGoes app that shows this data.
upgrade_urlNoWhere the user can upgrade, on an upgrade_required refusal.
stock_assetsNoPresent when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto.
realized_by_pairNoPresent when view = "realized_by_pair".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

The annotations already establish a safe read-only, idempotent profile, but the description adds substantial behavioral context beyond them: values are USD end-of-day marks rather than live quotes, pnl.endValue must not be reported as current value, calls with arguments not accepted by the chosen view are refused, and history over 200 days is evenly sampled with first and latest day kept and a `truncated` flag set. Those are exactly the traits an agent needs to avoid misreporting results.

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 three views are front-loaded before the per-view argument rules and caveats, and essentially every sentence carries operational information. It is dense and long-sentenced, but the density is justified by the six parameters and three modes; little could be removed without losing a constraint.

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 six-parameter, three-mode read tool this is complete: it covers view selection, per-view arguments, truncation/sampling behavior, end-of-day valuation semantics, profile targeting, and redirection to sibling tools, while the existing output schema handles return shape. An agent has everything needed to call it correctly and interpret the result.

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?

With 100% schema coverage the baseline is 3; the description goes further by stating cross-parameter rules the schema cannot express: arguments apply per view, mismatched arguments are refused, `period` omitted means all time, `slim` is recommended unless composition is needed, and `limit` returns that many best AND worst pairs that are 'never summed across quote currencies'. These constraints add real meaning beyond the per-field schema text.

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 verb and resource ('Measure how the portfolio performed') and enumerates the three distinct views with their exact contents (realized vs unrealized, daily series, all-time FIFO per pair). It explicitly routes away from siblings get_portfolio, get_trading_activity, and get_movements, so an agent can select it without opening the 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?

Names the condition that selects each view and which arguments apply to each, states that invalid argument/view combinations are refused, and gives explicit alternatives for adjacent needs ('for buy and sell totals use get_trading_activity; for single trades use get_movements'). It even states which tool holds the current value (get_portfolio), leaving nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.