Skip to main content
Glama

chain_personas

Execute multiple expert personas sequentially for step-by-step processing, starting with an initial input to chain specialized AI capabilities.

Instructions

여러 페르소나를 순차적으로 실행하여 단계별 처리를 수행합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personasYes순차 실행할 페르소나 이름 배열
initialInputYes첫 번째 페르소나에 전달할 입력

Implementation Reference

  • The handler function for the 'chain_personas' tool. It validates input using chainPersonasSchema, iterates through the list of personas, reads each persona's content, tracks usage, simulates chaining by preparing sequential inputs, and returns a detailed execution summary.
    case 'chain_personas': {
      const validated = chainPersonasSchema.parse(args);
      const results: ChainResult[] = [];
      let currentInput = validated.initialInput;
    
      for (const personaName of validated.personas) {
        try {
          const personaContent = await readPersona(personaName);
          await trackUsage(personaName, currentInput);
    
          results.push({
            persona: personaName,
            prompt: personaContent,
            input: currentInput,
          });
    
          // 다음 입력은 현재 페르소나의 출력이 될 것임을 명시
          currentInput = `[Previous output from ${personaName} will be used as input here]`;
        } catch (error) {
          results.push({
            persona: personaName,
            error: (error as Error).message,
          });
          break;
        }
      }
    
      const resultText = results.map((r, i) => {
        if (r.error) {
          return `Step ${i + 1} - ${r.persona}: ❌ ${r.error}`;
        }
        return `Step ${i + 1} - ${r.persona}:\n\nPrompt:\n${r.prompt}\n\nInput:\n${r.input}\n`;
      }).join('\n' + '='.repeat(50) + '\n\n');
    
      return {
        content: [
          {
            type: 'text',
            text: `🔗 Persona Chain Execution\n\n${resultText}\n✅ Chain completed: ${results.filter(r => !r.error).length}/${validated.personas.length} steps`,
          },
        ],
      };
    }
  • Zod schema defining the input structure for chain_personas: an array of 1-10 persona names and an initial input string (max 10k chars). Used for validation in the handler.
    export const chainPersonasSchema = z.object({
      personas: z.array(personaNameSchema).min(1).max(10),
      initialInput: z.string().min(1).max(10000),
    });
  • src/index.ts:395-413 (registration)
    Registration of the 'chain_personas' tool in the ListTools response, including name, description, and JSON Schema for input validation (mirrors the Zod schema).
    {
      name: 'chain_personas',
      description: '여러 페르소나를 순차적으로 실행하여 단계별 처리를 수행합니다',
      inputSchema: {
        type: 'object',
        properties: {
          personas: {
            type: 'array',
            items: { type: 'string' },
            description: '순차 실행할 페르소나 이름 배열',
          },
          initialInput: {
            type: 'string',
            description: '첫 번째 페르소나에 전달할 입력',
          },
        },
        required: ['personas', 'initialInput'],
      },
    },
  • src/index.ts:324-396 (registration)
    Specific line registering the tool name in the tools list.
      name: 'create_persona',
      description: '새로운 페르소나 프로필을 생성합니다',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '페르소나 이름 (예: default, professional, casual)',
          },
          content: {
            type: 'string',
            description: '페르소나 프롬프트 내용',
          },
        },
        required: ['name', 'content'],
      },
    },
    {
      name: 'update_persona',
      description: '기존 페르소나 프로필을 수정합니다',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '수정할 페르소나 이름',
          },
          content: {
            type: 'string',
            description: '새로운 페르소나 프롬프트 내용',
          },
        },
        required: ['name', 'content'],
      },
    },
    {
      name: 'delete_persona',
      description: '페르소나 프로필을 삭제합니다',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '삭제할 페르소나 이름',
          },
        },
        required: ['name'],
      },
    },
    {
      name: 'list_personas',
      description: '사용 가능한 모든 페르소나 목록을 조회합니다',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
    {
      name: 'suggest_persona',
      description: '대화 컨텍스트를 분석하여 적합한 페르소나를 제안합니다 (트리거 시에만 활성화)',
      inputSchema: {
        type: 'object',
        properties: {
          context: {
            type: 'string',
            description: '분석할 대화 컨텍스트 또는 질문 내용',
          },
        },
        required: ['context'],
      },
    },
    {
      name: 'chain_personas',
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions sequential execution and step-by-step processing but doesn't describe what happens during execution (e.g., error handling, state persistence between personas, performance characteristics, or authentication requirements). This leaves significant gaps for a tool that appears to orchestrate multiple operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Korean that communicates the core concept without unnecessary words. It's appropriately sized for what it does cover, though it could be more informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of orchestrating multiple personas, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, how errors are handled, or what 'step-by-step processing' entails in practical terms, leaving the agent with inadequate information for proper use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, so the parameters are well-documented in the structured schema. The description doesn't add any meaningful information about parameter usage beyond what's already in the schema descriptions, maintaining the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool executes multiple personas sequentially for step-by-step processing, which provides a basic purpose. However, it's somewhat vague about what '페르소나' (personas) are in this context and doesn't distinguish this tool from sibling tools like 'create_persona' or 'update_persona' that also involve personas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate scenarios, or how it differs from other persona-related tools like 'suggest_persona' or 'list_personas'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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