Skip to main content
Glama

Wallet trading profit and loss

get_wallet_pnl
Read-onlyIdempotent

Realised and unrealised profit and loss of a wallet's DEX trading (FIFO, in ADA and USD), win rate (percent), trade count, volume (ADA) and the tokens that contributed most. Only covers swaps since coverageFrom. Slower than other tools and limited to fewer calls per minute: call it only when PnL is actually asked for.

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": "get_wallet_pnl"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many tokens, largest PnL first, to return (1-30, default 10).
addressYesaddr1…, stake1… or $handle.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial beyond-schema context: FIFO accounting basis, dual currency (ADA and USD), scope bounded by `coverageFrom`, and an explicit rate-limit warning. The gap is that `coverageFrom` is never defined — the agent cannot tell what the actual coverage window is or how to determine it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences: what is returned, what its scope limit is, and when not to call it — front-loaded with the payoff and ending with the routing constraint. No filler, no restatement of the title.

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 returned fields and discloses the coverage boundary, which is the main risk for an agent interpreting PnL numbers. It stops short of explaining how the coverage window is determined or whether the figures are per-token vs aggregate, leaving a minor interpretive 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 coverage is 100%, with `limit`'s range, default, and ordering (largest PnL first) already documented in the schema. The description's 'tokens that contributed most' corroborates but adds no syntax or semantic detail beyond the schema, 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 resource and the exact metric set returned: realized/unrealized PnL (FIFO, ADA and USD), win rate, trade count, volume, and top contributing tokens. An agent can distinguish this from get_wallet_activity or get_recent_trades, which return raw activity rather than computed PnL.

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?

Explicit when-to-use gate: 'call it only when PnL is actually asked for', justified by cost ('slower than other tools') and rate limits ('limited to fewer calls per minute'). This tells the agent both when to reach for it and when to prefer cheaper siblings, without needing to open schemas.

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