sequential-thinking-mcp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSequential Thinking — Structured Reasoning
Sequential Thinking — 结构化推理
You are an expert at using the Sequential Thinking MCP server for structured, revisable multi-step reasoning. This tool helps decompose complex problems into numbered thoughts with support for revision and branching.
你是一位擅长使用Sequential Thinking MCP服务器进行结构化、可修订的多步骤推理的专家。该工具可帮助将复杂问题分解为带编号的思考步骤,并支持修订和分支。
Critical: These Are Direct Tool Calls
重要提示:这些是直接工具调用
MCP tools are direct tool calls — exactly like , , or . They are NOT CLI commands.
ReadGrepBashCORRECT — call the tool directly:
Tool: mcp__sequential-thinking__sequentialthinking
Parameters: {
"thought": "First, let me identify the possible causes of the RLS policy failure...",
"thoughtNumber": 1,
"totalThoughts": 5,
"nextThoughtNeeded": true
}WRONG — do NOT shell out:
Bash: claude mcp call sequential-thinking sequentialthinking ... # This does not workThe single tool uses the prefix.
mcp__sequential-thinking__sequentialthinkingMCP工具是直接工具调用 —— 就像、或一样。它们不是CLI命令。
ReadGrepBash正确用法 —— 直接调用工具:
Tool: mcp__sequential-thinking__sequentialthinking
Parameters: {
"thought": "First, let me identify the possible causes of the RLS policy failure...",
"thoughtNumber": 1,
"totalThoughts": 5,
"nextThoughtNeeded": true
}错误用法 —— 不要通过shell调用:
Bash: claude mcp call sequential-thinking sequentialthinking ... # This does not work该工具使用前缀。
mcp__sequential-thinking__sequentialthinkingWhen to Use (and When NOT to)
适用场景与不适用场景
| Use Sequential Thinking | Do NOT Use |
|---|---|
| Bug with 3+ possible causes needing elimination | Simple typo or obvious error |
| Architectural decision with competing trade-offs | Straightforward implementation |
| Multi-factor analysis where factors interact | Single-factor decision |
| Root cause analysis requiring hypothesis testing | Error with clear stack trace |
| Problems where early assumptions might be wrong | Problems with known solutions |
Rule of thumb: If you can solve it in your head in one step, don't use this tool. If you need to "think out loud" with potential backtracking, use it.
| 适用Sequential Thinking的场景 | 不适用场景 |
|---|---|
| 存在3种及以上可能原因、需要逐一排除的Bug | 简单拼写错误或明显错误 |
| 存在竞争权衡的架构决策 | 直接明了的实现任务 |
| 涉及多因素相互作用的分析 | 单因素决策 |
| 需要假设检验的根本原因分析 | 有清晰堆栈跟踪的错误 |
| 早期假设可能存在错误的问题 | 已有已知解决方案的问题 |
经验法则: 如果你能在脑中一步解决问题,就不要使用这个工具。如果你需要“出声思考”并可能回溯,就使用它。
Tool Parameters
工具参数
| Parameter | Type | Required | Purpose |
|---|---|---|---|
| string | Yes | The content of this reasoning step |
| number | Yes | Current step number (1-indexed) |
| number | Yes | Estimated total steps (can adjust) |
| boolean | Yes | |
| boolean | No | |
| number | No | Which thought number is being revised |
| number | No | Start an alternative path from this thought |
| string | No | Label for the branch (e.g., "alternative-approach") |
| boolean | No | |
| 参数 | 类型 | 是否必填 | 用途 |
|---|---|---|---|
| string | 是 | 此推理步骤的内容 |
| number | 是 | 当前步骤编号(从1开始) |
| number | 是 | 预估的总步骤数(可调整) |
| boolean | 是 | |
| boolean | 否 | 如果是修订之前的思考步骤,设为 |
| number | 否 | 要修订的思考步骤编号 |
| number | 否 | 从此思考步骤开始一条替代路径 |
| string | 否 | 分支的标签(例如"alternative-approach") |
| boolean | 否 | |
Workflow 1: Problem Decomposition
工作流1:问题分解
Trigger: Complex bug with multiple possible causes, or a decision requiring systematic analysis.
触发条件: 存在多种可能原因的复杂Bug,或需要系统性分析的决策。
Steps
步骤
-
Frame the problem (thought 1):
sequentialthinking({ thought: "The timesheet approval is failing silently. Three possible causes: (1) RLS policy blocking the update, (2) has_permission() returning false, (3) trigger rejecting the state transition.", thoughtNumber: 1, totalThoughts: 5, nextThoughtNeeded: true }) -
Analyze each hypothesis (thoughts 2-4):
sequentialthinking({ thought: "Testing hypothesis 1: The RLS policy for timesheets requires has_role_on_account(account_id) AND the user must be manager_or_above. Let me check if the user has the right role...", thoughtNumber: 2, totalThoughts: 5, nextThoughtNeeded: true }) -
Revise if earlier thinking was wrong (optional):
sequentialthinking({ thought: "Revising thought 2: Actually, the new permission system uses has_permission() not has_role_on_account(). The RLS policy might be using the old function.", thoughtNumber: 4, totalThoughts: 6, nextThoughtNeeded: true, isRevision: true, revisesThought: 2, needsMoreThoughts: true }) -
Conclude (final thought):
sequentialthinking({ thought: "Root cause identified: The RLS policy uses has_role_on_account() which checks system roles, but the user only has a custom role assigned. Need to update the policy to use has_permission() instead.", thoughtNumber: 6, totalThoughts: 6, nextThoughtNeeded: false })
-
定义问题框架(思考步骤1):
sequentialthinking({ thought: "The timesheet approval is failing silently. Three possible causes: (1) RLS policy blocking the update, (2) has_permission() returning false, (3) trigger rejecting the state transition.", thoughtNumber: 1, totalThoughts: 5, nextThoughtNeeded: true }) -
分析每个假设(思考步骤2-4):
sequentialthinking({ thought: "Testing hypothesis 1: The RLS policy for timesheets requires has_role_on_account(account_id) AND the user must be manager_or_above. Let me check if the user has the right role...", thoughtNumber: 2, totalThoughts: 5, nextThoughtNeeded: true }) -
若之前的思考有误则进行修订(可选):
sequentialthinking({ thought: "Revising thought 2: Actually, the new permission system uses has_permission() not has_role_on_account(). The RLS policy might be using the old function.", thoughtNumber: 4, totalThoughts: 6, nextThoughtNeeded: true, isRevision: true, revisesThought: 2, needsMoreThoughts: true }) -
得出结论(最终思考步骤):
sequentialthinking({ thought: "Root cause identified: The RLS policy uses has_role_on_account() which checks system roles, but the user only has a custom role assigned. Need to update the policy to use has_permission() instead.", thoughtNumber: 6, totalThoughts: 6, nextThoughtNeeded: false })
Workflow 2: Architectural Decision
工作流2:架构决策
Trigger: User asks "should we use X or Y?", "what's the best approach for Z?", or there are multiple valid implementation strategies.
触发条件: 用户询问“我们应该使用X还是Y?”、“Z的最佳实现方式是什么?”,或存在多种有效实现策略。
Steps
步骤
- Define the decision criteria (thought 1)
- Evaluate option A against criteria (thought 2)
- Evaluate option B against criteria (thought 3)
- Branch if a hybrid approach emerges (optional):
sequentialthinking({ thought: "What if we combine the service pattern from option A with the caching strategy from option B?", thoughtNumber: 4, totalThoughts: 6, nextThoughtNeeded: true, branchFromThought: 3, branchId: "hybrid-approach" }) - Recommend with trade-off summary (final thought)
- 定义决策标准(思考步骤1)
- 根据标准评估选项A(思考步骤2)
- 根据标准评估选项B(思考步骤3)
- 若出现混合方案则分支(可选):
sequentialthinking({ thought: "What if we combine the service pattern from option A with the caching strategy from option B?", thoughtNumber: 4, totalThoughts: 6, nextThoughtNeeded: true, branchFromThought: 3, branchId: "hybrid-approach" }) - 结合权衡总结给出建议(最终思考步骤)
Workflow 3: Multi-Factor Analysis
工作流3:多因素分析
Trigger: Complex decision involving performance, security, maintainability, and other competing concerns.
触发条件: 涉及性能、安全性、可维护性等相互竞争因素的复杂决策。
Pattern
模式
- Thought 1: List all factors and their relative importance
- Thoughts 2-N: Analyze each factor independently
- Revision thoughts: Update earlier analysis as new interactions between factors emerge
- Final thought: Synthesize into a recommendation with explicit trade-offs
- 思考步骤1: 列出所有因素及其相对重要性
- 思考步骤2至N: 独立分析每个因素
- 修订思考步骤: 当因素之间出现新的相互作用时,更新之前的分析
- 最终思考步骤: 综合分析结果,给出带有明确权衡的建议
Key Patterns
核心模式
- Start with an estimate of — 5 is a good default. Adjust with
totalThoughtsif you need more.needsMoreThoughts: true - Use when you realize an earlier thought was wrong or incomplete — don't just silently change direction.
isRevision: true - Use to explore "what if?" alternatives without abandoning the main analysis.
branchFromThought - Set only when you have a clear conclusion — not just when you run out of thoughts.
nextThoughtNeeded: false - Each thought should be substantive — avoid placeholder thoughts like "Let me think about this more."
- 先预估—— 默认设为5比较合适。如果需要更多步骤,使用
totalThoughts进行调整。needsMoreThoughts: true - 使用当你意识到之前的思考步骤有误或不完整时——不要只是悄悄改变方向。
isRevision: true - 使用来探索“如果…会怎样?”的替代方案,同时不放弃主分析路径。
branchFromThought - 仅当得出明确结论时才设置—— 不要只是因为思考步骤用完就停止。
nextThoughtNeeded: false - 每个思考步骤都应具有实质性内容 —— 避免使用“让我再想想”这类占位符内容。
Troubleshooting
故障排除
Reasoning Chain Gets Too Long
推理链过长
If you're past thought 10 and still going:
- Set and summarize what you know so far
nextThoughtNeeded: false - The problem might need breaking into sub-problems — solve each separately
- Consider if you actually need this tool or if the problem is simpler than you thought
如果你已经进行到第10个思考步骤还没结束:
- 设置,并总结目前已知的内容
nextThoughtNeeded: false - 问题可能需要拆分为子问题——逐个解决
- 考虑你是否真的需要这个工具,或者问题是否比你想象的更简单
Losing Track of the Thread
失去思路连贯性
Use and to explicitly connect corrections to earlier thoughts. This helps maintain a coherent chain rather than just appending unconnected thoughts.
isRevisionrevisesThought使用和将修正内容与之前的思考步骤明确关联。这有助于保持连贯的推理链,而不是仅仅添加无关联的思考步骤。
isRevisionrevisesThoughtTool Seems Unnecessary for This Problem
工具对当前问题似乎不必要
If you find yourself forcing sequential thinking on a straightforward problem, just stop and solve it directly. This tool adds value for genuinely complex reasoning — not for every problem.
如果你发现自己在强行对简单问题使用sequential thinking,直接停止并解决问题即可。该工具仅在处理真正复杂的推理时才会带来价值——并非适用于所有问题。