Skip to main content
Glama
MikeyBeez

MCP Contemplation

by MikeyBeez

clear_scratch

Remove temporary scratch notes to free up cognitive processing space and maintain organized background thinking.

Instructions

Clear temporary scratch notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function clearScratch() in ContemplationManager class that implements the logic to clear temporary scratch files by recursively deleting daily directories and returns the count of files cleared.
    async clearScratch(): Promise<number> {
      const scratchPath = '/Users/bard/Code/contemplation-loop/tmp/contemplation';
      let count = 0;
    
      try {
        const days = fs.readdirSync(scratchPath);
        for (const day of days) {
          const dayPath = path.join(scratchPath, day);
          const files = fs.readdirSync(dayPath);
          count += files.length;
          fs.rmSync(dayPath, { recursive: true, force: true });
        }
      } catch (e) {
        // Directory might not exist
      }
    
      return count;
    }
  • src/index.ts:564-569 (registration)
    Registration and dispatching of the clear_scratch tool in the CallToolRequestSchema handler switch statement, which calls the clearScratch method and formats the response.
    case 'clear_scratch': {
      const count = await contemplation.clearScratch();
      return {
        content: [{ type: 'text', text: `Cleared ${count} scratch files` }],
      };
    }
  • Tool registration in ListToolsRequestSchema including the name, description, and empty inputSchema for clear_scratch (no parameters required).
    {
      name: 'clear_scratch',
      description: 'Clear temporary scratch notes',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Clear' implies a destructive mutation, but it doesn't specify if this is reversible, what 'scratch notes' are, or any side effects. The description lacks details on permissions, rate limits, or response behavior, which is inadequate 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 and appropriately sized for a simple tool, making it easy for an agent to parse quickly.

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?

Given no annotations, no output schema, and a mutation tool, the description is incomplete. It doesn't explain what 'scratch notes' are, the impact of clearing them, or what happens after execution. For a tool that likely alters state, more context is needed for safe use.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info, but that's acceptable here. Baseline is 4 as per rules for 0 parameters, since the schema fully covers the absence of inputs.

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 'Clear temporary scratch notes' clearly states the verb ('Clear') and resource ('temporary scratch notes'), making the purpose understandable. It doesn't explicitly distinguish from siblings like 'get_insights' or 'send_thought', but the action is distinct enough given the toolset context.

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. It doesn't mention prerequisites, timing, or relationships to sibling tools like 'get_memory_stats' or 'set_threshold', leaving the agent to infer usage context.

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/MikeyBeez/mcp-contemplation'

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