madeonsol_kol_alerts_recent
Retrieve real-time KOL alerts including consensus clusters, fresh-token buys, and heating-up wallets. Filter by time window, alert type, and severity.
Instructions
Live KOL alert feed — consensus clusters, fresh-token KOL buys, and heating-up wallets in one unified stream.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window | No | Lookback window | 15m |
| types | No | Filter to specific alert types | |
| min_severity | No | Minimum severity to include | |
| limit | No | Max alerts to return |
Implementation Reference
- src/index.ts:280-296 (registration)Tool registration for 'madeonsol_kol_alerts_recent' via server.tool() with schema definition and handler.
server.tool( "madeonsol_kol_alerts_recent", "Live KOL alert feed — consensus clusters, fresh-token KOL buys, and heating-up wallets in one unified stream.", { window: z.enum(["5m", "15m", "1h", "6h", "24h"]).default("15m").describe("Lookback window"), types: z.array(z.enum(["consensus_cluster", "fresh_token_kol_buy", "heating_up"])).optional().describe("Filter to specific alert types"), min_severity: z.enum(["low", "medium", "high"]).optional().describe("Minimum severity to include"), limit: z.number().min(1).max(200).default(50).describe("Max alerts to return"), }, readOnlyAnnotations, async ({ window, types, min_severity, limit }) => { const params: Record<string, string | number> = { window, limit }; if (types && types.length > 0) params.types = types.join(","); if (min_severity) params.min_severity = min_severity; return { content: [{ type: "text" as const, text: await query("/api/x402/kol/alerts/recent", params) }] }; } ); - src/index.ts:283-288 (schema)Input schema using Zod: window (enum 5m/15m/1h/6h/24h default 15m), types (optional array of alert types), min_severity (optional low/medium/high), limit (1-200 default 50).
{ window: z.enum(["5m", "15m", "1h", "6h", "24h"]).default("15m").describe("Lookback window"), types: z.array(z.enum(["consensus_cluster", "fresh_token_kol_buy", "heating_up"])).optional().describe("Filter to specific alert types"), min_severity: z.enum(["low", "medium", "high"]).optional().describe("Minimum severity to include"), limit: z.number().min(1).max(200).default(50).describe("Max alerts to return"), }, - src/index.ts:290-295 (handler)Handler function that builds query params and calls the shared query() helper with endpoint /api/x402/kol/alerts/recent.
async ({ window, types, min_severity, limit }) => { const params: Record<string, string | number> = { window, limit }; if (types && types.length > 0) params.types = types.join(","); if (min_severity) params.min_severity = min_severity; return { content: [{ type: "text" as const, text: await query("/api/x402/kol/alerts/recent", params) }] }; } - src/index.ts:60-80 (helper)Shared query() helper used by the handler — builds URL with auth-mode-aware path rewriting (x402 vs v1), attaches headers, executes fetch, and returns JSON.
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); }