Skip to main content
Glama

explain_plan

Analyze how a Tech Lead would distribute tasks for a given project requirement to optimize team workflow and resource allocation.

Instructions

解释 Tech Lead 会如何分配任务(不实际执行)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes要分析的任务描述

Implementation Reference

  • The main handler for the 'explain_plan' tool. It extracts the task from arguments, calls techLead.analyze(task) to get the analysis, formats it into a detailed markdown plan showing workflow type, expert allocations, and execution order, then returns it as text content.
            case 'explain_plan': {
              const { task } = args as { task: string };
              
              // 让 Tech Lead 分析任务但不执行
              const analysis = await techLead.analyze(task);
              
              const expertPlan = analysis.experts
                .map((e: { id: string; name: string; tier: string; role: string }, i: number) => {
                  const subtask = analysis.subtasks.find(t => t.expertId === e.id);
                  return `${i + 1}. **${e.name}** (${e.tier})\n   - 角色: ${e.role.slice(0, 100)}...\n   - 任务: ${subtask?.description || '待分配'}`;
                })
                .join('\n\n');
              
              const plan = `# 🧠 任务执行计划
    
    ## 任务分析
    **原始任务**: ${task}
    
    ## Tech Lead 分析结果
    
    ### 工作流类型
    \`${analysis.workflow}\` ${analysis.workflow === 'sequential' ? '(顺序执行)' : analysis.workflow === 'parallel' ? '(并行执行)' : '(并行+审查)'}
    
    ### 专家分配 (${analysis.experts.length} 个)
    ${expertPlan}
    
    ### 执行顺序
    ${analysis.workflow === 'parallel' ? '所有专家将并行执行任务' : analysis.experts.map((e: { name: string }, i: number) => `${i + 1}. ${e.name}`).join(' → ')}
    
    ---
    > 💡 这只是计划预览,使用 \`team_work\` 工具实际执行任务`;
    
              return {
                content: [{ type: 'text', text: plan }],
              };
            }
  • The input schema definition for the 'explain_plan' tool, specifying a required 'task' string parameter.
    {
      name: 'explain_plan',
      description: '解释 Tech Lead 会如何分配任务(不实际执行)',
      inputSchema: {
        type: 'object',
        properties: {
          task: {
            type: 'string',
            description: '要分析的任务描述',
          },
        },
        required: ['task'],
      },
    },
  • src/server.ts:289-302 (registration)
    Registration of the 'explain_plan' tool in the list returned by ListToolsRequestSchema handler.
    {
      name: 'explain_plan',
      description: '解释 Tech Lead 会如何分配任务(不实际执行)',
      inputSchema: {
        type: 'object',
        properties: {
          task: {
            type: 'string',
            description: '要分析的任务描述',
          },
        },
        required: ['task'],
      },
    },

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/7836246/claude-team-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server