Skip to main content

Balance and position tools

BalanceTool

Input:
  • chainId: number
  • account: string
  • for_user: boolean

DefiPositionsTool

Input:
  • address: string
  • chain: number
  • provider: string

PoolTool

Input:
  • chainId: number
  • provider: string

Route planning and execution tools

ZapCallDataGeneratorTool

Generates and caches route/calldata in session scope. Required fields include:
  • source and destination token/chain/decimals
  • account, recipient
  • amount, decimalAmount
  • sessionId
  • type: "swap" | "bridge" | "zap"

PerformZapTool (interactive)

Input:
  • sessionId: string
Behavior:
  1. Loads cached route
  2. Requests confirmation (when enabled)
  3. Handles approvals and sends transaction
  4. Waits for receipt and clears cached route

Chain-change helpers

RequestChainChangeTool

Queues chain-switch request context:
  • chainID: number
  • sessionId: string

ChangeChainTool (interactive)

Waits for user confirmation (up to 120 seconds), then resolves via confirmChainChange or POST /zap/chain/:sessionId.

ShowBalanceUITool

UI trigger tool that expects strict tokens: TokenEntry[] payload.
Last modified on May 26, 2026