Skip to main content
Glama

Wallet portfolio, history, compliance & PnL audit

wallet_treasury_pnl
Read-onlyIdempotent

Audits an EVM wallet by aggregating ETH, WETH, and USDC holdings, nonce history, top counterparties, taint, and PnL to assess treasury value and agent readiness.

Instructions

[$0.04] Trigger When: auditing wallet history, multi-asset portfolio USD value, or agent readiness. Workflow Outcome: aggregates ETH/WETH/USDC portfolio, nonce history, top counterparties, taint, and PnL. Do not use for DeFi borrow liquidation checks (use defi_position_shield) or protocol TVL checks (use defi_protocol_tvl_check). lookback_blocks is clamped to 100-2000 (default 1000) to keep eth_getLogs fast across public RPCs. Live RPC/log scan, read-only non-custodial; requires x402 USDC or Stripe MPP (10 free lifetime calls via /api/free/*) at 30-60 req/min.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wallet_treasury_pnl"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoEVM chain (base, ethereum, arbitrum, optimism)base
walletNo0x wallet address to audit
session_tokenNoOptional prepaid session token (x402s_...) from https://apix402data.com/pay after the 10-call free preview.
lookback_blocksNoRecent block window for USDC Transfer logs (100-2000)

Output Schema

NameRequiredDescriptionDefault
chainNo
cachedNo
walletNo
balancesNo
degradedNo
endpointNo
ops_readyNo
portfolioNo
rpc_sourceNo
block_windowNo
nonce_healthNo
non_custodialNo
schema_versionNo
wallet_historyNo
usdc_pnl_ledgerNo
recommended_actionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses payment requirements (x402 USDC or Stripe MPP), a free tier (10 lifetime calls via /api/free/*), rate limits (30-60 req/min), and that the lookback is clamped to keep eth_getLogs fast. These are concrete operational details an agent needs before invoking the 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?

The description is front-loaded with trigger, outcome, exclusions, and operational constraints. It is dense but largely earns its space; the bracketed price and multiple semicolon-separated clauses make it slightly harder to scan than ideal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, read-only aggregation tool with an output schema and full annotation coverage, the description covers purpose, alternatives, payment/auth requirements, rate limits, and parameter clamping. 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%, so the schema already documents all four parameters. The description only restates the lookback_blocks clamp and default, adding little semantic meaning beyond the schema itself.

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 states a specific verb and resource: auditing wallet history, multi-asset portfolio USD value, and agent readiness. It also names the exact aggregation targets (ETH/WETH/USDC portfolio, nonce history, top counterparties, taint, PnL), making the tool's purpose clear and distinguishable from siblings.

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?

It gives explicit trigger conditions and explicit exclusions: do not use for DeFi borrow liquidation checks (use defi_position_shield) or protocol TVL checks (use defi_protocol_tvl_check). This routes the agent to the right alternatives without inference.

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