update_persona
Modify existing persona profiles by updating their names and prompt content to maintain accurate and current expert identities within the AI system.
Instructions
기존 페르소나 프로필을 수정합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 수정할 페르소나 이름 | |
| content | Yes | 새로운 페르소나 프롬프트 내용 |
Implementation Reference
- src/index.ts:472-483 (handler)Handler for update_persona tool: validates input using updatePersonaSchema, calls savePersona, returns success message.case 'update_persona': { const validated = updatePersonaSchema.parse(args); await savePersona(validated.name, validated.content); return { content: [ { type: 'text', text: `페르소나 "${validated.name}"이(가) 업데이트되었습니다.`, }, ], }; }
- src/validation.ts:25-28 (schema)Zod schema definition for update_persona input validation (name and content with constraints).export const updatePersonaSchema = z.object({ name: personaNameSchema, content: personaContentSchema, });
- src/index.ts:341-358 (registration)Tool registration in ListTools response, defining name, description, and input schema.{ name: 'update_persona', description: '기존 페르소나 프로필을 수정합니다', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '수정할 페르소나 이름', }, content: { type: 'string', description: '새로운 페르소나 프롬프트 내용', }, }, required: ['name', 'content'], }, },
- src/index.ts:126-133 (helper)Core helper function that saves persona to file after validation.async function savePersona(name: string, content: string): Promise<void> { // 파일명 및 컨텐츠 검증 const validatedName = validatePersonaName(name); const validatedContent = validatePersonaContent(content); const filePath = path.join(PERSONA_DIR, `${validatedName}.txt`); await fs.writeFile(filePath, validatedContent, 'utf-8'); }