Skip to main content
Glama

edit_element

Modify existing AI personas, skills, templates, agents, memories, or ensembles by updating specific fields like descriptions or metadata within the DollhouseMCP server.

Instructions

Edit an existing element of any type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe element name to edit
typeYesThe element type
fieldYesThe field to edit (e.g., 'description', 'metadata.author', 'content')
valueYesThe new value for the field

Implementation Reference

  • Handler implementation for the 'edit_element' tool. Receives args and delegates to server.editElement(args). Includes input schema validation.
    { tool: { name: "edit_element", description: "Edit an existing element of any type", inputSchema: { type: "object", properties: { name: { type: "string", description: "The element name to edit", }, type: { type: "string", description: "The element type", enum: Object.values(ElementType), }, field: { type: "string", description: "The field to edit (e.g., 'description', 'metadata.author', 'content')", }, value: { description: "The new value for the field", oneOf: [ { type: "string" }, { type: "number" }, { type: "boolean" }, { type: "object" }, { type: "array" }, ], }, }, required: ["name", "type", "field", "value"], }, }, handler: (args: EditElementArgs) => server.editElement(args) },
  • TypeScript interface defining the input arguments for edit_element tool.
    interface EditElementArgs { name: string; type: string; field: string; value: any; }
  • Registers the element tools (including edit_element) into the ToolRegistry by calling getElementTools(instance).
    private registerTools(instance: IToolHandler): void { // Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance)); // Register persona export/import tools (core functionality moved to element tools) this.toolRegistry.registerMany(getPersonaExportImportTools(instance)); // Register collection tools this.toolRegistry.registerMany(getCollectionTools(instance)); // DEPRECATED: Old user tools - replaced by dollhouse_config // Comment out to remove from tool list, but keep for reference during transition // this.toolRegistry.registerMany(getUserTools(instance)); // Register auth tools this.toolRegistry.registerMany(getAuthTools(instance)); // Portfolio tools (including sync_portfolio with new safety features) this.toolRegistry.registerMany(getPortfolioTools(instance)); // DEPRECATED: Old config tools - replaced by dollhouse_config // Comment out to remove from tool list, but keep for reference during transition // this.toolRegistry.registerMany(getConfigTools(instance)); // Register new unified config and sync tools this.toolRegistry.registerMany(getConfigToolsV2(instance)); // Register build info tools this.toolRegistry.registerMany(getBuildInfoTools(instance)); // Register Enhanced Index tools (semantic search and relationships) this.toolRegistry.registerMany(getEnhancedIndexTools(instance)); // Invalidate cache since tools have changed this.toolCache.invalidateToolList(); logger.debug('ToolDiscoveryCache: Cache invalidated due to tool registration'); }
  • Interface definition in IToolHandler for the editElement method called by the tool handler.
    editElement(args: {name: string; type: string; field: string; value: any}): Promise<any>;
  • The getElementTools function that returns the array of tools including the edit_element tool for registration.
    export function getElementTools(server: IToolHandler): Array<{ tool: ToolDefinition; handler: 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