dollhouse_config
Manage configuration settings for AI persona management in DollhouseMCP, including getting, setting, resetting, exporting, and importing settings.
Instructions
Manage DollhouseMCP configuration settings. Replaces set_user_identity, get_user_identity, and clear_user_identity tools.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The configuration action to perform | |
| setting | No | Dot-notation path to setting (e.g., 'user.username', 'sync.enabled'). Required for 'set' action, optional for 'get'. | |
| value | No | Value to set (required for 'set' action). Can be string, number, boolean, or object. | |
| section | No | Configuration section to reset (optional for 'reset' action) | |
| format | No | Export format (default: yaml) | |
| data | No | Configuration data to import (required for 'import' action) |
Implementation Reference
- src/handlers/ConfigHandler.ts:55-97 (handler)Primary handler method for the dollhouse_config tool. Dispatches to specific action handlers (get, set, reset, export, import, wizard) based on the 'action' parameter. Full implementation spans the ConfigHandler class with private helper methods.async handleConfigOperation(options: ConfigOperationOptions, indicator: string = '') { try { await this.configManager.initialize(); switch (options.action) { case 'get': return this.handleGet(options, indicator); case 'set': return this.handleSet(options, indicator); case 'reset': return this.handleReset(options, indicator); case 'export': return this.handleExport(options, indicator); case 'import': return this.handleImport(options, indicator); case 'wizard': return await this.handleWizard(indicator); default: return { content: [{ type: "text", text: `${indicator}ā Invalid action '${options.action}'.\n\n` + `Valid actions: get, set, reset, export, import, wizard` }] }; } } catch (error) { const sanitizedError = SecureErrorHandler.sanitizeError(error); return { content: [{ type: "text", text: `${indicator}ā Configuration operation failed: ${sanitizedError.message}` }] }; } }
- JSON Schema definition for the dollhouse_config tool input parameters, defining actions and their required/optional fields.inputSchema: { type: "object", properties: { action: { type: "string", enum: ["get", "set", "reset", "export", "import", "wizard"], description: "The configuration action to perform" }, setting: { type: "string", description: "Dot-notation path to setting (e.g., 'user.username', 'sync.enabled'). Required for 'set' action, optional for 'get'." }, value: { description: "Value to set (required for 'set' action). Can be string, number, boolean, or object." }, section: { type: "string", description: "Configuration section to reset (optional for 'reset' action)" }, format: { type: "string", enum: ["yaml", "json"], description: "Export format (default: yaml)" }, data: { type: "string", description: "Configuration data to import (required for 'import' action)" } }, required: ["action"] }
- src/server/tools/ConfigToolsV2.ts:11-47 (registration)Tool registration object for dollhouse_config, including name, description, schema, and handler delegation to server.handleConfigOperation. Returned by getConfigToolsV2().tool: { name: "dollhouse_config", description: "Manage DollhouseMCP configuration settings. Replaces set_user_identity, get_user_identity, and clear_user_identity tools.", inputSchema: { type: "object", properties: { action: { type: "string", enum: ["get", "set", "reset", "export", "import", "wizard"], description: "The configuration action to perform" }, setting: { type: "string", description: "Dot-notation path to setting (e.g., 'user.username', 'sync.enabled'). Required for 'set' action, optional for 'get'." }, value: { description: "Value to set (required for 'set' action). Can be string, number, boolean, or object." }, section: { type: "string", description: "Configuration section to reset (optional for 'reset' action)" }, format: { type: "string", enum: ["yaml", "json"], description: "Export format (default: yaml)" }, data: { type: "string", description: "Configuration data to import (required for 'import' action)" } }, required: ["action"] } }, handler: (args: any) => server.handleConfigOperation(args) },
- src/server/ServerSetup.ts:76-76 (registration)Registers the dollhouse_config tool (and portfolio_element_manager) by calling registerMany on the ToolRegistry with tools from getConfigToolsV2.this.toolRegistry.registerMany(getConfigToolsV2(instance));
- src/config/ConfigManager.ts:166-177 (helper)Type definition for the full DollhouseConfig interface used by ConfigManager and referenced throughout the configuration handling logic.export interface DollhouseConfig { version: string; user: UserConfig; github: GitHubConfig; sync: SyncConfig; collection: CollectionConfig; autoLoad: AutoLoadConfig; elements: ElementsConfig; display: DisplayConfig; wizard: WizardConfig; source_priority?: SourcePriorityConfigData; }