activate_element
Enable activation of specific elements like personas, skills, or templates within DollhouseMCP for dynamic AI persona management and behavioral customization.
Instructions
Activate a specific element by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The element name to activate | |
| type | Yes | The element type |
Implementation Reference
- src/server/tools/ElementTools.ts:96-116 (handler)Core implementation of the 'activate_element' MCP tool. Includes tool name, description, input validation schema (requiring 'name' and 'type' parameters), and the execution handler function that calls the server's activateElement method with the parsed arguments.tool: { name: "activate_element", description: "Activate a specific element by name", inputSchema: { type: "object", properties: { name: { type: "string", description: "The element name to activate", }, type: { type: "string", description: "The element type", enum: Object.values(ElementType), }, }, required: ["name", "type"], }, }, handler: (args: ActivateElementArgs) => server.activateElement(args.name, args.type) },
- Input schema definition for the 'activate_element' tool, specifying required 'name' (string) and 'type' (string enum from ElementType) parameters with descriptions.inputSchema: { type: "object", properties: { name: { type: "string", description: "The element name to activate", }, type: { type: "string", description: "The element type", enum: Object.values(ElementType), }, }, required: ["name", "type"], },
- src/server/ServerSetup.ts:52-53 (registration)Registers the ElementTools (including activate_element) with the central ToolRegistry during server setup.// Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance));
- src/server/tools/ToolRegistry.ts:31-33 (registration)The registerMany method used to bulk-register tools like activate_element into the MCP tool registry.registerMany(tools: Array<{ tool: ToolDefinition; handler?: ToolHandler }>): void { tools.forEach(({ tool, handler }) => this.register(tool, handler)); }
- src/server/types.ts:19-20 (schema)Type definition in IToolHandler interface for the underlying activateElement method called by the tool handler.activateElement(name: string, type: string): Promise<any>; getActiveElements(type: string): Promise<any>;