Skip to main content
Glama

Analyzing wallet performance

wallet_pnl_summary
Read-onlyIdempotent

Get aggregate stats of overall realized PnL for the input address. For Hyperliquid perp traders (chain='hyperliquid'), includes realized PnL from fills plus a current unrealized snapshot of open positions. For chain='all'/'evm' on an EVM address, reports spot/on-chain and Hyperliquid perp results as separate sections (never summed). For a single named chain, this tool covers realized PnL only. Use this tool for analysing the performance of the wallet over a time period.

For a trader, send trader_id instead of walletAddress: the spot PnL of all wallets of the trader and a separate Hyperliquid perp section.

Query by trader

{"trader_id": "5482f9aeb02f67b7", "dateRange": {"from": "30D_AGO", "to": "NOW"}}

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": {
      "request": "<request>"
    },
    "name": "wallet_pnl_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesComplete request for wallet PnL summary (flattened).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / request / properties / trader_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Trader ID from the Traders results of general_search. Covers all wallets of the trader. Use it instead of address or entity_id. With trader_id, chain is not used (the PnL covers all wallets of the trader), and the Hyperliquid perp PnL has the fixed windows 7D and 30D, not dateRange."
      +}
    • addedInput schema / properties / request / properties / walletAddress / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / request / properties / walletAddress / default
      Added value: +null
    • changedInput schema / properties / request / properties / walletAddress / description
      Previous value: -"The wallet address to analyze"New value: +"The wallet address to analyze. REQUIRED if trader_id is not provided. Cannot be used together with trader_id."
    • removedInput schema / properties / request / properties / walletAddress / type
      Removed value: -"string"
    • changedInput schema / properties / request / required
      Previous value: -[
      -  "walletAddress",
      -  "dateRange"
      -]New value: +[
      +  "dateRange"
      +]
  2. Changed6 schema fields changed
    • addedInput schema / properties / request / additionalProperties
      Added value: +false
    • removedInput schema / properties / request / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Complete request for wallet PnL summary (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "description": "Blockchain to query. Use 'hyperliquid' for Hyperliquid perp traders only (realized PnL from fills + current unrealized snapshot). 'evm'/'all' on an EVM address reports spot/on-chain and Hyperliquid perp results in separate sections. Or pass a specific chain name for that chain's spot PnL alone.",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "description": "Date range for PnL summary analysis",
      -        "properties": {
      -          "from": {
      -            "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "dateRange"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / request / description
      Added value: +"Complete request for wallet PnL summary (flattened)."
    • addedInput schema / properties / request / properties
      Added value: +{
      +  "chain": {
      +    "default": "evm",
      +    "description": "Blockchain to query. Use 'hyperliquid' for Hyperliquid perp traders only (realized PnL from fills + current unrealized snapshot). 'evm'/'all' on an EVM address reports spot/on-chain and Hyperliquid perp results in separate sections. Or pass a specific chain name for that chain's spot PnL alone.",
      +    "type": "string"
      +  },
      +  "dateRange": {
      +    "additionalProperties": false,
      +    "description": "Date range for PnL summary analysis",
      +    "properties": {
      +      "from": {
      +        "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      +        "type": "string"
      +      },
      +      "to": {
      +        "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "from",
      +      "to"
      +    ],
      +    "type": "object"
      +  },
      +  "walletAddress": {
      +    "description": "The wallet address to analyze",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / request / required
      Added value: +[
      +  "walletAddress",
      +  "dateRange"
      +]
    • addedInput schema / properties / request / type
      Added value: +"object"
  3. Changed1 schema field changed
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Complete request for wallet PnL summary (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "description": "Blockchain to query. Use 'hyperliquid' for Hyperliquid perp traders only (realized PnL from fills + current unrealized snapshot). 'evm'/'all' on an EVM address reports spot/on-chain and Hyperliquid perp results in separate sections. Or pass a specific chain name for that chain's spot PnL alone.",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "description": "Date range for PnL summary analysis",
      -        "properties": {
      -          "from": {
      -            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "dateRange"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Complete request for wallet PnL summary (flattened).",
      +    "properties": {
      +      "chain": {
      +        "default": "evm",
      +        "description": "Blockchain to query. Use 'hyperliquid' for Hyperliquid perp traders only (realized PnL from fills + current unrealized snapshot). 'evm'/'all' on an EVM address reports spot/on-chain and Hyperliquid perp results in separate sections. Or pass a specific chain name for that chain's spot PnL alone.",
      +        "type": "string"
      +      },
      +      "dateRange": {
      +        "description": "Date range for PnL summary analysis",
      +        "properties": {
      +          "from": {
      +            "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "walletAddress": {
      +        "description": "The wallet address to analyze",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "walletAddress",
      +      "dateRange"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Complete request for wallet PnL summary (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "description": "Date range for PnL summary analysis",
      -        "properties": {
      -          "from": {
      -            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "dateRange"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Complete request for wallet PnL summary (flattened).",
      +    "properties": {
      +      "chain": {
      +        "default": "evm",
      +        "description": "Blockchain to query. Use 'hyperliquid' for Hyperliquid perp traders only (realized PnL from fills + current unrealized snapshot). 'evm'/'all' on an EVM address reports spot/on-chain and Hyperliquid perp results in separate sections. Or pass a specific chain name for that chain's spot PnL alone.",
      +        "type": "string"
      +      },
      +      "dateRange": {
      +        "description": "Date range for PnL summary analysis",
      +        "properties": {
      +          "from": {
      +            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "walletAddress": {
      +        "description": "The wallet address to analyze",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "walletAddress",
      +      "dateRange"
      +    ],
      +    "type": "object"
      +  }
      +]
  5. Changed3 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "DateRange": {
      -    "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      -    "properties": {
      -      "from": {
      -        "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      },
      -      "to": {
      -        "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "from",
      -      "to"
      -    ],
      -    "type": "object"
      -  },
      -  "WalletPnlSummaryRequest": {
      -    "description": "Complete request for wallet PnL summary (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "$ref": "#/$defs/DateRange",
      -        "description": "Date range for PnL summary analysis"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "dateRange"
      -    ],
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "$ref": "#/$defs/WalletPnlSummaryRequest"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Complete request for wallet PnL summary (flattened).",
      +    "properties": {
      +      "chain": {
      +        "default": "evm",
      +        "type": "string"
      +      },
      +      "dateRange": {
      +        "description": "Date range for PnL summary analysis",
      +        "properties": {
      +          "from": {
      +            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "walletAddress": {
      +        "description": "The wallet address to analyze",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "walletAddress",
      +      "dateRange"
      +    ],
      +    "type": "object"
      +  }
      +]
  6. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds genuinely non-obvious behavior: hyperliquid results include an unrealized snapshot while single-chain results are realized only, evm/all are reported as separate never-summed sections, and trader_id silently ignores chain and forces fixed 7D/30D windows instead of dateRange. Those are exactly the gotchas an agent would otherwise get wrong. It omits failure modes and cost/latency behavior, which keeps it below a 5.

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

Conciseness3/5

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

The purpose is front-loaded and the trader_id paragraph earns its place, but the chain semantics are restated nearly verbatim from the schema's own chain description, and the closing JSON snippet is ambiguous about nesting. A short bulleted mode table would have carried the same information in less space.

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?

An output schema exists so return values need no explanation, and the description covers both entry paths (wallet versus trader) plus the chain-mode matrix, which is the core complexity of this single-parameter nested request. Gaps are minor: what happens with a non-EVM chain name, and any requirement that exactly one of trader_id/walletAddress be supplied.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics on top: trader_id and walletAddress are mutually exclusive, trader_id supersedes chain, and the dateRange contract changes under trader_id. It also supplies an example payload, though the example is written in the flattened shape while the schema requires a 'request' wrapper, which slightly muddies the parameter guidance.

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?

The opening sentence names a specific verb and resource ('aggregate stats of overall realized PnL') and immediately qualifies scope per chain mode, so an agent knows this is a portfolio-level PnL aggregator rather than a per-token or per-position tool. It stops short of naming the closest alternative (wallet_pnl_for_token) even though that sibling is the obvious confusion risk.

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?

It states the use case explicitly ('analysing the performance of the wallet over a time period') and resolves the main routing decision by explaining when to send trader_id instead of walletAddress. It gives no negative guidance or named alternative tool, so the agent must infer that per-token PnL belongs elsewhere.

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