SequentialThinking
A native OpenClaw plugin that provides the sequential_thinking tool for dynamic and reflective problem-solving — no MCP dependency required.
Concept
This plugin registers a first-class sequential_thinking tool directly into the OpenClaw runtime via api.registerTool. It ports the original MCP SequentialThinkingServer logic to run natively inside the plugin, maintaining full compatibility with the original behavior:
- Thought history tracking
- Branching support
- Revision support
- Dynamic
totalThoughtsadjustment
How It Works
- Tool Registration: On plugin startup,
registerSequentialThinkingPlugincreates aSequentialThinkingToolinstance and registers it as anAgentToolviaapi.registerTool. - Agent Invocation: When the agent decides to use
sequential_thinking, the tool'sexecutemethod receives the thought parameters, validates them, and delegates to the server. - State Management: The server maintains an in-memory thought history and branch registry for the lifetime of the plugin process.
- Result Streaming: The tool returns a JSON result with
thoughtNumber,totalThoughts,nextThoughtNeeded,branches, andthoughtHistoryLength.
Configuration
In openclaw.json:
{
"plugins": {
"entries": {
"sequential-thinking": {
"enabled": true,
"config": {
"thoughtLogging": true,
"models": [
"claude-sonnet-4",
"anthropic/claude-opus-4",
"openai/gpt-4o"
]
}
}
}
}
}
Tool Schema
sequential_thinking
Facilitates a detailed, step-by-step thinking process for problem-solving and analysis.
Inputs:
thought(string): The current thinking stepnextThoughtNeeded(boolean): Whether another thought step is neededthoughtNumber(integer): Current thought numbertotalThoughts(integer): Estimated total thoughts neededisRevision(boolean, optional): Whether this revises previous thinkingrevisesThought(integer, optional): Which thought is being reconsideredbranchFromThought(integer, optional): Branching point thought numberbranchId(string, optional): Branch identifierneedsMoreThoughts(boolean, optional): If more thoughts are needed
Plugin Config
thoughtLogging(boolean, default:true): Log formatted thoughts to consolemodels(string[], default:[]): Model IDs that should receive a prompt injection encouraging preference forsequential_thinkingon complex tasks. Supports exactmodelIdorprovider/modelIdpatterns.
🌸 Powered by Ani | [OpenClaw Plugin] © 2026