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
| Name | Required | Description | Default |
|---|---|---|---|
| persona | Yes | The persona name or filename to export |
Implementation Reference
- src/server/tools/PersonaTools.ts:12-30 (registration)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) // },
- src/server/types.ts:62-62 (schema)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 }; }
- src/server/ServerSetup.ts:55-57 (registration)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));