zora_explore_top_gainers
Discover coins with the highest market cap increase over the last 24 hours on the Zora Coins ecosystem to identify trending assets and analyze market movements.
Instructions
Coins with highest market cap delta over last 24h.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| after | No |
Implementation Reference
- src/index.ts:290-296 (registration)Registration of the "zora_explore_top_gainers" MCP tool. Calls exploreTool helper with name, the core SDK handler CoinsSDK.getCoinsTopGainers, title, and description.exploreTool( "zora_explore_top_gainers", // @ts-expect-error - TypeScript can't resolve barrel exports properly CoinsSDK.getCoinsTopGainers, "Top gainers (24h)", "Coins with highest market cap delta over last 24h." );
- src/index.ts:283-286 (handler)Thin wrapper handler function (shared via exploreTool) that executes the tool: passes input params to CoinsSDK.getCoinsTopGainers (fn), formats response as MCP content using json helper.async ({ after, count }) => { const resp = await fn({ after, count }); return { content: [{ type: "text", text: json(resp) }] }; }
- src/index.ts:279-281 (schema)Input schema definition (shared via exploreTool): optional 'count' (1-100) for pagination limit, 'after' cursor string.count: z.number().int().min(1).max(100).optional(), after: z.string().optional(), },
- src/index.ts:64-70 (helper)Utility function 'json' used by handlers to stringify responses, handling bigint conversion.function json(data: unknown): string { return JSON.stringify( data, (_k, v) => (typeof v === "bigint" ? v.toString() : v), 2 ); }
- src/index.ts:267-288 (helper)'exploreTool' helper function that standardizes registration of exploration tools: provides common schema, thin handler wrapper calling SDK fn, and JSON response formatting.function exploreTool( name: string, fn: (args: { after?: string; count?: number }) => Promise<unknown>, title: string, description: string ) { server.registerTool( name, { title, description, inputSchema: { count: z.number().int().min(1).max(100).optional(), after: z.string().optional(), }, }, async ({ after, count }) => { const resp = await fn({ after, count }); return { content: [{ type: "text", text: json(resp) }] }; } ); }