sequential-thinking-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sequential 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
Read
,
Grep
, or
Bash
. They are NOT CLI commands.
CORRECT — 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 work
The single tool uses the
mcp__sequential-thinking__sequentialthinking
prefix.
MCP工具是直接工具调用 —— 就像
Read
Grep
Bash
一样。它们不是CLI命令。
正确用法 —— 直接调用工具:
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__sequentialthinking
前缀。

When to Use (and When NOT to)

适用场景与不适用场景

Use Sequential ThinkingDo NOT Use
Bug with 3+ possible causes needing eliminationSimple typo or obvious error
Architectural decision with competing trade-offsStraightforward implementation
Multi-factor analysis where factors interactSingle-factor decision
Root cause analysis requiring hypothesis testingError with clear stack trace
Problems where early assumptions might be wrongProblems 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

工具参数

ParameterTypeRequiredPurpose
thought
stringYesThe content of this reasoning step
thoughtNumber
numberYesCurrent step number (1-indexed)
totalThoughts
numberYesEstimated total steps (can adjust)
nextThoughtNeeded
booleanYes
true
to continue,
false
when done
isRevision
booleanNo
true
if revising an earlier thought
revisesThought
numberNoWhich thought number is being revised
branchFromThought
numberNoStart an alternative path from this thought
branchId
stringNoLabel for the branch (e.g., "alternative-approach")
needsMoreThoughts
booleanNo
true
to extend beyond initial estimate
参数类型是否必填用途
thought
string此推理步骤的内容
thoughtNumber
number当前步骤编号(从1开始)
totalThoughts
number预估的总步骤数(可调整)
nextThoughtNeeded
boolean
true
表示继续,
false
表示完成
isRevision
boolean如果是修订之前的思考步骤,设为
true
revisesThought
number要修订的思考步骤编号
branchFromThought
number从此思考步骤开始一条替代路径
branchId
string分支的标签(例如"alternative-approach")
needsMoreThoughts
boolean
true
表示超出初始预估步骤数,需要扩展

Workflow 1: Problem Decomposition

工作流1:问题分解

Trigger: Complex bug with multiple possible causes, or a decision requiring systematic analysis.
触发条件: 存在多种可能原因的复杂Bug,或需要系统性分析的决策。

Steps

步骤

  1. 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
    })
  2. 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
    })
  3. 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
    })
  4. 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. 定义问题框架(思考步骤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. 分析每个假设(思考步骤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
    })
  3. 若之前的思考有误则进行修订(可选):
    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
    })
  4. 得出结论(最终思考步骤):
    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

步骤

  1. Define the decision criteria (thought 1)
  2. Evaluate option A against criteria (thought 2)
  3. Evaluate option B against criteria (thought 3)
  4. 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"
    })
  5. Recommend with trade-off summary (final thought)
  1. 定义决策标准(思考步骤1)
  2. 根据标准评估选项A(思考步骤2)
  3. 根据标准评估选项B(思考步骤3)
  4. 若出现混合方案则分支(可选):
    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"
    })
  5. 结合权衡总结给出建议(最终思考步骤)

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
    totalThoughts
    — 5 is a good default. Adjust with
    needsMoreThoughts: true
    if you need more.
  • Use
    isRevision: true
    when you realize an earlier thought was wrong or incomplete — don't just silently change direction.
  • Use
    branchFromThought
    to explore "what if?" alternatives without abandoning the main analysis.
  • Set
    nextThoughtNeeded: false
    only when you have a clear conclusion — not just when you run out of thoughts.
  • Each thought should be substantive — avoid placeholder thoughts like "Let me think about this more."
  • 先预估
    totalThoughts
    —— 默认设为5比较合适。如果需要更多步骤,使用
    needsMoreThoughts: true
    进行调整。
  • 使用
    isRevision: true
    当你意识到之前的思考步骤有误或不完整时——不要只是悄悄改变方向。
  • 使用
    branchFromThought
    来探索“如果…会怎样?”的替代方案,同时不放弃主分析路径。
  • 仅当得出明确结论时才设置
    nextThoughtNeeded: false
    —— 不要只是因为思考步骤用完就停止。
  • 每个思考步骤都应具有实质性内容 —— 避免使用“让我再想想”这类占位符内容。

Troubleshooting

故障排除

Reasoning Chain Gets Too Long

推理链过长

If you're past thought 10 and still going:
  1. Set
    nextThoughtNeeded: false
    and summarize what you know so far
  2. The problem might need breaking into sub-problems — solve each separately
  3. Consider if you actually need this tool or if the problem is simpler than you thought
如果你已经进行到第10个思考步骤还没结束:
  1. 设置
    nextThoughtNeeded: false
    ,并总结目前已知的内容
  2. 问题可能需要拆分为子问题——逐个解决
  3. 考虑你是否真的需要这个工具,或者问题是否比你想象的更简单

Losing Track of the Thread

失去思路连贯性

Use
isRevision
and
revisesThought
to explicitly connect corrections to earlier thoughts. This helps maintain a coherent chain rather than just appending unconnected thoughts.
使用
isRevision
revisesThought
将修正内容与之前的思考步骤明确关联。这有助于保持连贯的推理链,而不是仅仅添加无关联的思考步骤。

Tool 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,直接停止并解决问题即可。该工具仅在处理真正复杂的推理时才会带来价值——并非适用于所有问题。