clear_thinking_history
Reset and clear all recorded thoughts to restore the server state, enabling a fresh start for constructing structured mind maps and idea exploration.
Instructions
Clear all recorded thoughts and reset the server state.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/SequentialThinkingServer.ts:556-561 (handler)Core implementation of clearing the thinking history: resets thoughtHistory array, branches object, calls memoryManager.clear(), and sets activeBranchId to null.clearHistory(): void { this.thoughtHistory = []; this.branches = {}; this.memoryManager.clear(); this.activeBranchId = null; }
- index.ts:148-159 (handler)MCP tool call handler for 'clear_thinking_history': invokes thinkingServer.clearHistory() and returns a JSON success response.case "clear_thinking_history": { thinkingServer.clearHistory(); return { content: [{ type: "text", text: JSON.stringify({ status: "success", message: "Thinking history cleared" }) }] }; }
- src/tools.ts:75-80 (schema)Tool schema definition: specifies name, description, and empty input schema (no parameters required).export const clearThinkingHistoryTool: Tool = { name: "clear_thinking_history", description: "Clear all recorded thoughts and reset the server state.", parameters: emptySchema, inputSchema: zodToInputSchema(emptySchema) };
- index.ts:32-36 (registration)Registers the listTools capability, returning toolDefinitions array which includes the clear_thinking_history tool.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions }; });
- MemoryManager helper method that clears short-term buffer and long-term storage, called by clearHistory().clear(): void { this.shortTermBuffer = []; this.longTermStorage = {}; }