Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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; }
  • 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" }) }] }; }
  • 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 = {}; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Promptly-Technologies-LLC/mcp-structured-thinking'

If you have feedback or need assistance with the MCP directory API, please join our Discord server