madeonsol_kol_trending_tokens
Identify trending tokens ranked by KOL buy volume to capture capital-flow signals. Filter by time window and minimum KOL buyers.
Instructions
Tokens ranked by KOL buy volume — pure capital-flow signal. Sub-hour periods (5m/15m/30m) require PRO/ULTRA.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Time window | 1h |
| min_kols | No | Minimum KOL buyers | |
| limit | No | Number of trending tokens to return |
Implementation Reference
- src/index.ts:317-329 (handler)Handler function that executes the tool logic. It defines input schema (period, min_kols, limit), and the async handler calls the query() helper with the API path /api/x402/kol/tokens/trending, passing the parameters to fetch trending tokens ranked by KOL buy volume.
server.tool( "madeonsol_kol_trending_tokens", "Tokens ranked by KOL buy volume — pure capital-flow signal. Sub-hour periods (5m/15m/30m) require PRO/ULTRA.", { period: z.enum(["5m", "15m", "30m", "1h", "2h", "4h", "12h"]).default("1h").describe("Time window"), min_kols: z.number().min(1).max(20).default(1).describe("Minimum KOL buyers"), limit: z.number().min(1).max(50).default(20).describe("Number of trending tokens to return"), }, readOnlyAnnotations, async ({ period, min_kols, limit }) => ({ content: [{ type: "text" as const, text: await query("/api/x402/kol/tokens/trending", { period, min_kols, limit }) }], }) ); - src/index.ts:320-325 (schema)Zod schema defining the input parameters for madeonsol_kol_trending_tokens: period (enum: 5m/15m/30m/1h/2h/4h/12h, default 1h), min_kols (1-20, default 1), limit (1-50, default 20).
{ period: z.enum(["5m", "15m", "30m", "1h", "2h", "4h", "12h"]).default("1h").describe("Time window"), min_kols: z.number().min(1).max(20).default(1).describe("Minimum KOL buyers"), limit: z.number().min(1).max(50).default(20).describe("Number of trending tokens to return"), }, readOnlyAnnotations, - src/index.ts:317-329 (registration)MCP tool registration via server.tool() with the name 'madeonsol_kol_trending_tokens' inside the registerTools function, which is called from main() during server initialization.
server.tool( "madeonsol_kol_trending_tokens", "Tokens ranked by KOL buy volume — pure capital-flow signal. Sub-hour periods (5m/15m/30m) require PRO/ULTRA.", { period: z.enum(["5m", "15m", "30m", "1h", "2h", "4h", "12h"]).default("1h").describe("Time window"), min_kols: z.number().min(1).max(20).default(1).describe("Minimum KOL buyers"), limit: z.number().min(1).max(50).default(20).describe("Number of trending tokens to return"), }, readOnlyAnnotations, async ({ period, min_kols, limit }) => ({ content: [{ type: "text" as const, text: await query("/api/x402/kol/tokens/trending", { period, min_kols, limit }) }], }) ); - src/index.ts:60-80 (helper)The query() helper function used by the handler. It builds the API URL, manages auth headers (API key or x402), performs the fetch, and returns formatted JSON or error text.
async function query(path: string, params?: Record<string, string | number>) { // API key uses /api/v1/ endpoints; x402 uses /api/x402/ const apiPath = authMode === "x402" || authMode === "none" ? path : path.replace("/api/x402/", "/api/v1/"); const url = new URL(apiPath, BASE_URL); if (params) { for (const [k, v] of Object.entries(params)) { if (v !== undefined) url.searchParams.set(k, String(v)); } } const headers = apiKeyHeaders(); const res = authMode === "x402" ? await paidFetch(url.toString()) : await fetch(url.toString(), { headers }); if (!res.ok) { const body = await res.text().catch(() => ""); return `Error ${res.status}: ${body}`; } return JSON.stringify(await res.json(), null, 2); }