activate_element
Activate a specific element by name and type to enable dynamic AI persona management within the DollhouseMCP server.
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/ServerSetup.ts:52-54 (registration)Registers all element tools including activate_element via getElementTools// Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance));
- Tool schema definition for activate_element with input validation for name and typetool: { 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)
- src/server/tools/ElementTools.ts:115-116 (handler)Handler function for activate_element tool that delegates to server.activateElement(name, type)handler: (args: ActivateElementArgs) => server.activateElement(args.name, args.type) },
- src/server/ServerSetup.ts:53-54 (registration)Calls getElementTools to register activate_element and other element tools to the registrythis.toolRegistry.registerMany(getElementTools(instance));
- ToolRegistry provides getHandler to retrieve and execute the activate_element handler during tool callsgetHandler(name: string): ToolHandler | undefined { return this.tools.get(name)?.handler; }