Delete Funnel
rybbit_delete_funnelPermanently delete a saved funnel by providing site ID and funnel ID. This action is irreversible, so use with caution.
Instructions
Permanently delete a saved funnel. This action cannot be undone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | Site ID (numeric ID or domain identifier) | |
| funnelId | Yes | Funnel ID to delete (from rybbit_list_funnels) |
Implementation Reference
- src/tools/funnels.ts:338-353 (handler)The handler function for rybbit_delete_funnel that executes the tool logic. It extracts siteId and funnelId from args, makes a DELETE request to /sites/{siteId}/funnels/{funnelId} via the client, and returns the response or an error.
async (args) => { try { const { siteId, funnelId } = args as { siteId: string; funnelId: string | number }; const data = await client.delete(`/sites/${siteId}/funnels/${funnelId}`); return { content: [{ type: "text" as const, text: truncateResponse(data) }], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } ); - src/tools/funnels.ts:320-353 (registration)Registration of the 'rybbit_delete_funnel' tool via server.registerTool(), including its title, description, annotations (readOnlyHint: false, idempotentHint: true, destructiveHint: true), and inputSchema (siteId and funnelId).
server.registerTool( "rybbit_delete_funnel", { title: "Delete Funnel", description: "Permanently delete a saved funnel. This action cannot be undone.", annotations: { readOnlyHint: false, idempotentHint: true, openWorldHint: true, destructiveHint: true, }, inputSchema: { siteId: siteIdSchema, funnelId: z .union([z.string(), z.number()]) .describe("Funnel ID to delete (from rybbit_list_funnels)"), }, }, async (args) => { try { const { siteId, funnelId } = args as { siteId: string; funnelId: string | number }; const data = await client.delete(`/sites/${siteId}/funnels/${funnelId}`); return { content: [{ type: "text" as const, text: truncateResponse(data) }], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } ); - src/tools/funnels.ts:331-336 (schema)Input schema for rybbit_delete_funnel: siteId (from shared siteIdSchema which accepts string or number and transforms to string) and funnelId (union of string or number) described as 'Funnel ID to delete (from rybbit_list_funnels)'.
inputSchema: { siteId: siteIdSchema, funnelId: z .union([z.string(), z.number()]) .describe("Funnel ID to delete (from rybbit_list_funnels)"), }, - src/schemas.ts:7-10 (helper)The shared siteIdSchema used by the tool's inputSchema: accepts string or number, transforms to string.
export const siteIdSchema = z .union([z.string(), z.number()]) .transform((v) => String(v)) .describe("Site ID (numeric ID or domain identifier)"); - src/client.ts:38-41 (helper)The client.delete() method called by the handler to make the HTTP DELETE request.
async delete<T>(path: string, params?: QueryParams): Promise<T> { const url = this.buildUrl(path, params); return this.request<T>("DELETE", url); }