madeonsol_coordination_alerts_create
Set up coordination alert rules triggered within 1 second when KOL clusters meet density thresholds. Alerts delivered via WebSocket or HMAC-signed webhook.
Instructions
Create a coordination alert rule. Fires within ~1s when a KOL cluster meets thresholds (peak-density scored). Delivered via WebSocket (kol:coordination channel) and/or HMAC-signed webhook. Returns webhook_secret ONCE when delivery_mode includes 'webhook' — store it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional label | |
| min_kols | No | Minimum distinct KOLs in the window (default 3) | |
| window_minutes | No | Peak-density window size in minutes (default 15) | |
| min_score | No | Minimum composite score 0-100 (default 60) | |
| include_majors | No | Include WIF/BONK/POPCAT etc. Default false. | |
| cooldown_min | No | Silence per (rule, token) in minutes (default 60) | |
| score_jump_break | No | Re-fire early when score jumps by N points vs last fire (default 10) | |
| delivery_mode | No | Where to deliver fires | |
| webhook_url | No | Required when delivery_mode includes 'webhook' |
Implementation Reference
- src/index.ts:788-808 (handler)Handler function for madeonsol_coordination_alerts_create tool. Builds request body from args and sends POST to /kol/coordination/alerts via the restQuery helper.
server.tool( "madeonsol_coordination_alerts_create", "Create a coordination alert rule. Fires within ~1s when a KOL cluster meets thresholds (peak-density scored). Delivered via WebSocket (kol:coordination channel) and/or HMAC-signed webhook. Returns webhook_secret ONCE when delivery_mode includes 'webhook' — store it.", { name: z.string().optional().describe("Optional label"), min_kols: z.number().min(2).max(50).optional().describe("Minimum distinct KOLs in the window (default 3)"), window_minutes: z.number().min(1).max(60).optional().describe("Peak-density window size in minutes (default 15)"), min_score: z.number().min(0).max(100).optional().describe("Minimum composite score 0-100 (default 60)"), include_majors: z.boolean().optional().describe("Include WIF/BONK/POPCAT etc. Default false."), cooldown_min: z.number().min(1).optional().describe("Silence per (rule, token) in minutes (default 60)"), score_jump_break: z.number().min(1).max(100).optional().describe("Re-fire early when score jumps by N points vs last fire (default 10)"), delivery_mode: z.enum(["websocket", "webhook", "both"]).optional().describe("Where to deliver fires"), webhook_url: z.string().url().optional().describe("Required when delivery_mode includes 'webhook'"), }, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async (args) => { const body: Record<string, unknown> = {}; for (const [k, v] of Object.entries(args)) if (v !== undefined) body[k] = v; return { content: [{ type: "text" as const, text: await restQuery("POST", "/kol/coordination/alerts", body) }] }; } ); - src/index.ts:789-801 (schema)Input schema for madeonsol_coordination_alerts_create: name, min_kols, window_minutes, min_score, include_majors, cooldown_min, score_jump_break, delivery_mode, webhook_url.
"madeonsol_coordination_alerts_create", "Create a coordination alert rule. Fires within ~1s when a KOL cluster meets thresholds (peak-density scored). Delivered via WebSocket (kol:coordination channel) and/or HMAC-signed webhook. Returns webhook_secret ONCE when delivery_mode includes 'webhook' — store it.", { name: z.string().optional().describe("Optional label"), min_kols: z.number().min(2).max(50).optional().describe("Minimum distinct KOLs in the window (default 3)"), window_minutes: z.number().min(1).max(60).optional().describe("Peak-density window size in minutes (default 15)"), min_score: z.number().min(0).max(100).optional().describe("Minimum composite score 0-100 (default 60)"), include_majors: z.boolean().optional().describe("Include WIF/BONK/POPCAT etc. Default false."), cooldown_min: z.number().min(1).optional().describe("Silence per (rule, token) in minutes (default 60)"), score_jump_break: z.number().min(1).max(100).optional().describe("Re-fire early when score jumps by N points vs last fire (default 10)"), delivery_mode: z.enum(["websocket", "webhook", "both"]).optional().describe("Where to deliver fires"), webhook_url: z.string().url().optional().describe("Required when delivery_mode includes 'webhook'"), }, - src/index.ts:788-808 (registration)Tool registration via server.tool() for madeonsol_coordination_alerts_create. Registered conditionally inside the hasRestAuth block (requires MADEONSOL_API_KEY).
server.tool( "madeonsol_coordination_alerts_create", "Create a coordination alert rule. Fires within ~1s when a KOL cluster meets thresholds (peak-density scored). Delivered via WebSocket (kol:coordination channel) and/or HMAC-signed webhook. Returns webhook_secret ONCE when delivery_mode includes 'webhook' — store it.", { name: z.string().optional().describe("Optional label"), min_kols: z.number().min(2).max(50).optional().describe("Minimum distinct KOLs in the window (default 3)"), window_minutes: z.number().min(1).max(60).optional().describe("Peak-density window size in minutes (default 15)"), min_score: z.number().min(0).max(100).optional().describe("Minimum composite score 0-100 (default 60)"), include_majors: z.boolean().optional().describe("Include WIF/BONK/POPCAT etc. Default false."), cooldown_min: z.number().min(1).optional().describe("Silence per (rule, token) in minutes (default 60)"), score_jump_break: z.number().min(1).max(100).optional().describe("Re-fire early when score jumps by N points vs last fire (default 10)"), delivery_mode: z.enum(["websocket", "webhook", "both"]).optional().describe("Where to deliver fires"), webhook_url: z.string().url().optional().describe("Required when delivery_mode includes 'webhook'"), }, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async (args) => { const body: Record<string, unknown> = {}; for (const [k, v] of Object.entries(args)) if (v !== undefined) body[k] = v; return { content: [{ type: "text" as const, text: await restQuery("POST", "/kol/coordination/alerts", body) }] }; } ); - src/index.ts:449-466 (helper)restQuery helper used by the handler to make authenticated REST API calls to MadeOnSol's API.
const hasRestAuth = authMode === "madeonsol"; if (hasRestAuth) { async function restQuery(method: string, path: string, body?: unknown): Promise<string> { const headers: Record<string, string> = { "Content-Type": "application/json", ...apiKeyHeaders(), }; const res = await fetch(`${BASE_URL}/api/v1${path}`, { method, headers, ...(body ? { body: JSON.stringify(body) } : {}), }); if (!res.ok) { const text = await res.text().catch(() => ""); return `Error ${res.status}: ${text}`; } return JSON.stringify(await res.json(), null, 2); }