Skip to main content
Glama

x402, crypto, defi, base, usdc, evm, security, sec-edgar, news, web-search

Wallet portfolio, history, compliance & PnL audit

workflow_treasury_audit
Read-onlyIdempotent

[$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 workflow_defi_shield) or protocol audits (use workflow_protocol_audit). 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": "workflow_treasury_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoEVM chain (base, ethereum, arbitrum, optimism)base
walletNo0x wallet address to audit
lookback_blocksNoRecent block window for USDC Transfer logs (100-2000)

Output Schema

NameRequiredDescriptionDefault
chainNo
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. Changed6 schema fields changed
    • addedOutput schema / properties / balances / properties / weth
      Added value: +{
      +  "type": "number"
      +}
    • removedOutput schema / properties / cached
      Removed value: -{
      -  "type": "boolean"
      -}
    • addedOutput schema / properties / portfolio
      Added value: +{
      +  "properties": {
      +    "eth_usd_spot": {
      +      "type": "number"
      +    },
      +    "total_portfolio_usd": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedOutput schema / properties / recommended_actions / items / type
      Removed value: -"string"
    • addedOutput schema / properties / usdc_pnl_ledger / properties / top_counterparties
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "address": {
      +        "type": "string"
      +      },
      +      "volume_usdc": {
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / wallet_history
      Added value: +{
      +  "properties": {
      +    "activity_tier": {
      +      "type": "string"
      +    },
      +    "onchain_tx_count": {
      +      "type": "integer"
      +    },
      +    "x402_settled_calls": {
      +      "type": "integer"
      +    },
      +    "x402_spend_usd": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing price ($0.04), payment paths (x402 USDC or Stripe MPP, 10 free lifetime calls via /api/free/*), rate limits (30-60 req/min), the live RPC/log-scan nature of the operation, and the lookback clamping behavior with its rationale. The 'read-only non-custodial' framing is consistent with readOnlyHint/destructiveHint, and the operational constraints are things annotations cannot express.

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?

Dense but well front-loaded: trigger conditions, outcome, exclusions, constraints, then pricing/rate limits, each in a compact clause. Slightly telegraphic with bracketed cost and slash-delimited phrases, but essentially zero filler.

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 paid, multi-signal audit workflow, the description covers trigger conditions, exclusions, cost, auth, rate limits, and parameter clamping; an output schema already exists so return shape need not be restated. Nothing an agent needs in order to decide to call it and call it correctly is missing.

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; the description earns a bump by explaining why lookback_blocks is clamped to 100-2000 (keeping eth_getLogs fast across public RPCs), which is rationale the schema does not carry. It adds nothing about chain or wallet beyond the schema, but the clamp explanation is genuinely useful for callers tuning the window.

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 and resource set ('auditing wallet history, multi-asset portfolio USD value, or agent readiness') and names exactly what the workflow aggregates: ETH/WETH/USDC portfolio, nonce history, counterparties, taint, and PnL. An agent can distinguish this from workflow_defi_shield and workflow_protocol_audit without opening any schema.

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?

Gives explicit trigger conditions ('Trigger When: ...') and explicit exclusions with named alternatives ('Do not use for DeFi borrow liquidation checks (use workflow_defi_shield) or protocol audits (use workflow_protocol_audit)'). Both the positive and negative routing decisions are spelled out.

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