Skip to main content
Glama

get_portfolio

Read-only

Read token holdings for a managed GDEX wallet on one chain, returning raw and decimal balances, price, native value, and P&L per token. Requires accountRef session.

Instructions

Token holdings of the managed GDEX wallet on one chain (/v1/portfolio): exact raw and decimal balances, price, native value and P&L per token. Needs the session (accountRef). Errors instead of returning an empty portfolio when the read fails.

Input Schema

NameRequiredDescriptionDefault
dataNoEncrypted session data, instead of sessionPrivateKey + apiKey
chainYesChain to read (holdings are per chain)
apiKeyNoGDEX API key (with sessionPrivateKey)
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
walletAddressNoControl wallet address (the GDEX userId), not the managed trading wallet
sessionPrivateKeyNoSession private key from sign-in (with apiKey)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv5.1.0
    • addedInput schema / properties / accountRef
      Added value: +{
      +  "description": "Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat",
      +  "type": "string"
      +}
    • addedInput schema / properties / apiKey
      Added value: +{
      +  "description": "GDEX API key (with sessionPrivateKey)",
      +  "type": "string"
      +}
    • changedInput schema / properties / chain / description
      Previous value: -"Optional chain filter"New value: +"Chain to read (holdings are per chain)"
    • addedInput schema / properties / data
      Added value: +{
      +  "description": "Encrypted session data, instead of sessionPrivateKey + apiKey",
      +  "type": "string"
      +}
    • addedInput schema / properties / sessionPrivateKey
      Added value: +{
      +  "description": "Session private key from sign-in (with apiKey)",
      +  "type": "string"
      +}
    • changedInput schema / properties / walletAddress / description
      Previous value: -"Wallet address to query"New value: +"Control wallet address (the GDEX userId), not the managed trading wallet"
    • changedInput schema / required
      Previous value: -[
      -  "walletAddress"
      -]New value: +[
      +  "chain"
      +]
  2. First observedv4.11.3

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description's added detail that it 'errors instead of returning an empty portfolio when the read fails' is genuine extra behavioral context an agent cannot get from the annotations. It also names the session requirement, adding useful operational transparency.

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?

Three compact sentences, front-loaded with the resource and scope, then return fields, then the session/error note. No filler, though the field enumeration is slightly dense.

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 read-only tool with no output schema, the description adequately covers what is returned (raw/decimal balances, price, native value, P&L), the session prerequisite, and failure behavior. It stops short of noting pagination or chain-specific caveats, but it is largely complete for an agent to call it correctly.

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?

Schema coverage is 100%, so the schema already documents all six parameters including accountRef and chain. The description reaffirms the accountRef/session requirement and per-chain scoping but adds no syntax or format detail beyond the schema, making the baseline 3 appropriate.

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?

States the specific resource (token holdings) and scope (managed GDEX wallet, one chain) plus the endpoint /v1/portfolio, and enumerates returned fields. An agent can tell it reads portfolio holdings rather than order history or generic balances, though it never names the sibling tools it is distinct from (e.g., get_wallet_info, get_balances).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: 'Needs the session (accountRef)' and 'one chain' hint at prerequisites, but the description never says when to choose this over the many sibling read tools like get_balances or gdex_positions. No explicit when/when-not guidance or alternatives are provided.

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

Deploy Server

Other Tools