read.asset.list
List supported collateral assets on Arcadia, filterable by symbol substring. Returns address, symbol, decimals, and type.
Instructions
List supported collateral assets on Arcadia. Returns compact list (address, symbol, decimals, type). Use search to filter by symbol substring. For USD prices, use read.asset.prices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Filter assets by symbol (case-insensitive substring match) | |
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | Yes | ||
| assets | Yes |
Implementation Reference
- src/tools/read/assets.ts:29-63 (handler)The main handler function for the read.asset.list tool. Calls api.getAssets(), normalizes the response into a uniform array, optionally filters by symbol search, and returns a JSON result with total count and asset list.
async ({ search, chain_id }) => { try { const raw = await api.getAssets(chain_id); const obj = raw as Record<string, unknown>; const allAssets = (Array.isArray(raw) ? raw : (obj.assets ?? obj.data ?? [])) as Record< string, unknown >[]; let assets = allAssets.map((a) => ({ address: a.address ?? a.asset_address, symbol: a.name ?? a.symbol ?? a.asset_symbol, decimals: a.decimals, type: a.standard ?? a.asset_type ?? a.type, })); if (search) { const q = search.toLowerCase(); assets = assets.filter((a) => ((a.symbol as string) ?? "").toLowerCase().includes(q)); } const result = { total: assets.length, assets }; return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], structuredContent: result, }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, - src/tools/read/assets.ts:9-27 (schema)Tool registration with annotations, input schema (search optional string, chain_id number defaulting to 8453), and output schema reference to AssetListOutput.
"read.asset.list", { annotations: { title: "List Supported Assets", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, description: "List supported collateral assets on Arcadia. Returns compact list (address, symbol, decimals, type). Use search to filter by symbol substring. For USD prices, use read.asset.prices.", inputSchema: { search: z .string() .optional() .describe("Filter assets by symbol (case-insensitive substring match)"), chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION), }, outputSchema: AssetListOutput, - src/tools/read/assets.ts:8-64 (registration)Tool registration via server.registerTool, called from registerAssetTools() function.
server.registerTool( "read.asset.list", { annotations: { title: "List Supported Assets", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, description: "List supported collateral assets on Arcadia. Returns compact list (address, symbol, decimals, type). Use search to filter by symbol substring. For USD prices, use read.asset.prices.", inputSchema: { search: z .string() .optional() .describe("Filter assets by symbol (case-insensitive substring match)"), chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION), }, outputSchema: AssetListOutput, }, async ({ search, chain_id }) => { try { const raw = await api.getAssets(chain_id); const obj = raw as Record<string, unknown>; const allAssets = (Array.isArray(raw) ? raw : (obj.assets ?? obj.data ?? [])) as Record< string, unknown >[]; let assets = allAssets.map((a) => ({ address: a.address ?? a.asset_address, symbol: a.name ?? a.symbol ?? a.asset_symbol, decimals: a.decimals, type: a.standard ?? a.asset_type ?? a.type, })); if (search) { const q = search.toLowerCase(); assets = assets.filter((a) => ((a.symbol as string) ?? "").toLowerCase().includes(q)); } const result = { total: assets.length, assets }; return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], structuredContent: result, }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, ); - src/clients/api.ts:126-128 (helper)API client helper that fetches the list of assets from the /assets endpoint.
async getAssets(chainId: number) { return this.get("/assets", { chain_id: chainId }); } - src/tools/output-schemas.ts:102-112 (schema)Zod output schema for the asset list response: total count and array of assets with address, symbol, decimals, and type fields.
export const AssetListOutput = z.object({ total: z.number(), assets: z.array( z.object({ address: z.unknown(), symbol: z.unknown(), decimals: z.unknown(), type: z.unknown(), }), ), });