Skip to main content
Glama

export_persona

Export a specific AI persona to a JSON file using DollhouseMCP, enabling easy integration and management of customizable AI behaviors for Claude and other assistants.

Instructions

Export a single persona to a JSON format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personaYesThe persona name or filename to export

Implementation Reference

  • Registration of the 'export_persona' tool including input schema and handler function. Currently disabled pending element system stabilization.
    // Disabled: export_persona and export_all_personas are not compatible with the current element system // These tools may be re-implemented once the element system is fully stabilized // { // tool: { // name: "export_persona", // description: "Export a single persona to a JSON format", // inputSchema: { // type: "object", // properties: { // persona: { // type: "string", // description: "The persona name or filename to export", // }, // }, // required: ["persona"], // }, // }, // handler: (args: any) => server.exportPersona(args.persona) // },
  • Type definition for the server.exportPersona method called by the tool handler.
    exportPersona(persona: string): Promise<any>;
  • Core implementation of persona export logic used by the tool (formats persona into ExportedPersona structure with size validation).
    exportPersona(persona: Persona): ExportedPersona { // Check size limit const size = JSON.stringify(persona).length; if (size > MAX_PERSONA_SIZE) { throw new Error(`Persona too large (${Math.round(size/1024)}KB). Maximum size is ${Math.round(MAX_PERSONA_SIZE/1024)}KB`); } return { metadata: persona.metadata, content: persona.content, filename: persona.filename, exportedAt: new Date().toISOString(), exportedBy: this.currentUser || undefined }; }
  • Registration point where getPersonaExportImportTools (containing export_persona) is called to register tools with the ToolRegistry.
    // Register persona export/import tools (core functionality moved to element tools) this.toolRegistry.registerMany(getPersonaExportImportTools(instance));

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