Skip to main content
Glama

create_element

Defines and generates a new custom element for AI persona management, including personas, skills, templates, and more, on the DollhouseMCP server. Specify name, type, description, and optional content or metadata.

Instructions

Create a new element of any type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoElement content (required for some types)
descriptionYesElement description
metadataNoAdditional metadata specific to element type
nameYesThe element name
typeYesThe element type

Implementation Reference

  • MCP tool 'create_element' handler implementation - thin wrapper that delegates to server.createElement(args) with typed arguments. Includes input schema validation.
    tool: { name: "create_element", description: "Create a new element of any type", inputSchema: { type: "object", properties: { name: { type: "string", description: "The element name", }, type: { type: "string", description: "The element type", enum: Object.values(ElementType), }, description: { type: "string", description: "Element description", }, content: { type: "string", description: "Element content (required for some types)", }, metadata: { type: "object", description: "Additional metadata specific to element type", additionalProperties: true, }, }, required: ["name", "type", "description"], }, }, handler: (args: CreateElementArgs) => server.createElement(args) },
  • TypeScript interface defining the input parameters for the create_element tool.
    interface CreateElementArgs { name: string; description: string; type: string; content?: string; metadata?: Record<string, any>; }
  • Registers all element tools, including 'create_element', by calling getElementTools and registering with ToolRegistry.
    // Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance));
  • Imports the getElementTools function used to register the create_element tool.
    import { getElementTools } from './tools/ElementTools.js';
  • IToolHandler interface defining the createElement method signature used by the tool handler.
    createElement(args: {name: string; type: string; description: string; content?: string; metadata?: Record<string, any>}): 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/mcp-server'

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