Skip to main content
Glama
alekskram

dydx-agent-gateway

Trader Pnl Stats

trader_pnl_stats
Read-only

Get daily PnL, win rate, deposit-adjusted max drawdown, Sharpe-like ratio, and a reconciliation residual from an equity curve to spot phantom PnL.

Instructions

Deep PnL statistics from the equity curve: daily PnL, day-winrate, max drawdown (deposit-adjusted), Sharpe-like daily ratio, and the data-accuracy reconciliation residual (phantom-PnL detector). NOTE: pass limit as keyword: trader_pnl_stats(addr, limit=500), NOT positionally (second positional arg is subaccountNumber). Key fields: day_winrate_pct (0-100), max_drawdown_pct (pct, net of deposits/withdrawals) with max_drawdown_usd (same drawdown in USD) and dd_pct_unreliable (true when the deposit-adjusted peak at the worst drawdown was near zero — trust the USD figure then), avg_daily_pnl / best_day / worst_day (USD per UTC day), sharpe_like_daily, identity_max_residual_usd (expect < $1 on clean data). limit: history depth in points — 1000 ≈ 42 days (default, fast), 5000 ≈ 7 months (slower, multi-page fetch). Example: trader_pnl_stats(address="dydx1m9hg73dtn5ku8ulmj8rjmdqh0hk7uuhawc69cn", limit=5000)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
addressYes
subaccountNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only/open-world/non-destructive behavior. The description adds meaningful context on top: deposit-adjusted drawdown, the dd_pct_unreliable trust guidance, and the identity_max_residual_usd expectation on clean data. This goes beyond what annotations alone provide.

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?

The description is dense but every clause earns its place. Key caveats, parameter traps, unit conventions, and reliability notes are all included without padding, and the structure makes the critical information easy to scan.

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?

The presence of an output schema covers the return shape, and the description handles non-obvious reliability caveats and limit semantics. It is slightly incomplete only in that it never states when to prefer this tool over trader_profile or registry_stats, and subaccount meaning remains implicit.

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?

With 0% schema description coverage, this description compensates well: it warns that limit must be a keyword argument, explains limit as history depth with a performance/latency hint, and surfaces subaccountNumber as the positional trap. However, address and subaccount semantics are only shown through an example and are not fully defined.

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?

The description names a specific resource ('equity curve') and a specific intent ('Deep PnL statistics'), then enumerates distinctive outputs such as day-winrate, drawdown, Sharpe-like ratio, and the phantom-PnL residual. This makes it easy to distinguish from siblings like trader_profile or registry_stats.

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?

The use case is implied—if an agent needs deep PnL diagnostics, this is the tool—but there is no explicit statement of when to use it versus alternatives, nor any exclusions. The keyword-argument note is about invocation, not usage selection.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alekskram/dydx-agent-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server