maasy_update_skill
Update a skill's content, category, priority, or active status. Automatically regenerates quick action pills when content changes.
Instructions
Update a skill's content, category, priority, or active status. Regenerates quick action pills if content changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skill_id | Yes | Skill UUID | |
| name | No | ||
| description | No | ||
| category | No | ||
| content | No | ||
| priority | No | ||
| max_tokens | No | ||
| is_active | No |
Implementation Reference
- src/index.ts:162-191 (registration)Registration of the 'maasy_update_skill' tool on the MCP server, defining its description and input schema (skill_id required; name, description, category, content, priority, max_tokens, is_active optional).
server.tool( "maasy_update_skill", "Update a skill's content, category, priority, or active status. Regenerates quick action pills if content changes.", { skill_id: z.string().describe("Skill UUID"), name: z.string().optional(), description: z.string().optional(), category: z .enum([ "copilot", "ads", "ads_manager", "seo_geo", "content", "email", "crm", "funnels", "landing", "video", "cultural", "general", ]) .optional(), content: z.string().optional(), priority: z.number().min(0).max(100).optional(), max_tokens: z.number().min(100).max(2000).optional(), is_active: z.boolean().optional(), }, toolHandler("update_skill") ); - src/index.ts:26-43 (handler)Generic toolHandler function that wraps every tool call. For 'maasy_update_skill', it calls callGateway('update_skill', ...) which sends the tool name and args to the remote mcp-gateway edge function.
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)callGateway — the actual network call that sends the tool name ('update_skill') and its arguments to the Supabase edge function 'mcp-gateway' for remote execution.
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; }