Skip to main content
Glama

Wallet PnL

wallet_pnl
Read-only

Per-token realized and unrealized PnL (average-cost basis) from the wallet's visible swap history, priced at swap time. An estimate: transfers/airdrops aren't cost basis and history is a recent window (stated in the result). Ends with a swap CTA to take profit or cut a loser. Result includes display markdown with chan images: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

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": {
      "address": "<address>"
    },
    "name": "wallet_pnl"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesWallet address (EVM 0x…, Solana, Tron T…) or a name (vitalik.eth, jesse.base.eth, toly.sol)
chainIdNoChain id (1, 8453, 42161, 10, 137, 56, 43114, 59144, 534352, 792703809 Solana, 8253038 Bitcoin, 728126428 Tron) or name (eth, base, arbitrum, optimism, polygon, bnb, avalanche, linea, scroll, solana, bitcoin, tron).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld; the description adds the substantive caveats an agent needs: it is an estimate, transfers/airdrops are not treated as cost basis, history is a recent window stated in the result, and the output contains a `display` markdown field with images the agent must surface to the user. That is well beyond what the annotations convey.

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 core definition and estimate caveats are front-loaded and earn their space. The trailing playbook section with seven enumerated workflow names is somewhat bulky and could be trimmed, but it is at the end where it does not bury the key information.

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 carries return-value burden and does so partially: it explains that the result includes a `display` markdown block and states the history window in the result. It does not describe the per-token PnL record structure (fields, realized vs unrealized breakdown), leaving a modest gap.

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 description coverage is 100%, so both `address` (EVM/Solana/Tron/ENS names) and `chainId` (ids or names) are already fully documented in the schema. The description adds no parameter-level detail such as chain-selection defaults or behavior when chainId is omitted, so the baseline 3 applies.

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: per-token realized and unrealized PnL derived from the wallet's swap history on an average-cost basis. The scope ('visible swap history, priced at swap time') clearly separates it from siblings like wallet_history and get_wallet_balances, which report activity and holdings rather than cost-basis PnL.

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 clear usage context — it is a follow-on analysis and ends with a swap CTA — and routes the agent to swapchan_playbook for multi-step workflows (find-money, best-swap, etc.). It does not explicitly state when NOT to use it versus wallet_history or get_wallet_balances, so it falls short of full when/when-not routing.

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.