list-saved-toolsets
Retrieve detailed configurations of saved toolsets, including server settings and tool counts, to manage and optimize tool usage on the hypertool-mcp server.
Instructions
List all saved toolset configurations with detailed information including server configurations and tool counts
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list-saved-toolsets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if the operation failed | |
| success | Yes | Whether the operation was successful | |
| toolsets | Yes | Array of toolset information |
Implementation Reference
- Tool module factory and handler implementation that delegates to toolsetManager.listSavedToolsets() and returns MCP-formatted response
export const createListSavedToolsetsModule: ToolModuleFactory = ( deps ): ToolModule => { return { toolName: "list-saved-toolsets", definition: listSavedToolsetsDefinition, handler: async ( // eslint-disable-next-line @typescript-eslint/no-unused-vars args: any ) => { const listResult = await deps.toolsetManager.listSavedToolsets(); return { content: [ { type: "text", text: JSON.stringify(listResult), }, ], structuredContent: listResult, }; }, }; }; - Tool definition with name, description, input schema (no params), and output schema
export const listSavedToolsetsDefinition: Tool = { name: "list-saved-toolsets", description: "List all saved toolset configurations with detailed information including server configurations and tool counts", inputSchema: { type: "object" as const, properties: {}, additionalProperties: false, }, outputSchema: { type: "object" as const, properties: { success: { type: "boolean", description: "Whether the operation was successful", }, toolsets: { type: "array", description: "Array of toolset information", items: toolsetInfoSchema as any, }, error: { type: "string", description: "Error message if the operation failed", }, }, required: ["success", "toolsets"], }, }; - src/server/tools/config-tools/registry.ts:23-34 (registration)Registry array CONFIG_TOOL_FACTORIES that includes the list-saved-toolsets tool factory
export const CONFIG_TOOL_FACTORIES: ToolModuleFactory[] = [ createListAvailableToolsModule, createBuildToolsetModule, createListSavedToolsetsModule, createEquipToolsetModule, createDeleteToolsetModule, createUnequipToolsetModule, createGetActiveToolsetModule, createAddToolAnnotationModule, createListPersonasModule, // Persona management tool createExitConfigurationModeModule, ]; - Direct handler implementation in ConfigToolsManager.handleToolCall for list-saved-toolsets, routing to active toolset delegate
case "list-saved-toolsets": { const result = await delegate.listSavedToolsets(); return { content: [ { type: "text", text: JSON.stringify(result), }, ], structuredContent: result, }; } - Core implementation in ToolsetManager.listSavedToolsets() that loads toolsets from user preferences and generates detailed info using generateToolsetInfo()
async listSavedToolsets(): Promise<ListSavedToolsetsResponse> { try { const preferences = await import("../../../config/preferenceStore.js"); const loadToolsetsFromPreferences = preferences.loadStoredToolsets; const stored = await loadToolsetsFromPreferences(); // Get saved toolsets from preferences const savedToolsets = await Promise.all( Object.values(stored).map((config) => this.generateToolsetInfo(config)) ); return { success: true, toolsets: savedToolsets, }; } catch (error) { return { success: false, toolsets: [], error: `Failed to list toolsets: ${error instanceof Error ? error.message : String(error)}`, }; } }