Skip to main content
Glama

status

Read-only

Retrieve a complete portfolio snapshot: cash by currency, holdings with units, average cost, live price, and unrealized P&L per position and total. Read-only; use before trades or to check P&L.

Instructions

Get a full snapshot of the user's portfolio: cash balances per currency, every holding with units / average cost / live price, and unrealized P&L per position and in total.

Use when the user asks "show my portfolio", "how is my P&L", or before proposing any trade. Read-only; fetches live quotes, so values change between calls.

Returns: Object with cash (currency → amount), all_holdings (every position, priced the same way whatever the symbol: units, avg_cost, live price, market value, pnl_pct; null price fields when a quote is unavailable; each carries alerts, the user's per-asset alert lines with the distance still to go, e.g. "距 price_below 还有 3.2%" — a tracked asset with alert lines but no holding row appears as an is_tracking_only row), total_assets_cny, fx (rate to CNY per non-CNY currency in use), an optional gold summary when a gold-per-gram holding exists, and performance (real-account TWR 30d / YTD / since inception, XIRR, max drawdown with peak/trough dates, annualised volatility, return vs the configured benchmark, price_basis per symbol (raw | adjusted), and data_quality; or {"status": "insufficient_history"} until the ledger spans 2 trading days), income_30d (dividends / interest received in the last 30 days by currency; only present when there are any), and pending_fund_orders + pending_fund_orders_line (off-exchange fund orders placed but not yet confirmed — cash already deducted, total_assets_cny counts them at face value; only present when there are any).

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.34.0
  2. Removedv0.31.5
  3. First observedv0.31.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint; the description adds the operationally important fact that it fetches live quotes so values change between calls — an agent must know not to cache or compare stale snapshots. It also discloses degradation behavior (null price fields on unavailable quotes, {"status": "insufficient_history"} until two trading days of ledger exist) and conditional field presence, none of which is inferable from the annotation.

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

Conciseness3/5

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

Structure is good — purpose, then when-to-use, then returns, front-loaded correctly. But the Returns block runs long for a zero-argument tool and largely re-enumerates fields the output schema already defines (fx, total_assets_cny, performance, income_30d, pending_fund_orders), burying the genuinely useful caveats (null quotes, is_tracking_only rows, insufficient_history) inside field-by-field detail.

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 high-complexity portfolio snapshot the description covers the full surface an agent needs: what is returned at a summary level, how missing quotes and tracking-only assets appear, the insufficient-history state, and that figures shift between calls. An output schema exists, so it is not required to enumerate returns — doing so makes it more than complete, not less.

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?

Zero parameters, so there is no parameter semantics to explain; the baseline for a no-arg tool applies. Nothing in the description misdescribes or implies hidden inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource plus an enumeration of scope: cash per currency, units/avg cost/live price per holding, unrealized P&L per position and total. That is far more than a restatement of the name. It stops short of a 5 because it never names the overlapping siblings (live_prices, daily_report, history) that an agent might otherwise reach for when it just needs quotes or a summary.

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?

Gives concrete trigger phrases ("show my portfolio", "how is my P&L") and a forward-looking trigger ("before proposing any trade"), which is real routing guidance rather than implied usage. No exclusions or named alternatives, so it sits at a clear 4 rather than 5.

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