Skip to main content
Glama

Think Reset

think_reset

Clear the current thinking session to start fresh with a new problem when previous reasoning becomes irrelevant.

Instructions

Clear thinking session and start fresh.

Use when:

  • Starting a NEW problem

  • Previous chain is irrelevant

āš ļø Irreversible. All thoughts will be lost. Note: Auto-resets on thought #1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:374-385 (registration)
    Registration of the 'think_reset' MCP tool, including empty input schema and inline handler that delegates to ThinkingService.resetSession() and returns formatted success/error response.
    server.registerTool('think_reset', { title: 'Think Reset', description: THINK_RESET_DESCRIPTION, inputSchema: {} },
      async () => {
        try {
          const result = await thinkingService.resetSession();
          return {
            content: [{ type: 'text' as const, text: `🧹 RESET: ${result.clearedThoughts} thoughts, ${result.clearedBranches} branches cleared` }],
          };
        } catch (error) {
          return { content: [{ type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : 'Unknown'}` }], isError: true };
        }
      }
    );
  • Core implementation of session reset: captures counts, clears in-memory state via reset(), deletes persistent session file via clearSession(), logs and returns cleared counts.
    async resetSession(): Promise<{ clearedThoughts: number; clearedBranches: number }> {
      const clearedThoughts = this.thoughtHistory.length;
      const clearedBranches = this.branches.size;
    
      this.reset();
      await this.clearSession();
    
      console.error(`🧹 Session reset: cleared ${clearedThoughts} thoughts, ${clearedBranches} branches`);
    
      return { clearedThoughts, clearedBranches };
    }
  • Private reset method that clears all in-memory session state: thought history, branches, counters, goal, session ID, coaching cooldown, and dead ends.
    reset(): void {
      this.thoughtHistory = [];
      this.branches.clear();
      this.lastThoughtNumber = 0;
      this.sessionGoal = undefined; // Clear goal on reset (v2.10.0)
      this.currentSessionId = ''; // Clear sessionId on reset (v2.11.0)
      this.coachingService.reset(); // Clear coach cooldown (v3.2.0)
      this.deadEnds = []; // Clear dead ends (v3.3.0)
    }

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other 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/GofMan5/think-mcp'

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