Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesThe element name to activate
typeYesThe element type

Implementation Reference

  • 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"], },
  • 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));
  • 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)); }
  • 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>;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DollhouseMCP/DollhouseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server