madeonsol_first_touch_subscriptions_get
Fetch a specific first-touch subscription using its UUID, available for ULTRA tier.
Instructions
Get one first-touch subscription by id. ULTRA only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Subscription UUID |
Implementation Reference
- src/index.ts:915-923 (registration)Registration of the tool 'madeonsol_first_touch_subscriptions_get' via server.tool(). Defines schema (id: UUID string), annotations (readOnlyHint), and handler that calls restQuery('GET', '/kol/first-touches/subscriptions/${id}').
server.tool( "madeonsol_first_touch_subscriptions_get", "Get one first-touch subscription by id. ULTRA only.", { id: z.string().describe("Subscription UUID") }, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async ({ id }) => ({ content: [{ type: "text" as const, text: await restQuery("GET", `/kol/first-touches/subscriptions/${encodeURIComponent(id)}`) }], }) ); - src/index.ts:920-923 (handler)Handler function (async arrow) that takes { id } and calls restQuery('GET', ...) to fetch one first-touch subscription by UUID. Returns the JSON text response wrapped in content array.
async ({ id }) => ({ content: [{ type: "text" as const, text: await restQuery("GET", `/kol/first-touches/subscriptions/${encodeURIComponent(id)}`) }], }) ); - src/index.ts:917-919 (schema)Input schema: single required parameter 'id' of type string (Subscription UUID). Described as 'Subscription UUID'.
"Get one first-touch subscription by id. ULTRA only.", { id: z.string().describe("Subscription UUID") }, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, - src/index.ts:451-466 (helper)The restQuery helper function used by the handler. Sends authenticated HTTP requests (GET/POST/PATCH/DELETE) to the MadeOnSol API and returns JSON string or error message. Requires MADEONSOL_API_KEY.
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); }