Skip to main content
Glama

create_persona

Create custom AI personas with specific names and prompt content to enable switching between expert roles for specialized tasks and context-aware responses.

Instructions

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

Input Schema

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

Implementation Reference

  • Handler for the 'create_persona' tool: parses input with schema, saves the persona using savePersona function, and returns success message.
    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 defining input for create_persona: name (validated persona name) and content (validated persona content).
    export const createPersonaSchema = z.object({ name: personaNameSchema, content: personaContentSchema, });
  • src/index.ts:323-340 (registration)
    Tool registration in ListTools response: defines 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'], }, },
  • Helper function that saves persona to file after validation, called by the create_persona handler.
    // 파일명 및 컨텐츠 검증 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