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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 페르소나 이름 (예: default, professional, casual) | |
| content | Yes | 페르소나 프롬프트 내용 |
Implementation Reference
- src/index.ts:459-470 (handler)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')}`, }, ], }; }
- src/validation.ts:20-23 (schema)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'], }, },
- src/index.ts:127-133 (helper)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'); }