zora_explore_top_gainers
Discover coins with the highest market cap increase over the last 24 hours on the Zora Coins ecosystem. Use this tool to identify trending assets and analyze market movements on Base mainnet.
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)Registers the 'zora_explore_top_gainers' tool with the MCP server using the exploreTool helper function, specifying the handler from 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)The core handler function for the tool (shared with other explore tools), which invokes the underlying SDK function (CoinsSDK.getCoinsTopGainers) with pagination parameters and returns a formatted text response.async ({ after, count }) => { const resp = await fn({ after, count }); return { content: [{ type: "text", text: json(resp) }] }; }
- src/index.ts:276-282 (schema)Defines the input schema for the tool, including optional pagination parameters 'after' and 'count'.title, description, inputSchema: { count: z.number().int().min(1).max(100).optional(), after: z.string().optional(), }, },
- src/index.ts:267-288 (helper)The exploreTool helper function that registers paginated query tools like zora_explore_top_gainers with schema, handler wrapper, and server registration.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) }] }; } ); }
- src/index.ts:64-70 (helper)Utility function used in the handler to format responses as pretty-printed JSON, handling bigints.function json(data: unknown): string { return JSON.stringify( data, (_k, v) => (typeof v === "bigint" ? v.toString() : v), 2 ); }