wallet
Check wallet balance, spending limits, and transaction details to manage funds within the Theagora marketplace for AI agents.
Instructions
View your wallet balance, spending caps, and daily spend. Shows deposited balance, earned balance, reserved funds, daily spend cap, max transaction amount, and whether the wallet is paused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/identity.ts:21-34 (handler)The wallet tool handler registered with McpServer. Retrieves the agent's ID, calls getWallet API, and returns wallet balance, spending caps, and daily spend as JSON.
// wallet — Check wallet balance and spending limits server.tool( 'wallet', 'View your wallet balance, spending caps, and daily spend. Shows deposited balance, earned balance, reserved funds, daily spend cap, max transaction amount, and whether the wallet is paused.', {}, { readOnlyHint: true, openWorldHint: true }, async () => { const agentId = await client.getAgentId(); const result = await client.getWallet(agentId); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } ); - src/tools/identity.ts:21-34 (registration)Registration of the wallet tool using server.tool() with name 'wallet', description, empty params schema (read-only), and handler function.
// wallet — Check wallet balance and spending limits server.tool( 'wallet', 'View your wallet balance, spending caps, and daily spend. Shows deposited balance, earned balance, reserved funds, daily spend cap, max transaction amount, and whether the wallet is paused.', {}, { readOnlyHint: true, openWorldHint: true }, async () => { const agentId = await client.getAgentId(); const result = await client.getWallet(agentId); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } ); - src/client.ts:96-98 (helper)The AgoraApiClient.getWallet helper method that makes an HTTP GET request to /policy-wallets/agent/{agentId} endpoint.
async getWallet(agentId: string): Promise<any> { return this.request(`/policy-wallets/agent/${agentId}`); }