Skip to main content
Glama
jonthebeef

Superdesign MCP Server

by jonthebeef

superdesign_delete

Delete design files and update metadata using the MCP server. Specify the filename and workspace path to remove files efficiently from Superdesign workflows.

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

  • Handler function that parses arguments using DeleteDesignSchema, locates the design file in the superdesign/design_iterations directory, deletes it using unlinkSync, removes it from metadata.json by filtering the array and saving the updated metadata, and 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}` }], }; } }
  • Zod schema defining the input parameters for the superdesign_delete tool: required filename (string) and optional workspace_path (string).
    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 listTools response, specifying the name, description, and inputSchema matching the DeleteDesignSchema.
    { 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"], }, },

Other Tools

Related Tools

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