Skip to main content
Glama

Treasury or wallet balances (native + ERC20, USD)

dexe_read_treasury
Read-onlyIdempotent

Reads treasury or wallet balances for any address, including GovPool DAOs, auto-discovers tokens with USD prices and totals, and falls back to on-chain reads.

Instructions

Read-only. Treasury / wallet balances for any address; pass a GovPool address for a DAO treasury. Auto-discovers EVERY token via the DeXe backend with USD prices and a total. Falls back to an on-chain read (chain 97, explicit tokens, or a backend failure) — no token discovery there, and it reports degraded: true.

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

Input Schema

NameRequiredDescriptionDefault
holderNoAddress whose balances we read (a GovPool for a DAO treasury)
tokensNoOptional explicit ERC20 addresses (at most 50); forces on-chain RPC read of just these
chainIdNoChain to read from: 56 mainnet, 97 testnet. Needs an RPC for it. Default: the configured chain.
govPoolNoAlias for `holder` — every other DAO read names the DAO this way

Output Schema

NameRequiredDescriptionDefault
holderYes
nativeYes
sourceYes
tokensYes
chainIdYes
degradedYes
totalUsdYes
nativeFormattedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.37.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare read-only/idempotent/open-world; the description goes further by disclosing the backend token auto-discovery with USD pricing and total, the on-chain fallback triggers, that fallback does no token discovery, and that results are flagged `degraded: true`. That is exactly the operational context an agent needs and cannot get from the annotations.

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 tight sentences, read-only constraint and scope front-loaded, then discovery behavior, then fallback semantics. No filler words and no repetition of schema or annotation content.

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?

An output schema exists, so return-field detail is unnecessary; the description still covers the one return nuance that matters (degraded flag and USD total). For a 4-parameter read tool with full schema coverage and annotations, nothing an agent needs to 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, but the description adds real meaning: `holder` vs `govPool` are the same target under two names, and `tokens`/`chainId=97` are the conditions that force the degraded on-chain path. It does not restate limits like maxItems 50 or the chainId enum values, which the schema already carries.

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+resource (read treasury/wallet balances), covers both wallet and DAO-treasury modes, and tells the agent how to pick the DAO case (pass a GovPool address). It is clearly distinguishable from sibling read tools such as dexe_read_token_holders or dexe_read_dao_stats.

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?

Gives concrete routing conditions: use a plain address for a wallet, a GovPool address for a DAO treasury, and know that supplying `tokens`, chain 97, or a backend failure switches to the on-chain path. It does not name an alternative sibling tool to use instead for related reads, so it stops short of full when/when-not guidance.

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