Skip to main content
Glama

list_personas

Retrieve all available expert personas to enable switching between specialized roles for optimized AI interactions and context-aware responses.

Instructions

사용 가능한 모든 페르소나 목록을 조회합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP CallToolRequest handler case for 'list_personas' that calls listPersonas() helper and formats the response as text content.
    case 'list_personas': {
      const personas = await listPersonas();
      return {
        content: [
          {
            type: 'text',
            text: personas.length > 0
              ? `사용 가능한 페르소나:\n${personas.map(p => `- ${p}`).join('\n')}\n\n사용법: @persona:${personas[0]} 형식으로 참조하세요.`
              : '저장된 페르소나가 없습니다.',
          },
        ],
      };
    }
  • Tool schema definition in ListToolsRequestHandler, including name, description, and empty input schema (no parameters). Serves as registration.
      name: 'list_personas',
      description: '사용 가능한 모든 페르소나 목록을 조회합니다',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Core helper function that reads the persona directory (~/.persona) and returns array of persona names from .txt files.
    async function listPersonas(): Promise<string[]> {
      try {
        const files = await fs.readdir(PERSONA_DIR);
        return files.filter(f => f.endsWith('.txt')).map(f => f.replace('.txt', ''));
      } catch (error) {
        return [];
      }
    }

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