Skip to main content
Glama

update_persona

Modify existing persona profiles by updating their names and prompt content to adapt AI behavior for different expert roles.

Instructions

기존 페르소나 프로필을 수정합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes수정할 페르소나 이름
contentYes새로운 페르소나 프롬프트 내용

Implementation Reference

  • Handler for update_persona tool: validates input using updatePersonaSchema, saves the updated persona content via savePersona helper, and returns a success message.
    case 'update_persona': { const validated = updatePersonaSchema.parse(args); await savePersona(validated.name, validated.content); return { content: [ { type: 'text', text: `페르소나 "${validated.name}"이(가) 업데이트되었습니다.`, }, ], }; }
  • Zod schema defining the input structure for update_persona: requires validated name and content fields with size/security constraints.
    export const updatePersonaSchema = z.object({ name: personaNameSchema, content: personaContentSchema, });
  • src/index.ts:341-358 (registration)
    Registers the update_persona tool in the MCP server's tool list with name, description, and JSON input schema matching the Zod schema.
    { name: 'update_persona', description: '기존 페르소나 프로필을 수정합니다', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '수정할 페르소나 이름', }, content: { type: 'string', description: '새로운 페르소나 프롬프트 내용', }, }, required: ['name', 'content'], }, },
  • Core helper function that performs security validation on name/content and writes the persona file to the local directory.
    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'); }

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