Skip to main content
Glama

create_element

Add new personas, skills, templates, agents, memories, or ensembles to the DollhouseMCP server for dynamic AI persona management.

Instructions

Create a new element of any type

Input Schema

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

Implementation Reference

  • Core implementation of the 'create_element' tool: defines the tool schema, description, and handler function that executes server.createElement(args). This is the primary handler logic for the MCP tool.
    { 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 create_element tool, used by the handler.
    interface CreateElementArgs { name: string; description: string; type: string; content?: string; metadata?: Record<string, any>; }
  • Registers the create_element tool (as part of element tools) with the ToolRegistry during server setup.
    // Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance));
  • Server interface definition for the createElement method called 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