Skip to main content
Glama

Get the portfolio

get_portfolio
Read-only

What the user holds today and the tax on it. Use it when they ask what their crypto is worth, what it cost, how its value moved, or how much of it is owed in tax.

    ``state`` is the Planner's (get_planner): only ``ready`` carries figures, ``working``
    is asked again in a few seconds, any other is said and left. ``standing``: what is
    held, holding by holding (``holdings``: where, how many, what selling it today would
    fetch, what it cost — null where nobody knows — and the part already free of tax;
    ``assets`` the same summed by asset, one coin on several chains being one),
    and ``days``, its value at the end of each day before today in the account's
    currency, each day at its own price (``unvalued`` holdings that day are in no figure —
    no price then, or not all of it read — and a day whose ``value`` is null held
    something nothing of which could be valued: say so, never read either as zero).
    ``frees`` false: their law frees nothing by a holding period, so no part is ever
    "free of tax" by waiting (each holding's ``free`` is then null). It is the ledger's
    sum of what was read, not a balance read from a chain. ``year``: the running tax
    year so far. ``owed``: the tax years that ended and are not marked filed, each with
    its figure and its tax in money (null where the rate depends on the person's other
    income — then say the figure and that the tax is theirs to work out) and ``whole``
    (false: items still wait on an answer, so the figure is a part — say so), and
    ``owed_tax`` their tax together, null where any is not whole or states none. With
    Premium, ``standing.headline`` and ``standing.tax`` say what selling everything today
    would add to the running year, over the parts of that sale that could be computed
    (``standing.unsettled`` counts the rest — a cost nobody knows, no price — and while
    it is above 0 those two are not the whole of it: say so), and ``free_by_month`` when
    the holdings become tax-free; without it those are empty, which is no zero.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
clientNoAn account this user may read as its accountant (a client's ``user_id`` from list_clients). Left out: their own account, which is every private user's case.

Output Schema

NameRequiredDescriptionDefault
owedNo
yearNo
stateYes
assetsNo
countryYes
premiumYes
readingYes
left_outNo
owed_taxNo
standingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations already say readOnlyHint=true and openWorldHint=false, but the description adds substantial behavior an agent could not infer: the Planner gating state machine, the polling instruction on ``working``, and repeated warnings not to read nulls as zero (``unvalued`` days, null ``value`` days, null tax rates, ``whole=false`` figures). It also discloses the ``frees`` flag's effect on ``free`` and that Premium-gated fields return empty rather than zero. No statement contradicts the read-only 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?

The scope and triggers are front-loaded, but what follows is a dense, telegraphic block using double-backtick field notation and clipped phrasing ('any other is said and left', 'one coin on several chains being one') that takes effort to parse. Nearly every sentence carries real null-handling information, so little is truly waste, yet the structure forces re-reading and would benefit from bullets per returned field.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, Premium-tiered, Planner-gated aggregation tool, the description covers the states, the null semantics, the tax-year and owed structure, and the incomplete-computation caveats. An output schema exists, so the field enumeration is partly redundant, though the null-meaning commentary earns its place. The only real gap is guidance on the ``client`` parameter, which the schema handles alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single ``client`` parameter already has full schema coverage, including its semantics as an accountant reading a client's account via list_clients. The description never mentions ``client`` at all, so it adds no meaning beyond the schema. With 100% coverage the baseline of 3 is appropriate, but this is the one place the prose could have added value and did not.

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 concrete scope: 'What the user holds today and the tax on it', which tells an agent this returns holdings plus tax liability rather than transactions or plans. The four trigger questions (worth, cost, value moved, tax owed) sharpen the purpose further. It stops short of naming a sibling to contrast with, so an agent must still infer the boundary against tools like get_year_breakdown or get_tax_reports.

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?

The 'Use it when they ask…' sentence gives four explicit user-intent triggers, which is well above the typical 'get portfolio' definition. It also gives an internal handling rule for ``state``: only ``ready`` carries figures, ``working`` should be re-asked shortly, anything else is reported and abandoned. It does not state when NOT to use it or name a competing tool, so the routing guidance is contextual rather than exhaustive.

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.

Resources