clear_thoughts
Remove all recorded thoughts to reset mental workspace and start fresh with new ideas.
Instructions
Clear all recorded thoughts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/think.ts:100-113 (registration)Registers the 'clear_thoughts' tool on the MCP server. The inline async handler clears the shared thoughts array (closure state) and returns a markdown content block confirming the number of thoughts cleared.server.tool( "clear_thoughts", "Clear all recorded thoughts", async () => { const count = thoughts.length; thoughts = []; // Reset the array return { content: [{ type: "text", text: `Cleared ${count} recorded thoughts.` }] }; } );
- src/mcp/think.ts:103-112 (handler)The executing handler logic for the clear_thoughts tool: captures count before clearing the thoughts state and returns a text response.async () => { const count = thoughts.length; thoughts = []; // Reset the array return { content: [{ type: "text", text: `Cleared ${count} recorded thoughts.` }] }; }
- src/mcp/think.ts:34-36 (helper)Supporting clearThoughts method in the exported ThinkToolInternalLogic class, which performs similar array reset logic, retained for testing.clearThoughts(): void { this.thoughts = []; }
- src/index.ts:25-25 (registration)Top-level call to registerThinkTool(server), which includes the registration of clear_thoughts among other think tools.registerThinkTool(server);