pal
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePal MCP Toolkit
Pal MCP 工具包
The Pal MCP toolkit provides specialized tools for comprehensive code analysis and development workflows. Each tool follows a multi-step workflow pattern with expert validation.
Pal MCP 工具包为全面的代码分析和开发工作流提供专用工具,每个工具都遵循经过专家验证的多步工作流模式。
Quick Reference: Tool Selection
快速参考:工具选择
| Task Type | Tool | Reference |
|---|---|---|
| Architecture & code analysis before complex tasks | | analyze.md |
| Bug investigation & root cause analysis | | debug.md |
| Strategic planning & task breakdown | | planner.md |
| Code smell detection & refactoring | | refactor.md |
| Code review after completing tasks | | review.md |
| Execution flow & dependency tracing | | tracer.md |
| 任务类型 | 工具 | 参考文档 |
|---|---|---|
| 复杂任务前的架构与代码分析 | | analyze.md |
| Bug排查与根因分析 | | debug.md |
| 战略规划与任务拆解 | | planner.md |
| 代码异味检测与重构 | | refactor.md |
| 任务完成后的代码审查 | | review.md |
| 执行流与依赖追踪 | | tracer.md |
Critical Workflow Requirements
关键工作流要求
<critical>
<critical>
Mandatory Completion Rules
强制完成规则
- NEVER stop a workflow before is returned
next_step_required: false - ALWAYS increment and call the tool again when
step_numbernext_step_required: true - TASK INVALIDATION: Incomplete workflows result in immediate task rejection
- NO EXCEPTIONS: Even if analysis seems complete after step 1, you MUST complete all steps
- 严禁在返回之前终止工作流
next_step_required: false - 当时,务必递增
next_step_required: true并再次调用工具step_number - 任务失效规则:未完成的工作流会导致任务直接被驳回
- 无例外规则:即使第一步之后分析看起来已经完成,你也必须完成所有步骤
Model Requirement
模型要求
- MANDATORY: Always use for ALL Pal MCP tool calls
model: "anthropic/claude-opus-4.6" - NEVER use any other model when calling Pal MCP tools
- 强制要求:所有Pal MCP工具调用必须使用
model: "anthropic/claude-opus-4.6" - 调用Pal MCP工具时严禁使用任何其他模型
Workflow Validation Checklist
工作流验证检查清单
- Check in every response
next_step_required - If , call the tool again with incremented
truestep_number - Never proceed with implementation while
next_step_required: true - Workflow is complete ONLY when
next_step_required: false
- 每次响应都要检查
next_step_required - 如果为,递增
true后再次调用工具step_number - 当时,永远不要进入实现环节
next_step_required: true - 仅当时,工作流才算完成
next_step_required: false
Tool Overview
工具概览
Analyze (mcp__zen__analyze
)
mcp__zen__analyze分析工具(mcp__zen__analyze
)
mcp__zen__analyzeWhen to Use:
- Before complex tasks to understand existing architecture
- Architecture review and system design assessment
- Performance, security, and technical debt analysis
Key Parameters:
- :
analysis_type|"architecture"|"performance"|"security"|"quality""general" - :
output_format|"summary"|"detailed""actionable"
See references/analyze.md for complete documentation.
适用场景:
- 执行复杂任务前,了解现有架构
- 架构评审与系统设计评估
- 性能、安全和技术债分析
核心参数:
- :
analysis_type|"architecture"|"performance"|"security"|"quality""general" - :
output_format|"summary"|"detailed""actionable"
完整文档见 references/analyze.md
Debug (mcp__zen__debug
)
mcp__zen__debug调试工具(mcp__zen__debug
)
mcp__zen__debugWhen to Use:
- Bug investigation and root cause analysis
- Performance issues, memory leaks, race conditions
- Integration failures and service communication problems
Key Parameters:
- : Current theory about the root cause
hypothesis - :
confidence|"exploring"|"low"|"medium"|"high"|"very_high"|"almost_certain""certain"
See references/debug.md for complete documentation.
适用场景:
- Bug排查与根因分析
- 性能问题、内存泄漏、竞态条件排查
- 集成失败与服务通信问题排查
核心参数:
- : 当前关于根因的假设
hypothesis - :
confidence|"exploring"|"low"|"medium"|"high"|"very_high"|"almost_certain""certain"
完整文档见 references/debug.md
Planner (mcp__zen__planner
)
mcp__zen__planner规划工具(mcp__zen__planner
)
mcp__zen__plannerWhen to Use:
- Breaking down complex tasks into manageable steps
- System design and architectural decisions
- Migration planning and implementation strategies
Key Parameters:
- : For refining previous steps
is_step_revision - : For exploring alternative approaches
is_branch_point - : Naming alternative approaches
branch_id
See references/planner.md for complete documentation.
适用场景:
- 将复杂任务拆解为可执行的步骤
- 系统设计与架构决策
- 迁移规划与实现策略制定
核心参数:
- : 用于优化之前的步骤
is_step_revision - : 用于探索替代方案
is_branch_point - : 替代方案命名
branch_id
完整文档见 references/planner.md
Refactor (mcp__zen__refactor
)
mcp__zen__refactor重构工具(mcp__zen__refactor
)
mcp__zen__refactorWhen to Use:
- Addressing code smells and technical debt
- Decomposing large modules or classes
- Modernizing legacy patterns
Key Parameters:
- :
refactor_type|"codesmells"|"decompose"|"modernize""organization" - :
focus_areas["performance", "readability", "maintainability", "security"]
See references/refactor.md for complete documentation.
适用场景:
- 处理代码异味与技术债
- 拆解大型模块或类
- 升级老旧代码模式
核心参数:
- :
refactor_type|"codesmells"|"decompose"|"modernize""organization" - :
focus_areas["performance", "readability", "maintainability", "security"]
完整文档见 references/refactor.md
Code Review (mcp__zen__codereview
)
mcp__zen__codereview代码审查工具(mcp__zen__codereview
)
mcp__zen__codereviewWhen to Use:
- After completing a task (MANDATORY)
- Before submitting pull requests
- Validating implementation against project standards
Key Parameters:
- :
review_typefor comprehensive analysis"full" - :
severity_filterto catch all severity levels"all" - : Specific areas like "performance", "security", "type-safety"
focus_on
See references/review.md for complete documentation.
适用场景:
- 任务完成后(强制要求)
- 提交pull request之前
- 验证实现是否符合项目规范
核心参数:
- :
review_type代表全面分析"full" - :
severity_filter代表捕获所有严重级别的问题"all" - : 特定关注领域,比如"performance"、"security"、"type-safety"
focus_on
完整文档见 references/review.md
Tracer (mcp__zen__tracer
)
mcp__zen__tracer追踪工具(mcp__zen__tracer
)
mcp__zen__tracerWhen to Use:
- Understanding code execution paths
- Mapping dependencies before refactoring
- Debugging complex flows
Key Parameters:
- :
trace_mode(execution flow) |"precision"(structural analysis) |"dependencies""ask" - : Clear description of what to trace and why
target_description
See references/tracer.md for complete documentation.
适用场景:
- 理解代码执行路径
- 重构前梳理依赖关系
- 调试复杂流程
核心参数:
- :
trace_mode(执行流) |"precision"(结构分析) |"dependencies""ask" - : 对追踪目标和原因的清晰描述
target_description
完整文档见 references/tracer.md
Common Required Parameters
通用必填参数
All Pal MCP tools require these base parameters:
json
{
"step": "Description of current step",
"step_number": 1,
"total_steps": 2,
"next_step_required": true,
"findings": "Findings from this step",
"model": "anthropic/claude-opus-4.6"
}所有Pal MCP工具都需要以下基础参数:
json
{
"step": "Description of current step",
"step_number": 1,
"total_steps": 2,
"next_step_required": true,
"findings": "Findings from this step",
"model": "anthropic/claude-opus-4.6"
}File Path Requirements
文件路径要求
- ALWAYS use full absolute paths for
relevant_files - Include files directly involved in the analysis
- Include related files that provide context
- Include test files when relevant
- 务必为使用完整的绝对路径
relevant_files - 包含直接参与分析的文件
- 包含能提供上下文的相关文件
- 适用时包含测试文件
Typical Workflow Pattern
典型工作流模式
- Start: Call the tool with and initial strategy
step_number: 1 - Iterate: Increment and refine findings based on previous step
step_number - Continue: Keep calling until
next_step_required: false - Complete: Only proceed with implementation after workflow completes
- 启动:以和初始策略调用工具
step_number: 1 - 迭代:递增,基于上一步的结果优化分析结论
step_number - 继续:持续调用工具直到
next_step_required: false - 完成:仅在工作流完成后再进入实现环节
Violation Examples (Task Rejection)
违规示例(会导致任务被驳回)
- Calling a Pal tool once and proceeding to implementation
- Skipping steps because analysis seems complete
- Starting implementation before
next_step_required: false - Using a model other than
anthropic/claude-opus-4.6
- 仅调用一次Pal工具就进入实现环节
- 因为分析看起来已经完成就跳过步骤
- 在返回前就开始实现
next_step_required: false - 使用之外的模型
anthropic/claude-opus-4.6