delete-toolset
Remove a specific toolset configuration from the hypertool-mcp server by providing its name and confirming the deletion to ensure precision and safety.
Instructions
Delete a saved toolset configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Confirm deletion (required to actually delete) | |
| name | Yes | Name of the toolset to delete |
Implementation Reference
- The execute function (handler) for the 'delete-toolset' MCP tool. It invokes the toolsetManager's deleteToolset method with the provided name and confirmation flag, then formats the result as MCP content.handler: async (args: any) => { const deleteResult = await deps.toolsetManager.deleteToolset(args?.name, { confirm: args?.confirm, }); return { content: [ { type: "text", text: JSON.stringify(deleteResult), }, ], structuredContent: deleteResult, }; },
- The Tool definition object for 'delete-toolset', including name, description, and inputSchema for validation (requires 'name', optional 'confirm').export const deleteToolsetDefinition: Tool = { name: "delete-toolset", description: "Delete a saved toolset configuration", inputSchema: { type: "object" as const, properties: { name: { type: "string", description: "Name of the toolset to delete", }, confirm: { type: "boolean", description: "Confirm deletion (required to actually delete)", }, }, required: ["name"], additionalProperties: false, }, };
- src/server/tools/config-tools/registry.ts:23-34 (registration)Central registry of configuration tool factories, including 'createDeleteToolsetModule' which is imported from './tools/delete-toolset.js' (line 13). This array is used by ConfigToolsManager to instantiate and register the tools.export const CONFIG_TOOL_FACTORIES: ToolModuleFactory[] = [ createListAvailableToolsModule, createBuildToolsetModule, createListSavedToolsetsModule, createEquipToolsetModule, createDeleteToolsetModule, createUnequipToolsetModule, createGetActiveToolsetModule, createAddToolAnnotationModule, createListPersonasModule, // Persona management tool createExitConfigurationModeModule, ];
- src/server/tools/config-tools/manager.ts:43-53 (registration)In ConfigToolsManager, the registerTools method instantiates all factories from CONFIG_TOOL_FACTORIES (including delete-toolset) and registers them into the toolModules Map, which provides getMcpTools() and handleToolCall() for the MCP server.private registerTools(): void { logger.debug("Registering configuration tools"); // Create and register each configuration tool module from the registry for (const factory of CONFIG_TOOL_FACTORIES) { const module = factory(this.dependencies, this.onModeChangeRequest); this.toolModules.set(module.toolName, module); } logger.info(`Registered ${this.toolModules.size} configuration tools`); }