get_wallet
Retrieve wallet details including balance and status to verify sufficient funds before creating or refilling virtual cards for online payments.
Instructions
Get the wallet details for the current API key. Each API key has exactly one wallet — shared across all agents using the same API key. Returns available_balance, frozen_balance, low_balance_threshold, currency (USD), and status. Use this to check if there is sufficient balance before creating cards (Mode A) or refilling (Mode A).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/wallet.ts:51-58 (handler)The handler function for the 'get_wallet' tool, which fetches wallet details from the Clawallex API.
async () => { try { const result = await client.get<WalletDetail>("/payment/wallets/detail"); return toolOk(result); } catch (err) { return toolError(err); } }, - src/tools/wallet.ts:42-59 (registration)Registration of the 'get_wallet' tool using the MCP server instance.
server.tool( "get_wallet", [ "Get the wallet details for the current API key.", "Each API key has exactly one wallet — shared across all agents using the same API key.", "Returns available_balance, frozen_balance, low_balance_threshold, currency (USD), and status.", "Use this to check if there is sufficient balance before creating cards (Mode A) or refilling (Mode A).", ].join(" "), {}, async () => { try { const result = await client.get<WalletDetail>("/payment/wallets/detail"); return toolOk(result); } catch (err) { return toolError(err); } }, ); - src/tools/wallet.ts:6-15 (schema)Type definition for the wallet details object returned by the 'get_wallet' tool.
interface WalletDetail { wallet_id: string; wallet_type: number; currency: string; available_balance: string; frozen_balance: string; low_balance_threshold: string; status: number; updated_at: string; }