madeonsol_first_touch_subscriptions_create
Set up a first-touch webhook subscription for ULTRA plan. Filter by KOL wallet, mint suffix, minimum first buy in SOL, scout tier, and minimum touches. Receive a one-time webhook secret for integration.
Instructions
Create a first-touch webhook subscription. ULTRA only — up to 10 active. Filters: kol (wallet), mint_suffix, min_first_buy_sol, min_scout_tier (S/A/B/C), min_n_touches. Returns webhook_secret ONCE — store it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional label | |
| filters | No | ||
| delivery_mode | No | Default 'webhook' | |
| webhook_url | No | Required when delivery_mode includes 'webhook' |
Implementation Reference
- src/index.ts:892-913 (registration)Registration of the madeonsol_first_touch_subscriptions_create tool via server.tool() with schema (name, filters, delivery_mode, webhook_url) and handler.
server.tool( "madeonsol_first_touch_subscriptions_create", "Create a first-touch webhook subscription. ULTRA only — up to 10 active. Filters: kol (wallet), mint_suffix, min_first_buy_sol, min_scout_tier (S/A/B/C), min_n_touches. Returns webhook_secret ONCE — store it.", { name: z.string().optional().describe("Optional label"), filters: z.object({ kol: z.string().optional(), mint_suffix: z.string().optional(), min_first_buy_sol: z.number().min(0).optional(), min_scout_tier: z.enum(["S", "A", "B", "C"]).optional(), min_n_touches: z.number().min(1).optional(), }).optional(), delivery_mode: z.enum(["websocket", "webhook", "both"]).optional().describe("Default 'webhook'"), 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/first-touches/subscriptions", body) }] }; } ); - src/index.ts:895-906 (schema)Zod schema defining input parameters: name (optional string), filters (optional object with kol, mint_suffix, min_first_buy_sol, min_scout_tier, min_n_touches), delivery_mode (enum websocket/webhook/both), webhook_url (optional URL string).
{ name: z.string().optional().describe("Optional label"), filters: z.object({ kol: z.string().optional(), mint_suffix: z.string().optional(), min_first_buy_sol: z.number().min(0).optional(), min_scout_tier: z.enum(["S", "A", "B", "C"]).optional(), min_n_touches: z.number().min(1).optional(), }).optional(), delivery_mode: z.enum(["websocket", "webhook", "both"]).optional().describe("Default 'webhook'"), webhook_url: z.string().url().optional().describe("Required when delivery_mode includes 'webhook'"), }, - src/index.ts:908-913 (handler)Handler function: collects all input args into a body object, then calls restQuery('POST', '/kol/first-touches/subscriptions', body). The restQuery helper makes an authenticated POST to the MadeOnSol API v1 endpoint.
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/first-touches/subscriptions", body) }] }; } ); - src/index.ts:451-466 (helper)The restQuery helper function used by the handler that performs authenticated HTTP requests to the MadeOnSol API, defaulting to the /api/v1 base path.
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); }