Skip to main content
Glama

create_persona

Create custom AI personas with specific names and prompt content for the Persona MCP server, enabling on-demand expert role switching and context-aware interactions.

Instructions

새로운 페르소나 프로필을 생성합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes페르소나 이름 (예: default, professional, casual)
contentYes페르소나 프롬프트 내용

Implementation Reference

  • The main handler for the 'create_persona' tool. Validates the input arguments using createPersonaSchema and calls the savePersona helper function to persist the persona file. Returns a success message with the file location.
    case 'create_persona': { const validated = createPersonaSchema.parse(args); await savePersona(validated.name, validated.content); return { content: [ { type: 'text', text: `페르소나 "${validated.name}"이(가) 생성되었습니다.\n위치: ${path.join(PERSONA_DIR, validated.name + '.txt')}`, }, ], }; }
  • Zod schema that validates the input for create_persona tool, requiring 'name' (validated by personaNameSchema) and 'content' (validated by personaContentSchema).
    export const createPersonaSchema = z.object({ name: personaNameSchema, content: personaContentSchema, });
  • src/index.ts:323-340 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for 'create_persona'.
    { name: 'create_persona', description: '새로운 페르소나 프로필을 생성합니다', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '페르소나 이름 (예: default, professional, casual)', }, content: { type: 'string', description: '페르소나 프롬프트 내용', }, }, required: ['name', 'content'], }, },
  • Core helper function that implements the persona creation logic: validates name and content, constructs the file path in the persona directory, and writes the content to a .txt file.
    // 파일명 및 컨텐츠 검증 const validatedName = validatePersonaName(name); const validatedContent = validatePersonaContent(content); const filePath = path.join(PERSONA_DIR, `${validatedName}.txt`); await fs.writeFile(filePath, validatedContent, 'utf-8'); }

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/seanshin0214/persona-mcp'

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