Skip to main content
Glama

Get wallet profit and loss

get_wallet_pnl
Read-onlyIdempotent

Calculates profit and loss for a Solana wallet's higher.fun coins from its on-chain transactions, showing average cost, realized gains, and unrealized value for held or sold-out mints.

Instructions

Profit and loss on a wallet's higher.fun coins, worked out from its own transactions on-chain, whichever app made them: SOL spent and received, average cost, realized profit on sells, and unrealized profit on what's still held, valued at what selling it all would return now. Without mints it covers the wallet's 5 largest holdings; name mints for others, or for coins it has sold out of. It reads up to 200 transactions; past that, notes say what's left out. Searching history needs an RPC that can: Solana's public RPC often times out.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "wallet": "<wallet>"
    },
    "name": "get_wallet_pnl"
  }
}

Input Schema

NameRequiredDescriptionDefault
mintsNoAt most 5 coins, held or sold out. Omit for the wallet's largest holdings.
walletYesA Solana wallet address (base58).
historyNoAlso list each coin's latest 20 transactions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description still adds substantive context beyond them: a 200-transaction read cap with notes describing what was left out, the valuation method (what selling everything now would return), and an RPC caveat warning that Solana's public endpoint often times out. That is exactly the kind of operational disclosure an agent needs before calling an open-world chain-reading tool.

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?

Front-loads what is computed and how, then moves to defaults and limits. Two long but dense sentences with little filler. The final RPC sentence is awkwardly spliced ('an RPC that can: Solana's public RPC often times out') and costs some clarity.

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?

With no output schema, the description usefully enumerates the return components and discloses the truncation and RPC caveats. It stops short of describing the shape of the response or how partial/truncated results are surfaced, but nothing essential for correct invocation is missing.

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%, and the description's note about mints defaulting to the 5 largest holdings largely restates the schema's own 'Omit for the wallet's largest holdings'. The history parameter gets no mention in the description at all. Baseline 3 is appropriate since the schema carries the parameter burden.

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?

States a specific verb-resource pair (profit and loss on a wallet's higher.fun coins) and immediately scopes the method: computed from the wallet's own on-chain transactions regardless of which app made them. The enumerated outputs — SOL spent/received, average cost, realized profit, unrealized profit — make it unmistakable versus siblings like get_wallet_positions or get_wallet_profile.

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?

Clear operational guidance: omit mints to get the 5 largest holdings, name mints for other coins or coins already sold out. It doesn't explicitly contrast with get_wallet_positions, so an agent must infer when to pick this over the sibling positions tool, but the cost-basis framing largely does that work implicitly.

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