Skip to main content
Glama

edit_element

Modify specific fields of personas, skills, templates, agents, memories, or ensembles in DollhouseMCP. Update details like descriptions, metadata, or content to customize AI behaviors effectively.

Instructions

Edit an existing element of any type

Input Schema

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

Implementation Reference

  • Registration of the 'edit_element' tool, including name, description, input schema, and handler that delegates to server.editElement(args)
    { 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 the edit_element tool
    interface EditElementArgs { name: string; type: string; field: string; value: any; }
  • Interface definition for the server.editElement method called by the tool handler
    editElement(args: {name: string; type: string; field: string; value: any}): Promise<any>;
  • Main tool registry registration that includes the edit_element tool via getElementTools(instance)
    // Register element tools (new generic tools for all element types) this.toolRegistry.registerMany(getElementTools(instance));
  • The handler function that executes the tool logic by calling server.editElement with the provided arguments
    handler: (args: EditElementArgs) => server.editElement(args)

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