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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Clear all recorded thoughts' implies a destructive mutation, but it doesn't specify whether this is reversible, what permissions are needed, or what happens after clearing (e.g., empty list returned, confirmation message). This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'clear' entails (e.g., deletion, resetting), what the return value is, or any side effects. Given the complexity of a destructive operation, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description appropriately doesn't mention parameters, which aligns with the schema. A baseline of 4 is justified since no parameter information is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Clear') and the resource ('all recorded thoughts'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_thoughts' or 'get_thought_stats' beyond the obvious action difference, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_thoughts' or 'think', nor does it mention prerequisites or consequences. It simply states what the tool does without context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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