Skip to main content
Glama
arjshiv

Local Utilities MCP Server

by arjshiv

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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.` }] }; } );
  • 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.` }] }; }
  • 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);

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/arjshiv/localutils-mcp-server'

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