Skip to main content
Glama

activate_persona

Activate a specific AI persona by name or filename to enable behavioral adjustments in Claude and compatible AI assistants via the DollhouseMCP server.

Instructions

Activate a specific persona by name or filename

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personaYesThe persona name or filename to activate

Implementation Reference

  • Zod input schema defining the 'identifier' parameter for the activate_persona tool
    export const ActivatePersonaArgsSchema = z.object({ identifier: z.string().describe("Persona name, filename, or unique ID") });
  • Core handler logic that finds the persona by identifier and activates it by setting this.activePersona
    activatePersona(identifier: string): { success: boolean; message: string; persona?: Persona } { const persona = this.findPersona(identifier); if (!persona) { return { success: false, message: `Persona not found: "${identifier}"` }; } this.activePersona = persona.filename; return { success: true, message: `Activated persona: ${persona.metadata.name}`, persona }; }
  • Helper method used by activatePersona to locate the persona by filename, name, or unique_id
    findPersona(identifier: string): Persona | undefined { // Try direct filename match let persona = this.personas.get(identifier); if (!persona) { // Try with .md extension persona = this.personas.get(`${identifier}.md`); } if (!persona) { // Search by name (case-insensitive) persona = Array.from(this.personas.values()).find(p => p.metadata.name.toLowerCase() === identifier.toLowerCase() ); } if (!persona) { // Search by unique_id persona = Array.from(this.personas.values()).find(p => p.unique_id === identifier ); } return persona; }
  • Interface definition for the server's activatePersona method, used in IToolHandler for tool dispatching (likely legacy persona tool)
    activatePersona(persona: string): Promise<any>; getActivePersona(): Promise<any>; deactivatePersona(): 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/mcp-server'

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