maasy_delete_skill
Permanently delete a skill from Maasy AI Marketing Copilot by providing its UUID. Removes all associated knowledge.
Instructions
Permanently delete a skill. Removes the knowledge from maasy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skill_id | Yes | Skill UUID |
Implementation Reference
- src/index.ts:193-198 (registration)Registration of the 'maasy_delete_skill' tool on the MCP server via server.tool(), with the name, description, Zod schema (skill_id required string), and the handler delegated to toolHandler('delete_skill').
server.tool( "maasy_delete_skill", "Permanently delete a skill. Removes the knowledge from maasy.", { skill_id: z.string().describe("Skill UUID") }, toolHandler("delete_skill") ); - src/index.ts:26-43 (handler)The toolHandler() wrapper that actually executes the tool logic. It calls callGateway(toolName, gatewayArgs) with toolName 'delete_skill' (passed from line 197). It invokes the Supabase edge function mcp-gateway with the tool name and arguments, then returns the JSON result.
function toolHandler(toolName: string, argsFn?: (args: Record<string, unknown>) => Record<string, unknown>) { return async (args: Record<string, unknown>) => { try { const gatewayArgs = argsFn ? argsFn(args) : args; // Auto-inject default project_id if not provided if (DEFAULT_PROJECT_ID && !gatewayArgs.project_id) { gatewayArgs.project_id = DEFAULT_PROJECT_ID; } const result = await callGateway(toolName, gatewayArgs); return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] }; } catch (e: unknown) { return { content: [{ type: "text" as const, text: `Error: ${e instanceof Error ? e.message : String(e)}` }], isError: true, }; } }; } - src/supabase.ts:42-59 (helper)The callGateway() function that makes the actual HTTP POST request to the mcp-gateway edge function. It sends the tool name ('delete_skill') and arguments, authenticating with either OAuth token or API key.
export async function callGateway(tool: string, args: Record<string, unknown> = {}): Promise<unknown> { const res = await fetch(gatewayUrl, { method: "POST", headers: { "Content-Type": "application/json", [authHeader.name]: authHeader.value, }, body: JSON.stringify({ tool, args }), }); const data = await res.json(); if (!res.ok) { throw new Error(data.error || `Gateway error (${res.status})`); } return data.result; }