Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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.` }] }; } );
  • Private class property storing the array of thoughts, which is cleared by the clear_thoughts handler.
    private thoughtsLog: ThoughtRecord[] = [];
  • TypeScript interface defining the structure of thought records stored in thoughtsLog.
    interface ThoughtRecord { timestamp: string; thought: string; }

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/cgize/claude-mcp-think-tool'

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