clear_thinking_history
Clear all recorded thoughts and reset the server state to remove previous thinking history and start fresh.
Instructions
Clear all recorded thoughts and reset the server state.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:148-159 (handler)MCP CallToolRequest handler switch case for "clear_thinking_history" that calls thinkingServer.clearHistory() and returns success response.case "clear_thinking_history": { thinkingServer.clearHistory(); return { content: [{ type: "text", text: JSON.stringify({ status: "success", message: "Thinking history cleared" }) }] }; }
- src/SequentialThinkingServer.ts:556-561 (handler)Core implementation of clearing the thinking history: resets thoughtHistory array, branches object, calls memoryManager.clear(), and nulls activeBranchId.clearHistory(): void { this.thoughtHistory = []; this.branches = {}; this.memoryManager.clear(); this.activeBranchId = null; }
- src/tools.ts:75-80 (schema)Tool schema definition including name, description, empty parameters schema, and inputSchema.export const clearThinkingHistoryTool: Tool = { name: "clear_thinking_history", description: "Clear all recorded thoughts and reset the server state.", parameters: emptySchema, inputSchema: zodToInputSchema(emptySchema) };
- src/tools.ts:83-89 (registration)Registration of the clearThinkingHistoryTool in the exported array of all tools, used by listTools handler.export const toolDefinitions = [ captureThoughtTool, reviseThoughtTool, retrieveRelevantThoughtsTool, getThinkingSummaryTool, clearThinkingHistoryTool ];
- MemoryManager helper method that clears short-term buffer and long-term storage, called by clearHistory.clear(): void { this.shortTermBuffer = []; this.longTermStorage = {}; }