read.wallet.points
Retrieve the Arcadia points balance for any wallet address on the Arcadia Finance platform.
Instructions
Get Arcadia points balance for a specific wallet address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_address | Yes | Wallet address to get points for |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/read/wallet.ts:250-268 (handler)The handler function for 'read.wallet.points'. It calls api.getPoints(wallet_address) to fetch the points balance for a given wallet address and returns the result as JSON.
async ({ wallet_address }) => { try { const result = await api.getPoints(wallet_address); return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], structuredContent: result as Record<string, unknown>, }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, - src/tools/read/wallet.ts:234-269 (registration)Registration of 'read.wallet.points' tool on the MCP server, with input schema (wallet_address string) and output schema (PointsWalletOutput).
server.registerTool( "read.wallet.points", { annotations: { title: "Get Wallet Points", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, description: "Get Arcadia points balance for a specific wallet address.", inputSchema: { wallet_address: z.string().describe("Wallet address to get points for"), }, outputSchema: PointsWalletOutput, }, async ({ wallet_address }) => { try { const result = await api.getPoints(wallet_address); return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], structuredContent: result as Record<string, unknown>, }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, ); - src/tools/output-schemas.ts:128-128 (schema)PointsWalletOutput schema definition: a passthrough object (z.object({}).passthrough()) allowing any JSON shape from the API.
export const PointsWalletOutput = z.object({}).passthrough(); - src/clients/api.ts:184-186 (helper)API client method getPoints(wallet) that calls GET /points?wallet_address=... to the Arcadia API backend.
async getPoints(wallet: string) { return this.get("/points", { wallet_address: wallet }); } - src/tools/index.ts:34-46 (registration)Top-level registration: registerAllTools calls registerWalletTools(server, chains, api) which registers all wallet read tools including 'read.wallet.points'.
export function registerAllTools( server: McpServer, api: ArcadiaApiClient, chains: Record<ChainId, ChainConfig>, ) { // Read tools registerAccountTools(server, api, chains); registerPoolTools(server, api); registerAssetTools(server, api); registerStrategyTools(server, api); registerPointsTools(server, api); registerGuideTools(server); registerWalletTools(server, chains, api);