Skip to main content
Glama

create_element

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

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

  • Defines the MCP tool 'create_element' including its input schema, description, and handler function that delegates to the server's createElement method.
    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) },
  • Registers all element tools, including 'create_element', using the getElementTools function from ElementTools.ts into the ToolRegistry.
    private registerTools(instance: IToolHandler): void { // Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance));
  • TypeScript interface defining the input arguments for the create_element tool handler.
    interface CreateElementArgs { name: string; description: string; type: string; content?: string; metadata?: Record<string, any>; }
  • IToolHandler interface method signature for createElement, 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/DollhouseMCP'

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