Skip to main content
Glama
by fmangot

reset_thinking_session

Clear the current thought sequence and start a new structured reasoning session for step-by-step problem solving

Instructions

Starts a new thinking session, clearing the current thought sequence

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Switch case handling the reset_thinking_session tool: calls resetSession on the thinking manager and returns confirmation with new session ID.
    case 'reset_thinking_session': { const newSessionId = thinkingManager.resetSession(); return { content: [ { type: 'text', text: JSON.stringify( { message: 'New thinking session started', sessionId: newSessionId, }, null, 2 ), }, ], }; }
  • Tool schema definition for reset_thinking_session with name, description, and empty input schema (no parameters required).
    export const RESET_SESSION_TOOL: Tool = { name: 'reset_thinking_session', description: 'Starts a new thinking session, clearing the current thought sequence', inputSchema: { type: 'object', properties: {}, }, };
  • Core implementation of session reset in SequentialThinkingManager: generates new secure session ID and initializes empty session.
    public resetSession(): string { this.currentSessionId = generateSecureSessionId(); this.initializeSession(this.currentSessionId); return this.currentSessionId; }
  • src/index.ts:31-39 (registration)
    MCP server registration: lists tools via ALL_TOOLS (includes reset_thinking_session schema) and dispatches calls to shared handleToolCall function.
    // Handle tool listing server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: ALL_TOOLS }; }); // Handle tool calls server.setRequestHandler(CallToolRequestSchema, async (request) => { return handleToolCall(request.params, thinkingManager); });

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/fmangot/Mcp'

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