Skip to main content
Glama
jonthebeef

Superdesign MCP Server

by jonthebeef

superdesign_delete

Remove design files and update metadata to manage workspace organization in the Superdesign MCP Server.

Instructions

Delete a design file and update metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesName of the design file to delete
workspace_pathNoWorkspace path (defaults to current directory)

Implementation Reference

  • Zod schema definition for superdesign_delete tool input validation
    const DeleteDesignSchema = z.object({ filename: z.string().describe("Name of the design file to delete"), workspace_path: z.string().optional().describe("Workspace path (defaults to current directory)") });
  • Tool registration in the ListToolsRequestHandler, defining name, description, and inputSchema
    { name: "superdesign_delete", description: "Delete a design file and update metadata", inputSchema: { type: "object", properties: { filename: { type: "string", description: "Name of the design file to delete" }, workspace_path: { type: "string", description: "Workspace path (defaults to current directory)" } }, required: ["filename"], }, },
  • Main handler function for superdesign_delete tool. Parses args with schema, locates file in superdesign/design_iterations/, deletes it using unlinkSync, updates metadata.json by filtering out the deleted entry, returns success or error message.
    case "superdesign_delete": { const { filename, workspace_path } = DeleteDesignSchema.parse(args); try { const superdesignDir = getSuperdeignDirectory(workspace_path); const designIterationsDir = path.join(superdesignDir, 'design_iterations'); const filePath = path.join(designIterationsDir, filename); if (!existsSync(filePath)) { return { content: [{ type: "text", text: `Error: Design file ${filename} does not exist` }], }; } // Delete the file unlinkSync(filePath); // Update metadata const metadata = loadMetadata(superdesignDir); const filteredMetadata = metadata.filter(m => m.fileName !== filename); saveMetadata(superdesignDir, filteredMetadata); return { content: [{ type: "text", text: `Successfully deleted ${filename}` }], }; } catch (error) { return { content: [{ type: "text", text: `Error deleting design: ${error.message}` }], }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonthebeef/superdesign-mcp-claude-code'

If you have feedback or need assistance with the MCP directory API, please join our Discord server