Skip to main content
Glama

Get Portfolio

get_portfolio
Read-onlyIdempotent

Get account-level balances, equity, buying power, positions, and Web3 wallet holdings across connected brokers and wallets. Read each account's pnl_summary for equity, balance, unrealized_pnl and daily_pnl: a null value means the broker did not report it (say 'unknown', never assume 0 or break-even); partial_errors says which call failed. Accounts in equity_unavailable_for are excluded from the totals. Use get_positions when you only need normalized open exposure. Label each account by its display_label (broker · environment · •••••last5 of the broker's own account number); never call an account by broker_account_id, which is Gogi-internal. Each position has attribution: 'this_agent' or 'outside_this_agent'. Read policy_context before judging risk: the agent's policy (incl. max_daily_loss, measured on the agent's own realized P&L) does not apply to positions the user opened outside this agent — never call those a policy breach.

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

No arguments

Output Schema

NameRequiredDescriptionDefault
errorNo
messageNo
successNo
walletsNo
broker_accountsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / description
      Previous value: -"Structured Gogi result. Error responses include error and message fields."New value: +"Structured result. Error responses include error and message."
    • addedOutput schema / properties
      Added value: +{
      +  "broker_accounts": {
      +    "type": "array"
      +  },
      +  "error": {
      +    "type": "string"
      +  },
      +  "message": {
      +    "type": "string"
      +  },
      +  "success": {
      +    "type": "boolean"
      +  },
      +  "wallets": {
      +    "type": "array"
      +  }
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Structured Gogi result. Error responses include error and message fields.",
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive and open-world behavior, and the description goes well beyond them by disclosing null-handling semantics for unreported broker fields, the meaning of partial_errors, and that accounts in equity_unavailable_for are excluded from totals. It stops short of describing pagination or freshness/latency of the aggregated data, which is the one behavioral gap remaining.

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 purpose is front-loaded in the first sentence and every subsequent clause carries an operational rule rather than filler. It is dense and clause-heavy, with several instructions packed into long sentences, but nothing is genuinely redundant.

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 zero-parameter, read-only aggregation tool with an output schema, the description supplies all the interpretive context an agent needs: null semantics, error surfacing, exclusion lists, labeling rules, attribution, and the policy caveat. Nothing required to call it or read its result correctly is missing.

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?

The tool takes no parameters, so there is nothing for the description to disambiguate beyond what the empty schema conveys, which matches the baseline-4 rule. The extensive guidance about response fields (pnl_summary, partial_errors, attribution) is correctly attributed elsewhere rather than being parameter semantics.

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?

The first sentence names a specific verb and enumerates the exact resource set (balances, equity, buying power, positions, Web3 holdings) and its scope (across connected brokers and wallets). It also explicitly separates itself from get_positions, so an agent can route correctly without opening either 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?

It gives an explicit alternative and the condition that selects it ('Use get_positions when you only need normalized open exposure'), plus procedural guidance on ordering work: read pnl_summary, consult policy_context before judging risk, and never treat outside-agent positions as a policy breach.

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