install_community_persona
Add community personas to your local collection for on-demand access to specialized expert profiles that can be activated when needed.
Instructions
커뮤니티 페르소나를 로컬 컬렉션에 설치합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 설치할 커뮤니티 페르소나 이름 |
Implementation Reference
- src/index.ts:234-246 (handler)Core handler function that copies the community persona file to the local persona directory after validation.async function installCommunityPersona(name: string): Promise<string> { const validatedName = validatePersonaName(name); const communityPath = path.join(COMMUNITY_DIR, `${validatedName}.txt`); const localPath = path.join(PERSONA_DIR, `${validatedName}.txt`); try { const content = await fs.readFile(communityPath, 'utf-8'); await fs.writeFile(localPath, content, 'utf-8'); return localPath; } catch (error) { throw new Error(`Failed to install community persona "${validatedName}": ${(error as Error).message}`); } }
- src/validation.ts:47-49 (schema)Zod schema for validating the input to the install_community_persona tool, requiring a valid persona name.export const installCommunityPersonaSchema = z.object({ name: personaNameSchema, });
- src/index.ts:435-448 (registration)Tool registration in the ListToolsRequestHandler, defining the tool name, description, and input schema for MCP protocol.{ name: 'install_community_persona', description: '커뮤니티 페르소나를 로컬 컬렉션에 설치합니다', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '설치할 커뮤니티 페르소나 이름', }, }, required: ['name'], }, },
- src/index.ts:674-690 (handler)MCP CallToolRequestHandler case that validates input, calls the core handler, generates preview, and returns success response.case 'install_community_persona': { const validated = installCommunityPersonaSchema.parse(args); const installedPath = await installCommunityPersona(validated.name); // 간단한 프리뷰 제공 const content = await readCommunityPersona(validated.name); const preview = content.split('\n').slice(0, 10).join('\n'); return { content: [ { type: 'text', text: `✅ Persona "${validated.name}" installed successfully!\n\n📁 Location: ${installedPath}\n\n📄 Preview:\n${preview}\n...\n\n💡 **How to use:**\n@persona:${validated.name} your question or task\n\nExample:\n@persona:${validated.name} help me with this code\n\n🎯 The persona will only activate when you use the @persona:${validated.name} trigger (Submarine Mode = 0 tokens otherwise)`, }, ], }; }