read.pool.list
List all Arcadia lending pools with key metrics: TVL, utilization, available liquidity, interest rate (borrow cost), and lending APY (lender yield). All rates are decimal fractions.
Instructions
List all Arcadia lending pools: TVL, utilization, available liquidity. Key fields: interest_rate = current borrow cost, lending_apy = lender yield. All rates are decimal fractions (1.0 = 100%, 0.06 = 6%). For APY history on a specific pool, use read.pool.info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pools | Yes | ||
| context_notes | No |
Implementation Reference
- src/tools/read/pools.ts:25-54 (handler)Handler function for the 'read.pool.list' tool. Calls api.getPools(chain_id), wraps the result in {pools: ...}, and returns it as both text and structuredContent. Handles empty results and errors.
async ({ chain_id }) => { try { const result = await api.getPools(chain_id); if (Array.isArray(result) && result.length === 0) { const empty = { pools: [] as unknown[], context_notes: [`No lending pools found on chain ${chain_id}.`], }; return { content: [{ type: "text" as const, text: JSON.stringify(empty, null, 2) }], structuredContent: empty, }; } const wrapped = { pools: Array.isArray(result) ? result : [] }; return { content: [{ type: "text" as const, text: JSON.stringify(wrapped, null, 2) }], structuredContent: wrapped, }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, - src/tools/read/pools.ts:7-55 (registration)Registration of 'read.pool.list' tool via server.registerTool(). Defines annotations, description, inputSchema (chain_id), and outputSchema (PoolListOutput).
export function registerPoolTools(server: McpServer, api: ArcadiaApiClient) { server.registerTool( "read.pool.list", { annotations: { title: "List Lending Pools", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, description: "List all Arcadia lending pools: TVL, utilization, available liquidity. Key fields: interest_rate = current borrow cost, lending_apy = lender yield. All rates are decimal fractions (1.0 = 100%, 0.06 = 6%). For APY history on a specific pool, use read.pool.info.", inputSchema: { chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION), }, outputSchema: PoolListOutput, }, async ({ chain_id }) => { try { const result = await api.getPools(chain_id); if (Array.isArray(result) && result.length === 0) { const empty = { pools: [] as unknown[], context_notes: [`No lending pools found on chain ${chain_id}.`], }; return { content: [{ type: "text" as const, text: JSON.stringify(empty, null, 2) }], structuredContent: empty, }; } const wrapped = { pools: Array.isArray(result) ? result : [] }; return { content: [{ type: "text" as const, text: JSON.stringify(wrapped, null, 2) }], structuredContent: wrapped, }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, ); - src/tools/output-schemas.ts:118-121 (schema)PoolListOutput Zod schema: an object with 'pools' (array of unknown records) and optional 'context_notes' (array of strings).
export const PoolListOutput = z.object({ pools: z.array(z.record(z.unknown())), context_notes: z.array(z.string()).optional(), }); - src/clients/api.ts:150-152 (helper)getPools() method on ArcadiaApiClient — sends GET request to '/pools' with chain_id parameter. This is the underlying API call used by the tool handler.
async getPools(chainId: number) { return this.get<ApiListResponse>("/pools", { chain_id: chainId }); } - src/tools/index.ts:40-42 (registration)Top-level registration of registerPoolTools (which includes read.pool.list) called from registerAllTools.
registerAccountTools(server, api, chains); registerPoolTools(server, api); registerAssetTools(server, api);