clear_thoughts
Reset the current reasoning session to start with a clean slate. This tool clears all recorded thoughts, enabling a fresh approach to structured problem-solving within the MCP Think Tool Server.
Instructions
Clear all thoughts recorded in the current session. Use this to start fresh if the thinking process needs to be reset.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:79-87 (handler)The asynchronous handler function for the clear_thoughts tool. It retrieves the current length of thoughtsLog, clears the array, and returns a confirmation message with the number of cleared thoughts.async () => { const count = this.thoughtsLog.length; this.thoughtsLog = []; return { content: [{ type: "text", text: `Cleared ${count} recorded thoughts.` }] }; } );
- src/index.ts:76-87 (registration)Registration of the clear_thoughts tool using this.server.tool(), including the tool name, description, and inline handler function.this.server.tool( "clear_thoughts", "Clear all thoughts recorded in the current session. Use this to start fresh if the thinking process needs to be reset.", async () => { const count = this.thoughtsLog.length; this.thoughtsLog = []; return { content: [{ type: "text", text: `Cleared ${count} recorded thoughts.` }] }; } );
- src/index.ts:14-14 (helper)Private class property storing the array of thoughts, which is cleared by the clear_thoughts handler.private thoughtsLog: ThoughtRecord[] = [];
- src/index.ts:8-11 (helper)TypeScript interface defining the structure of thought records stored in thoughtsLog.interface ThoughtRecord { timestamp: string; thought: string; }